Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-569

Refactored SaajSoapMessage getImplementation() method hides root cause problems


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.5.8
    • Fix Version/s: 1.5.9
    • Component/s: None
    • Labels:


      Under 1.5.7, I have a problematic web service that causes the following exception to be thrown from WebServiceTemplate (stack trace edited for brevity):
      org.springframework.ws.soap.saaj.SaajSoapEnvelopeException: Could not access envelope: Unable to create envelope from given source: ; nested exception is com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
      at org.springframework.ws.soap.saaj.SaajSoapMessage.getEnvelope(SaajSoapMessage.java:107)
      Caused by: javax.xml.transform.TransformerException: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
      at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:449)
      at com.sun.xml.messaging.saaj.util.transform.EfficientStreamingTransformer.transform(EfficientStreamingTransformer.java:411)
      at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:113)
      ... 35 more
      Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
      at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:322)
      at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1020)

      This exception, while annoying, contains enough information to get on with.

      Under 1.5.8, however, the changes to SaajSoapMessage mean that all I get is:

      java.lang.IllegalStateException: Could not find SAAJ on the classpath
      at org.springframework.ws.soap.saaj.SaajSoapMessage.getImplementation(SaajSoapMessage.java:261)
      at org.springframework.ws.soap.saaj.SaajSoapMessage.<init>(SaajSoapMessage.java:84)
      at org.springframework.ws.soap.saaj.SaajSoapMessage.<init>(SaajSoapMessage.java:70)
      at org.springframework.ws.soap.saaj.SaajSoapMessageFactory.createWebServiceMessage(SaajSoapMessageFactory.java:168)

      This is a weird side-effect, since several prior web service calls have been made without a problem. It's very difficult to reproduce reliably since 1.5.8 is hiding a lot behid the scenes when building this message.

        Issue Links


          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          54d 20h 20m 1 Arjen Poutsma 10/Nov/09 12:52 AM
          Resolved Resolved Closed Closed
          906d 6h 11m 1 Arjen Poutsma 04/May/12 7:03 AM


            • Assignee:
              arjen.poutsma Arjen Poutsma
              skaffman Kenny MacLeod
            • Votes:
              1 Vote for this issue
              1 Start watching this issue


              • Created: