cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-3659) wsdl2java fails to generate consistent Java from equivilent valid but slightly different WSDL, e.g. soap_header example
Date Fri, 15 Jul 2011 17:47:59 GMT
wsdl2java fails to generate consistent Java from equivilent valid but slightly different WSDL,
e.g. soap_header example
-----------------------------------------------------------------------------------------------------------------------

                 Key: CXF-3659
                 URL: https://issues.apache.org/jira/browse/CXF-3659
             Project: CXF
          Issue Type: Bug
          Components: Tooling
    Affects Versions: 2.4.1, 2.4, 2.2.12, 2.3, 2.0.13, 2.1.10
         Environment: JDK 1.6_u20
            Reporter: Martin
            Priority: Critical


Using the CXF distributed sample _soap_header_, by a small valid modification simplifying
the wsdl, the generated code is altered significantly, with the parameters for the SOAP Body
parameter being dropped.

Sample from the unmodified CXF sample wsdl:
{code}
    @WebResult(name = "outHeaderResponse", targetNamespace = "http://apache.org/cxf/sample/headers/body/",
partName = "the_response")
    @WebMethod
    public org.apache.cxf.sample.headers.body.OutHeaderResponse outHeader(
        @WebParam(partName = "me", name = "outHeader", targetNamespace = "http://apache.org/cxf/sample/headers/body/")
        org.apache.cxf.sample.headers.body.OutHeader me,
        @WebParam(partName = "header_info", mode = WebParam.Mode.INOUT, name = "SOAPHeaderInfo",
targetNamespace = "http://apache.org/cxf/sample/headers/header/", header = true)
        javax.xml.ws.Holder<org.apache.cxf.sample.headers.header.SOAPHeaderData> headerInfo
    );
{code}
 
Sample output from modified wsdl processing:
{code}
    @WebResult(name = "responseType", targetNamespace = "")
    @RequestWrapper(localName = "outHeader", targetNamespace = "http://apache.org/cxf/sample/headers/body/",
className = "org.apache.cxf.sample.headers.body.OutHeader")
    @WebMethod
    @ResponseWrapper(localName = "outHeaderResponse", targetNamespace = "http://apache.org/cxf/sample/headers/body/",
className = "org.apache.cxf.sample.headers.body.OutHeaderResponse")
    public java.lang.String outHeader(
        @WebParam(name = "requestType", targetNamespace = "")
        java.lang.String requestType
    );
{code} 
Note the missing *header* parameter in the modified wsdl vs unmodified wsdl:
{code}
        @WebParam(partName = "header_info", mode = WebParam.Mode.INOUT, name = "SOAPHeaderInfo",
targetNamespace = "http://apache.org/cxf/sample/headers/header/", header = true)
        javax.xml.ws.Holder<org.apache.cxf.sample.headers.header.SOAPHeaderData> headerInfo
{code}

Here is an example call from the original sample wsdl:
{code:xml}
<!-- the message def -->
    <message name="inHeaderRequest">
        <part element="tns:inHeader" name="me"/>
        <part element="tns:SOAPHeaderInfo" name="header_info"/>
    </message>
    <message name="inHeaderResponse">
        <part element="tns:inHeaderResponse" name="the_response"/>
    </message>

<!-- the related operation in the binding -->

        <operation name="inHeader">
            <soap:operation soapAction="" style="document"/>
            <input name="inHeaderRequest">
                <soap:body parts="me" use="literal"/>
                <soap:header message="tns:inHeaderRequest" part="header_info" 
                    use="literal"/>
            </input>
            <output name="inHeaderResponse">
                <soap:body use="literal"/>
            </output>
        </operation>
{code}

And the modified wsdl that is not apparently parsed correctly:
{code:xml}
<!-- the message def -->
    <message name="HeaderInfo">
        <part element="tns:SOAPHeaderInfo" name="header_info"/>
    </message>    
    <message name="inHeaderRequest">
        <part element="tns:inHeader" name="me"/>
    </message>
    <message name="inHeaderResponse">
        <part element="tns:inHeaderResponse" name="the_response"/>
    </message>

<!-- the related operation in the binding -->

        <operation name="inHeader">
            <soap:operation soapAction="" style="document"/>
            <input name="inHeaderRequest">
                <soap:body parts="me" use="literal"/>
                <soap:header message="tns:HeaderInfo" part="header_info" 
                    use="literal"/>
            </input>
            <output name="inHeaderResponse">
                <soap:body use="literal"/>
            </output>
        </operation>
{code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message