Results 1 to 5 of 5

Thread: SoapFaultClientException - getFaultDetail always null - Bug ?

  1. #1
    Join Date
    Sep 2008
    Posts
    8

    Default 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 at 11:56 AM.

  2. #2
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Is this using SAAJ or Axiom?
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  3. #3
    Join Date
    Sep 2008
    Posts
    8

    Default

    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

  4. #4
    Join Date
    Sep 2008
    Posts
    8

    Default

    Hi


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


    Thanks


    Guillaume

  5. #5
    Join Date
    Jan 2006
    Posts
    15

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •