cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Bertram (JIRA)" <>
Subject [jira] [Created] (CXF-7074) wsdl2java generates invalid Java code when fault element is imported
Date Sat, 01 Oct 2016 16:42:21 GMT
Niels Bertram created CXF-7074:

             Summary: wsdl2java generates invalid Java code when fault element is imported
                 Key: CXF-7074
             Project: CXF
          Issue Type: Bug
          Components: Soap Binding
    Affects Versions: 3.1.7
            Reporter: Niels Bertram

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

  <xsd:schema targetNamespace="urn:io.fares.model.example.utility" xmlns="urn:io.fares.model.example.utility">
    <xsd:include schemaLocation="utility/Fault.xsd"/>

it then references an element defined in the referenced schema

<wsdl:message name="GetCustomerException">
  <wsdl:part name="err" element="u:Fault"/>

but when it generates code it fails to fully qualify the name of the imported and already
generated XML Bean / Java class.

package; // <---- generated into the services' package

// <--- 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 {{}}
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|]

This message was sent by Atlassian JIRA

View raw message