| re: Problem with SoapHttpClientProtocol Invoke()
Thanks for reply! Please let me know if I'm missing something obvious here.
Yes, that seems to be the situation. My server exposes its WSDL and schema, and I am using VC# to build a SOAP client to make a simple query to my server. When the VC# SOAP client gets an instance of B (which is also an instance of A by inheritance), it does not recognize that it got an instance of A and simply returns null. Unfortunately, I do not believe the server could typecast, because it is putting an XML fragment into the SOAP envelope, and it is not feasible to throw away the type information just to package it up as an instance of A. I am also not very familiar with the world of SOAP and web services, but would be happy to see exactly what you suggest, some sort of flag that would indicate not to require an instance only of A, but also to allow subclasses of A. Coming from the Java world, I would have expected this to happen automatically!
|