Results 1 to 5 of 5

Thread: Axiom exception with inline comments in the SOAP request

  1. #1
    Join Date
    Mar 2008
    Posts
    2

    Default Axiom exception with inline comments in the SOAP request

    We are developing a web service with Axiom as the message factory, but we see strange Axiom exception being thrown with inline comments. Why is Axiom throwing exception in WebSphere 6.1 when a SOAP message contains an inline comment? If the comment occurs after the soap envelop, the request works properly in Axiom. But any inline comment would cause Axiom message factory to throw exception.

    The same request worked with DomPOX but not with AXIOM as the message factory. I provided the actual request and websphere log below.

    Please help.

    Request Message:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://schemas.wsgc.com/inventory/definitions/v1">
    <soapenv:Header/>
    <soapenv:Body>
    <v1:FindInventoryRequest>
    <v1:ApplicationArea>
    <v1:RequestInfo>
    <v1:UserID>String</v1:UserID>
    <v1:UserRoles>String</v1:UserRoles>
    </v1:RequestInfo>
    <v1:MessageInfo>
    <v1:MessageID>String</v1:MessageID>
    <v1:CorrelationID>String</v1:CorrelationID>
    <v1:MessageEncoding>String</v1:MessageEncoding>
    </v1:MessageInfo>
    <v1:TimeStamp>2001-12-17T09:30:47.0Z</v1:TimeStamp>
    <v1:QOS>
    <v1eliveryMode>String</v1eliveryMode>
    <v1:ExpirationDate>2001-12-17T09:30:47.0Z</v1:ExpirationDate>
    <v1:Priority>0</v1:Priority>
    <v1:ReplyTo>String</v1:ReplyTo>
    </v1:QOS>
    <v1:StatusInfo>
    <v1:StatusCode>ssss</v1:StatusCode>
    <v1:StatusMessage>String</v1:StatusMessage>
    <v1:StatusDescription>String</v1:StatusDescription>
    </v1:StatusInfo>
    </v1:ApplicationArea>
    <v1ataArea>
    <v1:FindItemAvailability>
    <!-- <v1:ConceptCode>WH</v1:ConceptCode> -->
    <v1:Items>
    <v1:Item>
    <v1:ItemID>WH_SER_NORM_ITEM1</v1:ItemID>
    <v1:Quantity>4</v1:Quantity>
    </v1:Item>
    </v1:Items>
    </v1:FindItemAvailability>
    </v1ataArea>
    </v1:FindInventoryRequest>
    </soapenv:Body>
    </soapenv:Envelope>


    WebSphere Log:

    [3/17/08 15:36:51:769 PDT] 00000026 SystemOut O 2008-03-17 15:36:51,769 WARN [org.springframework.ws.soap.server.SoapMessageDisp atcher] - Endpoint invocation resulted in exception - responding with SOAP Fault
    java.lang.ClassCastException: org.apache.axiom.om.impl.llom.OMCommentImpl incompatible with org.apache.axiom.om.OMText
    at org.apache.axiom.om.impl.llom.OMStAXWrapper.getTex tCharacters(OMStAXWrapper.java:349)
    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.AbstractStaxXmlRead er.parse(AbstractStaxXmlReader.java:128)
    at org.springframework.xml.stream.AbstractStaxXmlRead er.parse(AbstractStaxXmlReader.java:111)
    at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:484)
    at org.springframework.ws.server.endpoint.AbstractLog gingInterceptor.logMessageSource(AbstractLoggingIn terceptor.java:102)
    at org.springframework.ws.server.endpoint.AbstractLog gingInterceptor.handleRequest(AbstractLoggingInter ceptor.java:66)
    at org.springframework.ws.server.MessageDispatcher.di spatch(MessageDispatcher.java:208)
    at org.springframework.ws.server.MessageDispatcher.re ceive(MessageDispatcher.java:163)
    at org.springframework.ws.transport.support.WebServic eMessageReceiverObjectSupport.handleConnection(Web ServiceMessageReceiverObjectSupport.java:88)
    at org.springframework.ws.transport.http.WebServiceMe ssageReceiverHandlerAdapter.handle(WebServiceMessa geReceiverHandlerAdapter.java:57)
    at org.springframework.ws.transport.http.MessageDispa tcherServlet.doService(MessageDispatcherServlet.ja va:197)
    at com.wsgc.services.ws.servlet.WSGCMessageDispatcher Servlet.doService(WSGCMessageDispatcherServlet.jav a:161)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:476)
    at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:441)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:989)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java:501)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.h andleRequest(ServletWrapper.java:464)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrappe r.handleRequest(CacheServletWrapper.java:90)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java:744)
    at com.ibm.ws.wswebcontainer.WebContainer.handleReque st(WebContainer.java:1455)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.read y(WCChannelLink.java:113)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpInboundLink.java:454)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewInformation(HttpInboundLink.java:383)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.ready(HttpInboundLink.java:263)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.sendToDiscriminators(NewConnectionIniti alReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.complete(NewConnectionInitialReadCallba ck.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListe ner.futureCompleted(AioReadCompletionListener.java :165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallbac k(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletion Actions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture .java:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHand ler.java:195)
    at com.ibm.io.async.ResultHandler.runEventProcessingL oop(ResultHandler.java:743)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler .java:873)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1469)

  2. #2
    Join Date
    Mar 2008
    Posts
    2

    Unhappy Please advise.

    Have you experience the same issue?

  3. #3
    Join Date
    Sep 2004
    Location
    Christchurch, New Zealand
    Posts
    73

    Default

    I have also encounter this, is is cause by a bug in Axiom, see:

    https://issues.apache.org/jira/browse/WSCOMMONS-340

  4. #4
    Join Date
    Jun 2007
    Location
    Basel
    Posts
    5

    Default

    Is there a way in spring-ws to remove the comments from an incoming request, when using axiom?

  5. #5
    Join Date
    Sep 2004
    Location
    Christchurch, New Zealand
    Posts
    73

    Default

    You could use one of these if an XSLT tranform can remove comments:

    http://static.springframework.org/sp...terceptor.html

    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •