Hi Dobri, My understanding of MTOM was that the server side had to also support it, and I have no control on server side.
Also, the stub code generated by AXIS2 gives me a getMimecontent String method which as you can imagine will result in an Out of Memory for large content, so I am going deeper into the generated code, and trying to get the MimeContent element I want, and return an InputStream from the char[] array.... anyway that is the plan :( Thank you so much for the response, its always nice to get some feedback when your hitting walls. Cheers Andrew On Mon, May 18, 2009 at 6:37 PM, Dobri Kitipov <[email protected] > wrote: > Hi Andrew, > I think that it will be useful to make use of MTOM for your case [1]. > There is a parameter that you can configure and cache your large date into > a temp directory [2]. > > Hope this helps. > > Regards, > Dobri > > > [1] http://ws.apache.org/axis2/1_0/mtom-guide.html > [2] http://ws.apache.org/axis2/1_0/mtom-guide.html#41 > > > > On Mon, May 18, 2009 at 10:10 AM, Andrew Bruno <[email protected]>wrote: > >> or.. >> >> How can I create my own parser to return an InputStream for only the >> content that is inside the MimeContent tag? >> >> <xml-fragment xmlns:m=" >> http://schemas.microsoft.com/exchange/services/2006/messages" >> xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" >> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >> <m:ResponseMessages> >> <m:GetItemResponseMessage ResponseClass="Success"> >> <m:ResponseCode>NoError</m:ResponseCode> >> <m:Items> >> <t:Message> >> <t:MimeContent CharacterSet="UTF-8">*RnJvbTogTGVlIF..... large >> mime base64 encoded email....*. >> >> >> Sample generated/modified code: >> >> .... >> >> //execute the operation client >> _operationClient.execute(true); >> >> org.apache.axis2.context.MessageContext _returnMessageContext = >> _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE); >> org.apache.axiom.soap.SOAPEnvelope _returnEnv = >> _returnMessageContext.getEnvelope(); >> OMElement firstElement = _returnEnv.getBody().getFirstElement(); >> >> Map envelopeNameSpaces = getEnvelopeNamespaces(_returnEnv); >> >> XMLStreamReader xsr = firstElement.getXMLStreamReader(); >> >> org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse(xsr, >> GetItemResponseDocument.type, xmlOptions); //Can I create my own? >> >> Is implementing my own parser the way to go? >> >> >> >
