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

Error using AxiomSoapMessageFactory with comments in request

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.5
    • Fix Version/s: 1.5.1
    • Component/s: None
    • Labels:
      None

      Description

      While attempting to test my webservice using Soap UI, I sent a request that included XML comments, and I got the following error:

      org.apache.axiom.om.impl.llom.OMCommentImpl cannot be cast to org.apache.axiom.om.OMText

        Activity

        jrduncans Stephen Duncan Jr created issue -
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Could you supply the full stack trace?

        Show
        arjen.poutsma Arjen Poutsma added a comment - Could you supply the full stack trace?
        Hide
        jrduncans Stephen Duncan Jr added a comment -

        As you might guess, this happens when the comment is inside an expected text node; it did not occur when I placed a comment between two elements. Here is the stack trace:

        java.lang.ClassCastException: org.apache.axiom.om.impl.llom.OMCommentImpl cannot be cast to org.apache.axiom.om.OMText
        at org.apache.axiom.om.impl.llom.OMStAXWrapper.getTextCharacters(OMStAXWrapper.java:403)
        at org.springframework.xml.stream.StaxStreamXmlReader.handleComment(StaxStreamXmlReader.java:193)
        at org.springframework.xml.stream.StaxStreamXmlReader.parseInternal(StaxStreamXmlReader.java:103)
        at org.springframework.xml.stream.AbstractStaxXmlReader.parse(AbstractStaxXmlReader.java:128)
        at org.springframework.xml.stream.AbstractStaxXmlReader.parse(AbstractStaxXmlReader.java:111)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:637)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:708)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
        at org.springframework.ws.server.endpoint.AbstractLoggingInterceptor.logMessageSource(AbstractLoggingInterceptor.java:125)
        at org.springframework.ws.server.endpoint.AbstractLoggingInterceptor.handleRequest(AbstractLoggingInterceptor.java:89)
        at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:208)
        at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:163)
        at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88)
        at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
        at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:197)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:463)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

        Show
        jrduncans Stephen Duncan Jr added a comment - As you might guess, this happens when the comment is inside an expected text node; it did not occur when I placed a comment between two elements. Here is the stack trace: java.lang.ClassCastException: org.apache.axiom.om.impl.llom.OMCommentImpl cannot be cast to org.apache.axiom.om.OMText at org.apache.axiom.om.impl.llom.OMStAXWrapper.getTextCharacters(OMStAXWrapper.java:403) at org.springframework.xml.stream.StaxStreamXmlReader.handleComment(StaxStreamXmlReader.java:193) at org.springframework.xml.stream.StaxStreamXmlReader.parseInternal(StaxStreamXmlReader.java:103) at org.springframework.xml.stream.AbstractStaxXmlReader.parse(AbstractStaxXmlReader.java:128) at org.springframework.xml.stream.AbstractStaxXmlReader.parse(AbstractStaxXmlReader.java:111) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:637) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:708) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313) at org.springframework.ws.server.endpoint.AbstractLoggingInterceptor.logMessageSource(AbstractLoggingInterceptor.java:125) at org.springframework.ws.server.endpoint.AbstractLoggingInterceptor.handleRequest(AbstractLoggingInterceptor.java:89) at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:208) at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:163) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:197) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:463) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
        arjen.poutsma Arjen Poutsma made changes -
        Field Original Value New Value
        Fix Version/s 1.5.1 [ 10917 ]
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        This is actually a bug in Axiom, not Spring-WS. Calling getTextCharacters() on a comment node is perfectly legal, according to the XMLStreamReader spec (https://java.sun.com/webservices/docs/1.5/api/javax/xml/stream/XMLStreamReader.html).

        You can create an Axiom issue here: http://issues.apache.org/jira/browse/WSCOMMONS.

        Show
        arjen.poutsma Arjen Poutsma added a comment - This is actually a bug in Axiom, not Spring-WS. Calling getTextCharacters() on a comment node is perfectly legal, according to the XMLStreamReader spec ( https://java.sun.com/webservices/docs/1.5/api/javax/xml/stream/XMLStreamReader.html ). You can create an Axiom issue here: http://issues.apache.org/jira/browse/WSCOMMONS .
        arjen.poutsma Arjen Poutsma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing issues for 1.5.1

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing issues for 1.5.1
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Show
        candrews Craig added a comment - https://issues.apache.org/jira/browse/WSCOMMONS-393
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        7h 41m 1 Arjen Poutsma 02/May/08 9:00 AM
        Resolved Resolved Closed Closed
        3d 12h 20m 1 Arjen Poutsma 05/May/08 9:21 PM

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            jrduncans Stephen Duncan Jr
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: