Before opening a JIRA I thought I'd throw this out there to ensure it's
really a bug.

In code such as org.apache.tuscany.idl.wsdl.WSDLOperation we try to enforce
the JAX-WS criteria for using "wrapper-style" mapping mentioned in JAX-WS
2.3.1.2.

The WSDLOperation code has the spec statement as a comment:
     .....
    * (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.

Our code, however, seems to go further and require that the child elements
themselves are non-nillable in order to use wrapper-style mapping.

So if I'd modified the example in Figure 2.1 of JAX-WS to look like:

   <xsd:element name="setLastTradePrice">
       <xsd:complexType>
           <xsd:sequence>
               <xsd:element name="tickerSymbol" nillable="true"
type="xsd:string" />
               <xsd:element name="lastTradePrice" nillable="true"
type="xsd:float" />
           </xsd:sequence>
       </xsd:complexType>
   </xsd:element>

then the Tuscany runtime would assume I was working with a non-wrapped-style
interface like:

SetLastTradePriceResponse setLastTradePrice(SetLastTradePrice
setLastTradePrice);

Doesn't this seem incorrect?

When I used the JAX-WS wsimport tool against a doc-lit-wrapped style WSDL, I
had no problem with nillable="true" on the child elements.  I still got
wrapped-style Java.

(A related but separate issue that I will open a JIRA for is the fact that
there is no option in Tuscany's WSDL2Java tooling to generate non-wrapped
Java from doc-literal-wrapped WSDL.)

Thanks,
Scott

Reply via email to