cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Wu (JIRA)" <>
Subject [jira] Created: (CXF-1458) SOAPFaultException thrown from @WebServiceProvider class is not correctly populated
Date Fri, 29 Feb 2008 13:44:51 GMT
SOAPFaultException thrown from @WebServiceProvider class is not correctly populated

                 Key: CXF-1458
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime
    Affects Versions: 2.0.4, 2.0.5
         Environment: Windows XP, JDK1.5.0_12, Tomcat 5.5.25
            Reporter: Steve Wu

My issue is similar to cxf-1417. I downloaded cxf 2.0.5 (2-22-08) but it doesn't solved my

@ServiceMode(value = Service.Mode.PAYLOAD)

public class TestGreetingProvider
  implements Provider<DOMSource>
    private WebServiceContext context;
    //~ Constructors -------------------------------------------------------------------------------

    public TestGreetingProvider()

    //~ Methods ------------------------------------------------------------------------------------

    public DOMSource invoke(DOMSource request)
            // do some thing
        catch(Exception e)
             SOAPFactory factory = SOAPFactory.newInstance();
             SOAPFault soapFault = factory.createFault();   
             soapFault.setFaultString("Test Fault String ****");

             Detail detail = soapFault.addDetail();
             detail = soapFault.getDetail();

             QName qName = new QName("","TestFault","ns");
             DetailEntry de = detail.addDetailEntry(qName);            

             qName = new QName("","ErrorCode","ns");
             SOAPElement errorElement = de.addChildElement(qName);
             throw new SOAPFaultException(soapFault);
        // return DOMSource here

I am expecting the following fault message in the client:

<soapenv:Envelope xmlns:soapenv="">
        <faultstring>Test Fault String ****</faultstring>
          <ns:TestFault xmlns:ns="">
            <ns:ErrorCode xmlns:ns="">errorcode</ErrorCode>
But I got the following in the client when using cxf 2.0.4. NOTE: The detail section is missing.

<soapenv:Envelope xmlns:soapenv="">
        <faultstring>Test Fault String ****</faultstring>        
If I use cxf 2.0.5(2-22-08) I didn't see any response in my TCPMonitor.  

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message