SOAP: Problem with VS learning class hierarchy

C

cgem

Hello. I am seeing a problem with VC#2008 Express when learning a WSDL. I
have a base class A and a subclass B. My web services server exposes a SOAP
service that returns an object of type A. The actual returned type is B (or
C or any of a bunch of different subclasses of A). The code generated by VC#
seems to know about the class hierarchy (there is a class B which extends A).
However, when I send the request from my VC# client, and get the response
(verified on the wire), the VC# code returns only null, unless the returned
type is actually listed as A. Shouldn't it be able to recognize that
something of type B is actually also of type A?

Thanks!
 

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,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top