axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dobri Kitipov <kdobrik.ax...@googlemail.com>
Subject Re: Large Web Services responses - how do you deal with them?
Date Mon, 18 May 2009 08:37:15 GMT
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 <andrew.bruno@gmail.com>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?
>
>
>

Mime
View raw message