[SWS-569] Refactored SaajSoapMessage getImplementation() method hides root cause problems Created: 16/Sep/09  Updated: 04/May/12  Resolved: 10/Nov/09

Status: Closed
Project: Spring Web Services
Component/s: None
Affects Version/s: 1.5.8
Fix Version/s: 1.5.9

Type: Bug Priority: Major
Reporter: Kenny MacLeod Assignee: Arjen Poutsma
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SWS-560 IllegalStateException: Could not find... Closed

 Description   

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.



 Comments   
Comment by Arjen Poutsma [ 16/Sep/09 ]

That is unfortunate, we will try and fix this for 1.5.9.

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Mon Dec 18 22:20:55 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.