doc-lit-wrapped WSDLs with wrapper elems with non-substitution-group refs are 
incorrectly treated as non-wrapped
----------------------------------------------------------------------------------------------------------------

                 Key: TUSCANY-1938
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1938
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Core Runtime
    Affects Versions: Java-SCA-1.0
            Reporter: Scott Kurz


The JAX-WS Spec, Sec. 2.3.1.2, makes the following confusing statement in 
defining the WSDL style which qualifies for mapping to "wrapped"  Java:
...
(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.

I think the Tuscany interpretation of this statement is wrong in treating 
certain WSDLs as "non-wrapped" rather than "wrapped".     This makes it hard 
to, say, consistently
choose to work in the doc-lit-wrapped WSDL style with a pre-existing WSDL file.

I'll attach a WSDL file for reference, but let me show an excerpt.        

This is not treated as wrapped by Tuscany:

            <element name="person" type="tns:Person"/>

            <complexType name="Person">
                <sequence>
                        <element name="firstName" type="xsd:string"/>
                        <element name="lastName" type="xsd:string"/>
                </sequence>
            </complexType>
            
            <element name="getGreetings">
                <complexType>
                    <sequence>
                        <element name="greeting" type="xsd:string"/>
                        <element ref="tns:person"/>
                    </sequence>
                </complexType>
            </element>

IMO, the JAX-WS RI toolset, (wsimport) has the best interpretation of the 
JAX-WS spec.    The 'wsimport' tool will treat this as wrapped, (i.e. gen the 
Java with  @RequestWrapper), which
I think is correct.     (BTW, a service impl that I wrote from this WSDL worked 
fine on an IBM WAS 6.1 runtime with JAX-WS support.)

In the sample WSDL attached, I show what I think the JAX-WS spec is trying to 
disallow.  The key point I think is that they're trying to disallow use of 
substitution groups.     So, if 'person' above
had been an abstract element with an associated substitution group, then JAX-WS 
RI would map this in a non--wrapped style.

This also fits with the fact that the statement "(element references are not 
permitted)"  is not made in a separate sub-bullet, but only in parentheses 
directly next to "substitution groups".  

Though I still can't explain exactly why the authors phrased it the way they 
did  !

As further proof this is confusing, here's another JIRA on the exact same 
subject on the CXF project (which apparently hasn't been resolved).
https://issues.apache.org/jira/browse/CXF-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531198

Within the Tuscany runtime, I believe this function is implemented in the
WSDLOperationIntrospectorImpl$Wrapper.getChildElements() method.  

There may or may not be a Tuscany tools hit here as well.  I haven't checked.









-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to