When I tried wsdl2java tool to generate this wrapper element and the output
is a doc-lit-bare style method :
<xsd:element name="hello">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base=""tns:baseType">
<xsd:sequence>
<xsd:element name="id"
type="tns:idType" minOccurs="1" maxOccurs="1" />
<xsd:choice>
<xsd:element name="updateName"
type="tns:newNameType" maxOccurs="1"
minOccurs="0" />
<xsd:element name="newName" type="tns:newNameType"
minOccurs="0" maxOccurs="1" />
</xsd:choice>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
CXF takes this is a bare style if it finds there is <xsd:choice> nested in
<xsd:sequence> and this breaks the rule(v) in jaxws sepc:
A WSDL operation qualifies for wrapper style mapping only if the following
criteria are met:
(i) The operation’s input and output messages (if present) each contain
only a single part
(ii) The input message part refers to a global element declaration whose
local name is equal to the operation name
(iii) The output message (if present) part refers to a global element
declaration
(iv) The elements referred to by the input and output message(if present)
parts (henceforth referred to as wrapper elements) are both complex types
defined using the xsd:sequence compositor
(v) The wrapper elements only contain child elements, they MUST not contain
other structures such as wildcards (element or attribute), xsd:choice,
substitution groups (element references are not permitted) or attributes;
furthermore, they MUST not be nillable
Do you think the rule(v) should be interpreted to there should be only
<xsd:squence> defined for complex type and <xsd:choice> is not allowed here
like :
<xsd:element name="p">
<xsd:complexType>
<xsd:choice>
<xsd:element name="choice1" maxOccurs="1" minOccurs="0"/>
<xsd:element name="choice2 maxOccurs="1" minOccurs="1"/>.
</xsd:complexType>
</xsd:element>
then <xsd:sequence> child element <xsd:choice> is allowed for wrapped style
?
Cheers,
Jim
Cheers,
Jim