Error using AxiomSoapMessageFactory with comments in request
------------------------------------------------------------

                 Key: WSCOMMONS-393
                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-393
             Project: WS-Commons
          Issue Type: Bug
          Components: AXIOM
            Reporter: Craig


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

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) 

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).

Original issue reported at Spring-WS: 
http://jira.springframework.org/browse/SWS-347

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to