How to consume a Web Method that returns a custom class?

Discussion in 'ASP .Net Web Services' started by Christopher Ambler, Sep 26, 2003.

  1. I have a web service which has a method that returns a custom class. I did
    this because I didn't want my output to be framed by the SOAP "string" tag,
    but wanted a custom tag. So my class is called "foo" and my output looks
    like this:

    <foo>
    .... stuff ....
    </foo>

    This works great for those people who call the service expecting straight
    XML output.

    But when I try to add this web service as a Web Reference in a c#
    application, it complains:

    Reference.map(1): Custom tool error: Unable to import WebService/Schema.
    Unable to import binding 'WHOISServiceSoap' from namespace
    'http://ewws.example.com/'. Unable to import operation 'WHOIS'. The element
    'http://schemas.xmlsoap.org/wsdl/:WHOISResult' is missing.

    "WHOIS" is my web method and "WHOISService" is my web service class name.

    Is this because the "WHOIS" method returns a type of "foo" and not "string"
    or some other native type?

    Christopher
     
    Christopher Ambler, Sep 26, 2003
    #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. Saumendra
    Replies:
    0
    Views:
    1,266
    Saumendra
    Jun 24, 2003
  2. steven
    Replies:
    0
    Views:
    324
    steven
    Aug 21, 2008
  3. Timo
    Replies:
    2
    Views:
    509
  4. Sam
    Replies:
    8
    Views:
    529
    John Saunders [MVP]
    Jun 3, 2007
  5. dgleeson422111

    consume local web service -ok consume remote service - Not OK

    dgleeson422111, Jan 26, 2010, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    1,659
    dgleeson422111
    Jan 31, 2010
Loading...

Share This Page