You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2009/08/19 17:31:14 UTC

[jira] Resolved: (CXF-2394) wsdl2java generates incorrect code when same element in request and reply

     [ https://issues.apache.org/jira/browse/CXF-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2394.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.6


This was resolved in 2.1.6 (maybe 2.1.5) although with your wsdl, you would need to add either a jaxb binding file or add:

<autoNameResolution>true</autoNameResolution>

to the wsdlOptions in the pom.xml.



> wsdl2java generates incorrect code when same element in request and reply
> -------------------------------------------------------------------------
>
>                 Key: CXF-2394
>                 URL: https://issues.apache.org/jira/browse/CXF-2394
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.1.4
>         Environment: Maven version: 2.0.8
> Java version: 1.5.0_17
> Maven plugin "cxf-codegen-plugin" (version 2.1.4) with goal "wsdl2java".
>            Reporter: Valerie Vanler
>             Fix For: 2.1.6
>
>         Attachments: wsdlToBePosted.zip
>
>
> I am working on a WSDL and related xsd files provided by a third party.
> In this WSDL,  the root element of the message matches with the name of the operation.
> So the Web service is recognized as "wrapper" web services style by Cxf (the @SOAPBinding annotation
> is not present so the "wrapper" default is taken)
> I have created a simple wsdl/xsd to reproduce the problem I am facing.
> In fact, the request and the response have both a <xs:element> with the same name ("options" in my sample)
> The problem is that the "options" sub-tree is different in the request and in the response.
> The generated code is as follows:
> (extract)
>     public void addOptionRequest(
>         @WebParam(mode = WebParam.Mode.INOUT, name = "options", targetNamespace = "http://xml.testvv.com/AddOptionReply_1_0")
>         javax.xml.ws.Holder<com.testvv.xml.addoptionreply_1_0.AddOptionReply.Options> options,
> 		...
> 		
> Where addOptionRequest is my "operation".
> The problem is that the "options" generated is the one from the reply. So I am not able to create my request
> "options" to call my webservice.
> Is this a bug or should I use a special option to have the webservices recognized as "non-wrapper"
> (if such an option exist, I haven't found it)
> Is the bug fix in a newer version of Cxf?
> Note: I have tried to rename the operation in the wsdl (in order to have a different operation name than
> the root element of the schema) and in this case, the following annotation appears @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> and everything goes well.
> The problem is that as the WSDL/XSD are provided by a third party, I should not change them.
> Any help would be great
> Valerie

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