Announcement Announcement Module
Collapse
No announcement yet.
Using AxiomSoapMessageFactory under Java 6 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using AxiomSoapMessageFactory under Java 6

    I'm trying to switch from SaajSoapMessageFactory to AxiomSoapMessageFactory to take advantage of the streaming capabilities it offers. But when I switch I'm getting a CCE when calling peek() on the XMLEventReader passed to me in my endpoint:


    java.lang.ClassCastException: org.apache.axiom.util.namespace.MapBasedNamespaceC ontext cannot be cast to com.sun.org.apache.xerces.internal.util.NamespaceC ontextWrapper
    at com.sun.xml.internal.stream.events.XMLEventAllocat orImpl.setNamespaceContext(XMLEventAllocatorImpl.j ava:250)
    at com.sun.xml.internal.stream.events.XMLEventAllocat orImpl.getXMLEvent(XMLEventAllocatorImpl.java:84)
    at com.sun.xml.internal.stream.events.XMLEventAllocat orImpl.allocate(XMLEventAllocatorImpl.java:55)
    at com.sun.xml.internal.stream.XMLEventReaderImpl.pee k(XMLEventReaderImpl.java:276)
    at com.foo.bar.apiserver.soap.SOAPStaxEventPayLoadEnd point.invokeInternal(SOAPStaxEventPayLoadEndPoint. java:142)
    at org.springframework.ws.server.endpoint.AbstractSta xEventPayloadEndpoint.invoke(AbstractStaxEventPayl oadEndpoint.java:57)
    at org.springframework.ws.server.endpoint.adapter.Mes sageEndpointAdapter.invoke(MessageEndpointAdapter. java:41)
    at org.springframework.ws.server.MessageDispatcher.di spatch(MessageDispatcher.java:228)
    at org.springframework.ws.server.MessageDispatcher.re ceive(MessageDispatcher.java:170)
    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.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:774)


    Obviously there's some conflict between Axiom and the JDKs StAX implementation, but I'm not sure how to solve it. Any ideas?

  • #2
    I managed to fix this error by adding Woodstox to the CP, but now I'm getting a different exception:

    java.lang.ClassCastException: com.ctc.wstx.evt.WNamespace cannot be cast to java.lang.String
    at com.sun.org.apache.xalan.internal.xsltc.trax.Trans formerImpl.transform(TransformerImpl.java:716)
    at com.sun.org.apache.xalan.internal.xsltc.trax.Trans formerImpl.transform(TransformerImpl.java:313)
    at com.foo.bar.apiserver.soap.SOAPExceptionResolver.r esolveExceptionInternal(SOAPExceptionResolver.java :91)

    Comment

    Working...
    X