0 Replies Latest reply on Jan 19, 2010 9:57 PM by marcelcasado

    Problem  in CXF endpoint with MTOM enabled and exposed on the NMR - FUSE 4

    marcelcasado

      Hi,

       

      I'm exposing a CXF endpoint on the NMR with MTOM enabled in a OSGI bundle:

       

       

       

       

      When I send SOAP messages to test the service I got this exception when the response is passed from the CXF to the NMR. It happens for responses hat has MTOM attachments and responses that does not :

       

      19:13:31,773 | ERROR | .wcs1.1-thread-2 | NMRDestinationOutputStream       | apache.cxf.io.CachedOutputStream  177 | error sending Out message

      org.xml.sax.SAXParseException: Content is not allowed in prolog.

           at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:285)

           at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:320)

           at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:110)

           at org.apache.servicemix.cxf.transport.nmr.NMRDestinationOutputStream.commitOutputMessage(NMRDestinationOutputStream.java:77)

           at org.apache.servicemix.cxf.transport.nmr.NMRDestinationOutputStream.doClose(NMRDestinationOutputStream.java:59)

           at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:177)

           at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)

           at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)

           at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)

           at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:74)

           at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)

           at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89)

           at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:116)

           at org.apache.servicemix.nmr.core.InternalEndpointWrapper.process(InternalEndpointWrapper.java:86)

           at org.apache.servicemix.nmr.core.ChannelImpl.process(ChannelImpl.java:255)

           at org.apache.servicemix.nmr.core.ChannelImpl$1.run(ChannelImpl.java:215)

           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

           at java.lang.Thread.run(Thread.java:637)

       

       

       

      Seems that the CXF-NMR transport support does not support MOTM. If I turn off MTOM then works fine. The web service worked fine with a CXF http endpoint.

       

      Is this a well known problem with CXF-NMR ? Is there a workaround to get this working?

       

      Thanks,

       

      -Marcel