Back Forum Reply New

Possible for SAAJ not to use SAX?

.apache.xerces.internal.jaxp.SAXParserImpl.lt;initgt;(SAXParserImpl.java:124)       at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:98)       at com.sun.xml.messaging.saaj.util.ParserPool.get(ParserPool.java:61)       at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:78)       at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:71)       at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:125)       at org..ws.soap.saaj.Saaj13Implementation.getEnvelope(Saaj13Implementation.java:145)       at org..ws.soap.saaj.SaajSoapMessage.getEnvelope(SaajSoapMessage.java:84)       at org..ws.soap.AbstractSoapMessage.getSoapBody(AbstractSoapMessage.java:35)       at org..ws.soap.AbstractSoapMessage.getPayloadSource(AbstractSoapMessage.java:49)       at org..ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping.getMessagePayloadElement(PayloadRootQNameEndpointMapping.java:63)       at org..ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping.resolveQName(PayloadRootQNameEndpointMapping.java:56)       at org..ws.server.endpoint.mapping.AbstractQNameEndpointMapping.getLookupKeyForMessage(AbstractQNameEndpointMapping.java:32)       at org..ws.server.endpoint.mapping.AbstractMapBasedEndpointMapping.getEndpointInternal(AbstractMapBasedEndpointMapping.java:107)       at org..ws.server.endpoint.mapping.AbstractEndpointMapping.getEndpoint(AbstractEndpointMapping.java:86)       at org..ws.server.MessageDispatcher.getEndpoint(MessageDispatcher.java:232)       at org..ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:185)       at org..ws.server.MessageDispatcher.receive(MessageDispatcher.java:166)       at org..ws.transport.support.WebServiceMessageReceiverObjectSupport.handle(WebServiceMessageReceiverObjectSupport.java:78)       at org..ws.transport.from.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:60)       at org..web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)       at org..web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)       at org..web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:386)       at org..web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:355)       at javax.servlet.from.fromServlet.service(fromServlet.java:709)
...
Originally Posted by jasSo, I thought I'd try JiBX with Stax to do the marshalling for the endpoint. But, the exception occurs while the SOAP envelope is being processed and is not endpoint specific. Is there a way to have SAAJ use a different parser implementation?  

No, SAAJ is based on DOM, and DOM uses SAX to parse.Originally Posted by jasIs it possible for Spring WS to use something other than SAAJ?  I see a reference to Axiom, and I'll track that down. But, if that ends up using the same SAXParserFactory found in xercesImpl.jar, then that will end badly as well.  

Yes. Just replace the SaajSoapMessageFactory with an AxiomSoapMessageFactoty, and everything should be fine. Axiom uses StAX, not SAX, so this could solve your problems.


Originally Posted by jasSo, I thought I'd try JiBX with Stax to do the marshalling for the endpoint. But, the exception occurs while the SOAP envelope is being processed and is not endpoint specific. Is there a way to have SAAJ use a different parser implementation?  

No, SAAJ is based on DOM, and DOM uses SAX to parse.Originally Posted by jasIs it possible for Spring WS to use something other than SAAJ?  I see a reference to Axiom, and I'll track that down. But, if that ends up using the same SAXParserFactory found in xercesImpl.jar, then that will end badly as well.  

Yes. Just replace the SaajSoapMessageFactory with an AxiomSoapMessageFactoty, and everything should be fine. Axiom uses StAX, not SAX, so this could solve your problems.

Arjen:

Thanks for much for pointing out AxiomSoapMessageFactory.  It seems to be doing the trick.

Cheers,

Jeff
¥
Back Forum Reply New