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

Custom exception not appearing in SOAP fault response

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.2
    • 2.0.3
    • None
    • None
    • WIndows XP
      Java SDK 1.5_0_12

    Description

      I modified the apache-cxf-2.0.2-incubator\samples\java_first_jaxws web service to throw a custom exception and a custom request and response object like so:

      public interface HelloWorld {
      Response sayHi(Request text) throws CustomException;
      }

      CustomException is a CustomExceptionBase with two string properties. CustomExceptionBase is a java.lang.Exception

      The CustomException appears in the WSDL but the CustomExceptionBase is missing. When the service is invoked and throws a CustomException the soap response is:

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
      <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>custom error</faultstring>
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>

      I am expecting to see the CustomException serialized in the Envelope/Body/Fault/detail node.

      Attachments

        1. java_first_jaxws.zip
          16 kB
          ed p
        2. helloWorld.wsdl
          3 kB
          ed p
        3. helloworld_glassfishmetro.wsdl
          2 kB
          ed p
        4. wsit-jaxws-fromjava.zip
          59 kB
          ed p
        5. helloworld.xsd
          2 kB
          ed p

        Activity

          People

            dkulp Daniel Kulp
            ed.p ed p
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: