Hi Peter,

Just commit the fix, can you try it again.

Thanks,
James.

Peter Jones (JIRA) 写道:
[ http://issues.apache.org/jira/browse/CXF-161?page=comments#action_12447917 ] Peter Jones commented on CXF-161:
---------------------------------

This is still a bug.  Although the header2.wsdl that's in svn passes the test 
that was added for cxf-161, that wsdl differs from the one attached to this 
issue because the header_info part is missing from the response message in the 
copy in svn.  If I copy the file attached to this issue into 
tools/wsdl2java/src/test/resources/wsdl2java_wsdl/bug161/header2.wsdl, then the 
test that was added fails... because the parameter order is wrong.

wsdl2java doesn't map parameter order correctly
-----------------------------------------------

                Key: CXF-161
                URL: http://issues.apache.org/jira/browse/CXF-161
            Project: CXF
         Issue Type: Bug
         Components: Tooling
   Affects Versions: 2.0-M1
           Reporter: Peter Jones
        Assigned To: jimma
            Fix For: 2.0-M1

        Attachments: header2.wsdl


According to the "Parameter Order" section of jaxws spec, unlisted parameters 
mapped from in and in/out parts appear in the same order the corresponding parts appear 
in the input message.
I'll attach a test wsdl in which wsdl2java doesn't follow this rule.  
Basically, the wsdl input message is:
    ...
    <message name="headerRequest">
        <part element="tns:HeaderInfo" name="header_info"/>
        <part element="tns:Header" name="the_request"/>
    </message>
(header_info first, the_request second) - but the generated method signature has theRequest parameter first and headerInfo second:
    ...
    public org.apache.header2.HeaderResponse headerMethod(
        @WebParam(targetNamespace = "http://apache.org/header2";, partName = 
"the_request", name = "Header")
        org.apache.header2.Header theRequest,
        @WebParam(targetNamespace = "http://apache.org/header2";, header = true, mode = Mode.INOUT, 
partName = "header_info", name = "HeaderInfo")
        javax.xml.ws.Holder<org.apache.header2.HeaderData> headerInfo
    );


Reply via email to