Replacing <xsd:choice> isn't an option if you're trying to use
industry standard schemas.
On 5/9/05, Russell Butek <butek_at_us.ibm.com> wrote:
>
>
> If you're not wedded to your choice, you can replace most uses of choice
> with polymorphism and have the same functionality.
>
> Russell Butek
> Web services consultant
> IBM Software Services for WebSphere
> butek_at_us.ibm.com
> 512 940 8592
>
> Anne Thomas Manes <atmanes_at_gmail.com> wrote on 05/06/2005 07:43:29 PM:
>
> > 1) The JAX-RPC spec says that support for <choice> is not required for
> > automatic binding. But the JAX-RPC spec also requires that all valid
> > XSD constructs must be supported, and any construct that doesn't have
> > automatic mapping support must be mapped to SOAPElement.
> > 2) No. Well, not really. You can replace the <choice> with a
> > <sequence>, and then specify that each element has minOccurs="0", but
> > there's no way to ensure that the message will contain one or the
> > other element and not both.
> > 3) Workarounds: use SAAJ and process the XML manually or use a
> > different JAX-RPC implementation that does support <choice>
> >
> > - Anne
> >
> > On 5/6/05, Alessio Cervellin <alessio.cervellin_at_sun-cs-italy.com> wrote:
> > > Hi all.
> > > As far as I can see it seems that wscompile (of JWSDP 1.5) doesn't
> > support the <xsd:choice> element.
> > > My questions are:
> > > 1) is there a reason for that? According to the WS-I BP1.0
> > specifications it should be supported (AFAIK)
> > > 2) is there any equivalent syntax to replace in a WSDL which uses
> > the above element?
> > > 3) if not, are there any other workaround to use it?
> > >
> > > Note: Axis does support it... :P
> > >
> > > Thanks.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> > > For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> > For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>