C#.NET WebServices

Discussion in '.NET' started by anindya_becit, Feb 7, 2009.

  1. anindya_becit

    anindya_becit

    Joined:
    Feb 7, 2009
    Messages:
    1
    Location:
    Melbourne
    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
    anindya_becit, Feb 7, 2009
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. khawar
    Replies:
    0
    Views:
    434
    khawar
    Jul 15, 2003
  2. Ulysses Colambot

    help in asp.net vs webservices created in gsoap

    Ulysses Colambot, Jul 24, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    489
    Ulysses Colambot
    Jul 24, 2003
  3. Alvin Bruney [MVP]

    Fedex webservices for .NET?

    Alvin Bruney [MVP], Aug 5, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    4,357
    Alvin Bruney [MVP]
    Aug 6, 2004
  4. =?Utf-8?B?Y3liZXJzdHJpa2U=?=

    developing ASP.NET/Webservices without local IIS

    =?Utf-8?B?Y3liZXJzdHJpa2U=?=, May 12, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    893
    Brock Allen
    May 13, 2005
  5. Peter  Nofelt
    Replies:
    2
    Views:
    479
    Peter Nofelt
    Sep 13, 2005
Loading...

Share This Page