3

I have a CXF Fault class defined that way:

@WebFault(name = "FaultContainer",
        faultBean = "myapi.transport.FaultContainer",
        targetNamespace = "mynmspace")
public class ServiceFaultSecond extends java.lang.Exception {
...
}

As you can see, it extends normal java Exception. The problem is, that in WSDL generated by CXF this class is represented that way:

<xs:complexType name="serviceFaultSecond">
 <xs:complexContent>
  <xs:extension base="tns:exception">
   <xs:sequence>
    <xs:element minOccurs="0" name="faultInfo" type="tns:FaultContainer"/>
   </xs:sequence>
  </xs:extension>
 </xs:complexContent>
</xs:complexType>

Here it extends a "tns:exception" (that than extends tns:throwable). Now, when I try to generate a Client, there are compile errors - it expects mynmspace.Exception and mynmspace.Throwable instead of java.lang...

Normally CXF does not put xs:extension element into WSDL, why it happens now?

Tomasz
  • 988
  • 1
  • 9
  • 23

0 Answers0