Announcement Announcement Module
Collapse
No announcement yet.
SoapFaultClientException - getFaultDetail always null - Bug ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SoapFaultClientException - getFaultDetail always null - Bug ?

    Hi,

    I am using spring-ws-1.5.4 and I have got on a strange behaviour while using a WebServiceTemplate as client.

    My WebService is quite small and I am using jaxb2 Marshaller. I am using some Request and Response Validation too.

    Everything seems working as expected but the SoapFaultDetail from the SoapFault loaded by SoapFaultClientException is always null.

    Debugging SoapFaultClientException or using SoapUI, show me the <detail> value.

    Maybe I do not use SoapFaultClientException as it should, but for me it sounds like a bug.

    code :
    Code:
    WebServiceTemplate ws = new WebServiceTemplate();
    ws.setMarshaller(client.getMarshaller());
    ws.setUnmarshaller(client.getUnMarshaller());
    
    try {
    MyResponse resp = (MyResponse) = 
      ws.marshalSendAndReceive(WS_URI, req);
    			
    } catch (SoapFaultClientException e) {			
      SoapFault fault =  e.getSoapFault();
      SoapFaultDetail details = e.getSoapFault().getFaultDetail();
      //details always NULL ? Bug?
    }
    Any Idea?


    Thanks


    Guillaume
    Last edited by willome; Sep 18th, 2008, 11:56 AM.

  • #2
    Is this using SAAJ or Axiom?

    Comment


    • #3
      Default configuration should be SAAJ.

      I really can't make it work with jre 1.5.
      BUT with jdk 1.6 I do not have any problem.

      I have got different behaviours on different configurations :
      - Windows XP + jdk1.5 + tomcat 5.5 : everything is working except SoapFaultDetail which is still null.
      - Linux + jdk1.5 + tomcat 5.5 :

      Code:
      java.lang.NoSuchMethodError: javax.xml.soap.SOAPFault.setFaultCode(Ljavax/xml/namespace/QName;)V
          at com.sun.xml.messaging.saaj.soap.impl.BodyImpl.addFault(BodyImpl.java:77)
          at com.sun.xml.messaging.saaj.soap.impl.BodyImpl.addFault(BodyImpl.java:89)
          at org.springframework.ws.soap.saaj.Saaj12Implementation.addFault(Saaj12Implementation.java:97)
          at org.springframework.ws.soap.saaj.SaajSoap11Body.addFault(SaajSoap11Body.java:55)
          at org.springframework.ws.soap.saaj.SaajSoap11Body.addClientOrSenderFault(SaajSoap11Body.java:65)
          at org.springframework.ws.soap.server.endpoint.AbstractFaultCreatingValidatingMarshallingPayloadEndpoint.onValidationErrors(AbstractFaultCreatingValidatingMarshallingPayloadEndpoint.java:168)
          at org.springframework.ws.server.endpoint.AbstractValidatingMarshallingPayloadEndpoint.onUnmarshalRequest(AbstractValidatingMarshallingPayloadEndpoint.java:83)
          at org.springframework.ws.server.endpoint.AbstractMarshallingPayloadEndpoint.invoke(AbstractMarshallingPayloadEndpoint.java:130)
          at org.springframework.ws.server.endpoint.adapter.MessageEndpointAdapter.invoke(MessageEndpointAdapter.java:41)
          at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:221)
          at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:168)
          at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88)
          at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
          at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230)
          at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
          at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      I have tried different settings, like adding xerces 2.7, xalan 2.8, saaj under tomcat/common/endorsed with Djava.endorsed.dirs too but with no success.

      As we can see, that's not the good SAAj which is used.



      I need to make it work with Tomcat 5.5 and jdk 1.5. I do not have only one application so I do not want any regression on the other ones.



      Any tip ?

      Thanks



      Guillaume

      Comment


      • #4
        Hi


        Everything is working now. As usually problems were coming from some SAAJ libraries.


        Thanks


        Guillaume

        Comment


        • #5
          How did you resolve the problem? I have same issue...

          Comment

          Working...
          X