SOAP: Problem with VS learning class hierarchy

Discussion in 'ASP .Net Web Services' started by cgem, Nov 24, 2008.

  1. cgem

    cgem Guest

    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!
     
    cgem, Nov 24, 2008
    #1
    1. Advertisements

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. H.MuthuKumaraRajan
    Replies:
    3
    Views:
    673
    H.MuthuKumaraRajan
    Feb 4, 2004
  2. E11
    Replies:
    1
    Views:
    5,789
    Thomas Weidenfeller
    Oct 12, 2005
  3. Bonj
    Replies:
    2
    Views:
    603
  4. dgront
    Replies:
    5
    Views:
    561
    Oliver Wong
    Aug 2, 2006
  5. Hal Vaughan
    Replies:
    7
    Views:
    723
  6. Daniel Berger
    Replies:
    0
    Views:
    204
    Daniel Berger
    Feb 2, 2010
  7. Andrey Popp

    [I'm learning C]: Learning to use ucontext

    Andrey Popp, Jan 29, 2012, in forum: C Programming
    Replies:
    5
    Views:
    1,115
    Keith Thompson
    Jan 31, 2012
  8. Chris Angelico

    Re: Class hierarchy problem

    Chris Angelico, Aug 6, 2013, in forum: Python
    Replies:
    6
    Views:
    229
    Terry Reedy
    Aug 7, 2013
Loading...