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

C

Christopher Ambler

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
 

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

Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top