Skip to content

Make sure AbstractStaxEndpoint checks whether a StaxSource is used [SWS-38] #198

Closed
@gregturn

Description

@gregturn

Arjen Poutsma opened SWS-38 and commented

From the forum:

i want to use Stax based parsing of my soap messages. So i changed the messageContextFactory to AxiomSoapMessageContextFactory and derived my endpoint class from AbstractStaxEventPayloadEndpoint.
My implementation of invokeInternal just contains logging code at the moment. When i run a webservice call from a client i get the following exception:

2006-06-28 15:05:51,273 WARN [org.springframework.ws.soap.SoapMessageDispatcher] - <Endpoint invocation resulted in exception - responding with SOAP Fault>
javax.xml.stream.XMLStreamException: Can only create STaX reader for a SAXSource if Reader or InputStream exposed via getSource(); can not use other sources (like embedded SAX readers)
at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxIn putFactory.java:729)
at com.ctc.wstx.stax.WstxInputFactory.createXMLEventR eader(WstxInputFactory.java:276)
at org.springframework.ws.endpoint.AbstractStaxEventP ayloadEndpoint.invoke(AbstractStaxEventPayloadEndp oint.java:66)
at org.springframework.ws.endpoint.MessageEndpointAda pter.invoke(MessageEndpointAdapter.java:32)
at org.springframework.ws.MessageDispatcher.dispatch( MessageDispatcher.java:247)
at org.springframework.ws.MessageDispatcher.invoke(Me ssageDispatcher.java:209)
at org.springframework.ws.transport.http.MessageHandl erAdapter.handle(MessageHandlerAdapter.java:57)
at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:723)
...

This is due to the fact that the AbstractStaxPayload doesn't check whether is has been passed a StaxSource. Should be easy to fix.


Affects: 1.0 M1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions