I was wondering about the decision to have the WSDL2Java tool map the
following WSDL pattern onto a non-wrapped Java interface
when using doc-lit-wrapped WSDL:

...<types>
           ....
           <complexType name="getGreetings">
             <sequence>
               <element name="name" type="xsd:string"/>
             </sequence>
           </complexType>

           <element name="getGreetings" type="tns:getGreetings"/>
           ...
</types>

I noticed that wsimport seems to unwrap this and produce:

 getGreetings(String)

whereas our WSDL2Java treats this as non-wrapped and generates:

 getGreetings(getGreetings)

The key line of Tuscany code is:

org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.isWrapped()
  ....      if (typeMappingEntry.isAnonymous()) {
                   wrapped = true;
               }   ....


Are we interpreting differently Sec. 2.3.1.2 (iv) of the JAX-WS spec?, which
says:

(iv) The elements referred to by the input and output message parts
(henceforth referred to as wrapper 27
elements) are both complex types defined using the xsd:sequence compositor

Also, I'm realizing this maybe provides a (unintended?) way to solve the
issue I raised in:
http://issues.apache.org/jira/browse/TUSCANY-1019
(That is, assuming the runtime databinding code also calculates this as
"non-wrapped"; if not there is potentially another problem).

On the other hand I think it would be better to solve 1019 by providing an
explicit choice.

Also it seems there are a lot of WSDLs out there following the above "named
complexType" pattern, (or whatever it's called).

I'm wondering what Yang, Raymond, Sebastien and whoever else is interested
in the WSDL2Java tools thinks about this...

Thanks,
Scott Kurz

Reply via email to