[ 
https://issues.apache.org/jira/browse/CXF-8114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16955329#comment-16955329
 ] 

Stephan Wienczny commented on CXF-8114:
---------------------------------------

The underlying problem is an ambiguity between the WSDL and XSD-specs. A 
element may be empty (as in the WSDL above) or left out of the message body as 
[~deki] suggests. Both should result in the same XML on the wire. 

For me this was already solved by the patch suggested above. I just could not 
convince my upstream because the WSDL is still valid in some regard. IMHO an 
element without a type specification should be prohibited by the spec.

> cxf-codegen-plugin generates invalid code for operations with empty parameters
> ------------------------------------------------------------------------------
>
>                 Key: CXF-8114
>                 URL: https://issues.apache.org/jira/browse/CXF-8114
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.3.3
>            Reporter: Stephan Wienczny
>            Priority: Major
>         Attachments: OneClickForRefund.wsdl
>
>
> We are trying to implement a webservice from a given wsdl. It contains an 
> operation (createRetoureId) that references an empty element 
> (CreateRetoureIdRequest)
> as parameter, e.g. it is an operation without an actual parameter. In the 
> generated code this parameter is mapped to "java.lang.Object":
> {{}}{{@WebMethod}}
> {{@WebResult(name = "CreateRetoureIdResponse", targetNamespace = 
> "http://oneclickforrefund.dpag.de";, partName = "parameters")}}
> {{@Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = 
> "2019-09-13T11:24:07.696+02:00")}}
> {{public CreateRetoureIdResponse createRetoureId(}}
> {{ @WebParam(partName = "createRetoureIdRequest", name = 
> "CreateRetoureIdRequest", targetNamespace = 
> "http://oneclickforrefund.dpag.de";)}}
> {{ java.lang.Object createRetoureIdRequest}}
> {{) throws CreateRetoureIdException_Exception;}}
>  
> I did not find a way to pass a valid value to the method when being invoked 
> from Java. Neither "null" nor "new Object()" result in a message being send.
>  
> The wsdl is attached and publicly available at 
> [https://internetmarke.deutschepost.de/OneClickForRefund?wsdl] 
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to