[
https://issues.apache.org/jira/browse/CXF-6791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Peters updated CXF-6791:
-------------------------------
Description:
The attached example features a message and wrapped header. Both are defined in
"abstract.xsd" (with appropriate namespace). In "concrete.xsd" both two new
types are defined, both deriving from their respective partners in "abstract".
The concrete:message is now wrapping a concrete:header. In the "service.wsdl" i
define a service, using the concrete:message in a wrapper element.
Now I use "wsdl2java" for convertion, add a dash of spring-boot to get the
whole thing running. The end-result is that for a message like
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<payload>
<content>
<header>
<comment>fdsafdsafdsafdsa</comment>
</header>
</content>
</payload>
</soapenv:Body>
</soapenv:Envelope>
i run into an unmarshalling-exception (also attached). The Server apparently
tries to instantiate the abstract class (from "abstract.xsd"), not the one from
concrete.xsd. I double checked with SoapUI and Oxygen, both seem to have no
problem with the wsdl.
Of course, removing the "abstract" from the abstract-Header solves the problem,
but that is not really a solution for a contract-first driven project.
was:
The attached example features a message and wrapped header. Both are defined in
"abstract.xsd" (with appropriate namespace). In "concrete.xsd" both two new
types are defined, both deriving from their respective partners in "abstract".
The concrete:message is now wrapping a concrete:header. In the "service.wsdl" i
define a service, using the concrete:message in a wrapper element.
Now I use "wsdl2java" for convertion, add a dash of spring-boot to get the
whole thing running. The end-result is that for a message like
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<payload>
<content>
<header>
<comment>fdsafdsafdsafdsa</comment>
</header>
</content>
</payload>
</soapenv:Body>
</soapenv:Envelope>
i run into an unmarshalling-exception (also attached). The Server apparently
tries to instantiate the abstract class (from "abstract.xsd"), not the one from
concrete.xsd. I double checked with SoapUI and Oxygen, both seem to have no
problem with the wsdl.
Of course, removing the "abstract" from the abstract-Header solves the problem,
but that is not really a solution for a contract-first driven project.
(In lack of a better way to submit my files, here's a link:
http://www.filedropper.com/mwe
I hope this is an appropriate way to submit files.)
> Nested Abstract classes are not converted correctly from a WSDL
> ---------------------------------------------------------------
>
> Key: CXF-6791
> URL: https://issues.apache.org/jira/browse/CXF-6791
> Project: CXF
> Issue Type: Bug
> Affects Versions: 3.1.5
> Environment: MacOS 10.11.3, Apache CXF 3.1.5, SoapUI 5.2.1, Oxygen
> 17.1
> Reporter: Julian Peters
> Attachments: MWE.zip
>
>
> The attached example features a message and wrapped header. Both are defined
> in "abstract.xsd" (with appropriate namespace). In "concrete.xsd" both two
> new types are defined, both deriving from their respective partners in
> "abstract". The concrete:message is now wrapping a concrete:header. In the
> "service.wsdl" i define a service, using the concrete:message in a wrapper
> element.
> Now I use "wsdl2java" for convertion, add a dash of spring-boot to get the
> whole thing running. The end-result is that for a message like
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header/>
> <soapenv:Body>
> <payload>
> <content>
> <header>
> <comment>fdsafdsafdsafdsa</comment>
> </header>
> </content>
> </payload>
> </soapenv:Body>
> </soapenv:Envelope>
> i run into an unmarshalling-exception (also attached). The Server apparently
> tries to instantiate the abstract class (from "abstract.xsd"), not the one
> from concrete.xsd. I double checked with SoapUI and Oxygen, both seem to have
> no problem with the wsdl.
> Of course, removing the "abstract" from the abstract-Header solves the
> problem, but that is not really a solution for a contract-first driven
> project.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)