Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-1127

JAXB Data Binding Generates Duplicate Fault Elements in Generated WSDL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.2
    • 2.0.3
    • JAXB Databinding
    • None

    Description

      In my service I have 6 calls that can throw 3 exceptions each. In the generated wsdl file the exceptions are all duplicated, times the number of methods. In my case that will be 6 * 3 exception declarations in my wsdl.

      Here's an example of a service method (they all look alike so I did just one):

      @WebResult(name = "databaseFields")
      public DatabaseField[] getDatabaseFields(@WebParam(name = "authInfo") AuthInfo authInfo,
      @WebParam(name = "databaseName") String databaseName)
      throws InvalidAuthInfoException, InvalidInputException, TripolisUnknownException;

      Here's a snippet from the generated wsdl:

      <xsd:schema xmlns:ns0="http://api.tripolis.com/" xmlns:tns="http://exceptions.api.tripolis.com/" targetNamespace="http://exceptions.api.tripolis.com/" attributeFormDefault="unqualified" elementFormDefault="unqualified">
      <xsd:element name="InvalidAuthInfoException" type="ns0:invalidAuthInfoFault" nillable="true"/>
      <xsd:element name="TripolisUnknownException" type="ns0:tripolisUnknownFault" nillable="true"/>
      <xsd:element name="InvalidInputException" type="ns0:invalidInputFault" nillable="true"/>
      <xsd:element name="InvalidAuthInfoException" type="ns0:invalidAuthInfoFault" nillable="true"/>
      <xsd:element name="TripolisUnknownException" type="ns0:tripolisUnknownFault" nillable="true"/>
      <xsd:element name="InvalidInputException" type="ns0:invalidInputFault" nillable="true"/>
      <xsd:element name="InvalidAuthInfoException" type="ns0:invalidAuthInfoFault" nillable="true"/>
      ...
      <xsd:element name="InvalidAuthInfoException" type="ns0:invalidAuthInfoFault" nillable="true"/>
      <xsd:element name="TripolisUnknownException" type="ns0:tripolisUnknownFault" nillable="true"/>
      <xsd:element name="InvalidInputException" type="ns0:invalidInputFault" nillable="true"/>
      </xsd:schema>

      This bug might be the same as https://issues.apache.org/jira/browse/CXF-745 that was presumed to be fixed.

      Am I doing something wrong here? Or was the bug never fixed?

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            ronaldpieterse Ronald Pieterse
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: