Re: xsd:choice support

From: Scott Hinkelman <>
Date: Mon, 9 May 2005 07:08:55 -0500

xsd:choice is natural and pervasive in vertical information modeling. It is
a fundamentally required structure, IMHO, and should be explicitly
supported by any serious tool. (Apache XML-Beans supports xsd:choice
without problems).


Scott R. Hinkelman, Senior Software Engineer
IBM Software Group / Emerging Technologies
Cross-Industry Foundation Standards Strategy
Office: 512.823.8097 (TL 793.8097)
Cell: 512.415.8490

             Anne Thomas Manes
             m> To
             05/06/2005 06:43 cc
             Please respond to Re: xsd:choice support

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:

To unsubscribe, e-mail:
For additional commands, e-mail: