C#.NET WebServices

Joined
Feb 7, 2009
Messages
1
Reaction score
0
Hi all:

This is Anindya. This is my first post in this forum and I am new to the world of WebServices( .NET ). I have got few queries.

1. I am trying to implement a webservice that returns DataSet. It's being implemented in IIS and the name of the file is service.asmx. I can see It's being implemented properly through the browser ( localhost/GISMOWS1/Service.asmx )

I have also created another website that acts as a client to the above mentioned webservice. In the Default.aspx, I have added a webreference to the above mentioned WebService. I am getting the following error :

Error 1 Cannot implicitly convert type 'string' to 'System.Data.DataSet' C:\BUOS\GISMOSQ\Default.aspx.cs 26 22 C:\BUOS\GISMOSQ\

When I am writing the following code :

localhost.Service ls = new localhost.Service();
DataSet ds = ls.Geocode("BUOS","l") ----> at this line.


The function Geocode actually returns a DataSet and is within Service.asmx.


2. I have got another method Geocode2(String service, String description) within Service.asmx that returns a String. I am actually construction a XML string eg. String s = <Locations><Location>Australia</Location><Location>China</Location></Locations> and then returning S.

Now my page Default.aspx ( the Webservice client ) has got a TextBox named txtResult. So whenever the page is loading I am issuing the following code :

txtResult.Text = ls.Geocode2("Hi", "Hello");

So I expect to see the XML string within the text box. However I cant see anything and the txtResult is empty!!!!

These might be very basic questions. But as mentioned, I am very new to WebServices world and any help would be appreciated.

Thanks and regards,
Anindya
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top