SoapServer Derived Type Response Issue

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mortifer
Forum Newbie
Posts: 1
Joined: Tue Jul 21, 2009 2:56 pm

SoapServer Derived Type Response Issue

Post by mortifer »

1. I'm using the core SoapServer object to run a web service for a C# .Net client.

2. I have defined three complexTypes in the WSDL: TypeA, TypeB, and TypeC.

3. TypeB and TypeC extend TypeA.

4. The client understands these extensions because I am able to cast locally created instances of TypeB/C to TypeA and the reverse where proper.

5. Individual web service operations that return TypeB and TypeC work as expected.

6. I have defined a single web service operation that is defined in the WSDL to return a complexType TypeA whose handling code is designed to return an instance of either derived type depending on the parameter values.

7. Attempts by the client to cast the result to the appropriate derived type throw runtime exceptions complaining that the client is unable to perform the cast.

Are there any commonly known gotchas to returning a derived complexType as an instance of the parent?

Thanks for reading.
Post Reply