Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.1.7
-
None
-
None
-
Unknown
Description
CXF wsdl2java tooling generates invalid Java sources when the fault element in the fault message is imported from a copmilation eposide.
I created a wsdl that defines a xml schema with an include from a already packaged XSD/bindings jar.
<wsdl:types> <xsd:schema targetNamespace="urn:io.fares.model.example.utility" xmlns="urn:io.fares.model.example.utility"> <xsd:include schemaLocation="utility/Fault.xsd"/> </xsd:schema> </wsdl:types>
it then references an element defined in the referenced schema
<wsdl:message name="GetCustomerException"> <wsdl:part name="err" element="u:Fault"/> </wsdl:message>
but when it generates code it fails to fully qualify the name of the imported and already generated XML Bean / Java class.
package io.fares.examples.one.services; // <---- generated into the services' package import javax.xml.ws.WebFault; // <--- I would expect another import of io.fares.model.example.utility.Fault here @WebFault(name = "Fault", targetNamespace = "urn:io.fares.model.example.utility") public class GetCustomerException extends RuntimeException { public static final long serialVersionUID = 1L; private Fault fault; // <--- Fault should be fully qualified class name but its not // ... public Fault getFaultInfo() { return this.fault; } }
I think the problem is somewhere around org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ProcessorUtil.getFullClzName but have not been able to figure out exactly why it fails to insert the fully qualified class name into the generated exception.
An example showing the failed copmilation can be found on GitHub
Attachments
Issue Links
- is broken by
-
CXF-7289 CXF wsdl2java fails when using existing compilation expisodes of schemata
- Open