Hello,
I'm having problems uploading large attachments using Spring WS 2, Axiom and MTOM.
It appears that when unmarshalling the request the StaxStreamConnector is ignoring the fact that it's an MTOM attachment and still trying to buffer the attatchment as Characters.
The Stack Trace I get when performing the upload is:
I did notice that Axiom's OMXMLStreamReader has a flag isInlineMTOM which decides whether the attachment is inlined as Text, or passed back as an XOP_INCLUDE (this flag is actually deprecated, in favour of using an XOPEncodingStreamReader) should there be a way to specify the use of this type of reader within Spring, or am I missing something?!Code:java.lang.OutOfMemoryError: Requested array size exceeds VM limit at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:44) at java.lang.StringBuffer.<init>(StringBuffer.java:92) at org.apache.axiom.util.base64.Base64Utils.encode(Base64Utils.java:74) at org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java:264) at org.apache.axiom.om.impl.SwitchingWrapper.getTextFromNode(SwitchingWrapper.java:430) at org.apache.axiom.om.impl.SwitchingWrapper.getTextCharacters(SwitchingWrapper.java:409) at javax.xml.stream.util.StreamReaderDelegate.getTextCharacters(StreamReaderDelegate.java:188) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleCharacters(StAXStreamConnector.java:328) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:366) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:338) at org.springframework.oxm.jaxb.Jaxb2Marshaller.unmarshalStaxSource(Jaxb2Marshaller.java:592) at org.springframework.oxm.jaxb.Jaxb2Marshaller.unmarshal(Jaxb2Marshaller.java:578) at org.springframework.ws.support.MarshallingUtils.unmarshal(MarshallingUtils.java:62) at org.springframework.ws.server.endpoint.AbstractMarshallingPayloadEndpoint.unmarshalRequest(AbstractMarshallingPayloadEndpoint.java:145) at org.springframework.ws.server.endpoint.AbstractMarshallingPayloadEndpoint.invoke(AbstractMarshallingPayloadEndpoint.java:131) at org.springframework.ws.server.endpoint.adapter.MessageEndpointAdapter.invoke(MessageEndpointAdapter.java:41) at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:230) at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:172) 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:222) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
Thanks in advance for any pointers you can provide,
Chris


Reply With Quote
