Re: xsd:choice support

From: Anne Thomas Manes <>
Date: Fri, 6 May 2005 19:43:29 -0400

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 <> 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:
> For additional commands, e-mail: