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

Make sure AbstractStaxEndpoint checks whether a StaxSource is used

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 M1
    • Fix Version/s: 1.0 M2
    • Component/s: Core
    • Labels:
      None

      Description

      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.

        Activity

        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        This is fixed in subversion.

        Show
        arjen.poutsma Arjen Poutsma added a comment - This is fixed in subversion.

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            arjen.poutsma Arjen Poutsma
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: