users@jax-ws.java.net

Re: WSDL Polymorphism

From: Anne Thomas Manes <atmanes_at_gmail.com>
Date: Thu, 19 Jan 2006 15:46:49 -0500

From a schema and interoperability perspective, it's a much better idea to
use different types. You could use substitution groups to implement
polymorphism in schema, but very few SOAP stacks support substitution
groups.

Anne

On 1/19/06, Ryan LeCompte <Ryan.LeCompte_at_pangonetworks.com> wrote:
>
> Hello all,
>
> I was wondering if anyone could shed any light on the notion of WSDL
> polymorphism. Is this something that is interoperable among all web service
> stacks? For example, I'd like to basically represent the following in WSDL:
>
> class Base {
> string commonValue1;
> string commonValue2;
> }
>
> class ChildOne extends Base {
> string childOneValue1;
> string childOneValue2;
> }
>
> class ChildTwo extends Base {
> string childTwoValue1;
> string childTwoValue2;
> }
>
> (note that the above is just pseudo code)
>
> Does WSDL support the above notion of inheritance, polymorphism? If so,
> will all WSDL stacks generate the right interfaces? What about langauges
> that don't support type-safety, such as Python/Perl? Is it best to just have
> two different types and duplicate the "commonValue1" and "commonValue2" for
> the sake of interoperability?
>
> Thanks!
> Ryan
>
>