[jira] [Commented] (CXF-8025) wsdl2java using wrapper style cannot handle multiple levels of xsd:extension elements

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CXF-8025) wsdl2java using wrapper style cannot handle multiple levels of xsd:extension elements

Colm O hEigeartaigh (Jira)

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

Xavier MOGHRABI commented on CXF-8025:
--------------------------------------

I encounter this problem when trying to migrate from JAXWS-RI to CXF.
I cannot modify the WSDL as it is provided by an external partner.
Any fix would be welcomed.

> wsdl2java using wrapper style cannot handle multiple levels of xsd:extension elements
> -------------------------------------------------------------------------------------
>
>                 Key: CXF-8025
>                 URL: https://issues.apache.org/jira/browse/CXF-8025
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 3.3.1
>            Reporter: James Poje
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> While converting a project from Metro to CXF 3.3.1, I ran into an issue where wsdl2java (using wrapper style) was generating the port type interface without errors but some method parameters were totally missing.
> Debugging found that some of our schema types use multiple levels of xsd:extension and CXF seems to stop looking after one level (in org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ProcessorUtil::getWrappedElement).
> Example element similar to our original issue: the port type interface would generate with the "id" parameter and without the "parentId" parameter (more complex example in the PR test):
> {code:java}
> <element name="someParameter" type="x1:someParameterType"/>
> <complexType name="someParameterType">
>     <complexContent>
>         <extension base="x1:ParentType">
>             <sequence>
>                 <element name="id" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>             </sequence>
>         </extension>
>     </complexContent>
> </complexType>
> <complexType name="ParentType">
>     <complexContent>
>         <extension base="x1:EmptyGrandParentType">
>             <sequence>
>                 <element name="parentId" type="xsd:string" minOccurs="1" maxOccurs="1"/>
>             </sequence>
>         </extension>
>     </complexContent>
> </complexType>
> <complexType name="EmptyGrandParentType"/>{code}
>  
> This schema structure appears valid (please correct me if this is wrong) and has been in use with Metro for some time, so I think this just needs a small fix.  There is a proposed patch+test PR available - it simply adds multilevel traversal to the original work supporting xsd:extension elements in CXF-2193.
> Please let me know if I can clarify or add any other info.



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