You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Vishwal Shah <sh...@gmail.com> on 2010/05/13 17:56:36 UTC

InputStream to DataSource In Axis2

Hi,
Is there any Datasource inbuilt into Axis2 which can take Inputstream(Large
data, almost 200 megs) ? I tried using InputStreamDataSource, but for some
reason i am getting an error and i have been reading about issues using
InputStreamDatasource. Also, i am not sure if it can handle large data (the
MTOM way). Any help would be greatly appreciated



Thanks,
Vish

Re: InputStream to DataSource In Axis2

Posted by Jorge Medina <ce...@gmail.com>.
In other words, you need to create a class that implements
javax.activation.DataSource. Use PipedInputStream/PipedOutputStream to just
forward the data between the input stream received from the web application
to the web services server

On Wed, May 19, 2010 at 4:20 PM, Jorge Medina
<ce...@gmail.com>wrote:

> a) Is the server that you will call a web service able to receive SOAP
> attachments? (MTOM) I am assuming it is.
>
> b) If you use Axis2, your web services client is already able to RETRIEVE
> attachments. The generated code will look like
>                  TheResponse response =
> yourService.serviceWithAttachments(parameter1, parameter2, parameter3)
>                   InputStream  is =
> response.getDataHandler().getInputStream();
>                   ...here use the input stream to read the attachment ...
>
> c) If you use Axis2 and you want to SEND attachments, you need to enable
> the client code
>              YourServiceStub stub = new YourServiceStub("http://your.url/
> ");
>               Options options = stub._getServiceClient().getOptions();
>               options.setProperty( Constants.Configuration.ENABLE_MTOM,
> Constants.VALUE_TRUE);
>
>  and then you will need to implement a DataSource and set it in your
> request object.
> Since you want to just forward the request, you may want to use
> PipedInputStream/PipedOutputStream in your DataSource implementation
>
>
>
>
> On Wed, May 19, 2010 at 4:07 PM, Vishwal Shah <sh...@gmail.com>wrote:
>
>> Any suggestions ? Its very urgent ?
>>
>>
>>
>> On Wed, May 19, 2010 at 8:24 AM, Vishwal Shah <sh...@gmail.com>wrote:
>>
>>> Hi Martin,
>>>
>>> Thanks for the response.I checked and can't do the rest as rest is
>>> disabled and for reasons it can't be enabled.
>>> I am stuck right now on converting from InputStream to DataHandler itself
>>> running out of memory. The Only Class that could handle that data was the
>>> InputStreamDataSource that i had mentioned earlier in this thread , but that
>>> throws the *End of Prolog WSTX *Exception.
>>>
>>> Is there any API that can help me convert a big InputStream into a
>>> DataSource/DataHandler so that i can send it as an Attachment(MTOM) to the
>>> service ?
>>>
>>>
>>> Regards,
>>> Vish
>>>
>>>
>>>
>>> On Fri, May 14, 2010 at 11:48 AM, Martin Gainty <mg...@hotmail.com>wrote:
>>>
>>>>  //its possible this content type should be processed as REST .. check
>>>> to see if your content type is
>>>>      * 1. application/xml
>>>>      * 2. application/x-www-form-urlencoded
>>>>      * 3. multipart/form-data
>>>>
>>>> //also check the disableRest parameter in axis2.xml is disabled e.g. so
>>>> you can use RESTprocessing
>>>>     <!-- Following parameter will completely disable REST handling in
>>>> Axis2-->
>>>>     <parameter name="disableREST" locked="false">false</parameter>
>>>>
>>>> //here is the processing notice SOAP content-types are either
>>>> application/soap+xml or text/xml
>>>>         if (contentType != null) {
>>>>             if
>>>> (contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE) > -1) {
>>>> //application/soap+xml
>>>>                 soapVersion = VERSION_SOAP12;
>>>>                 TransportUtils.processContentTypeForAction(contentType,
>>>> msgContext);
>>>>             } else if (contentType
>>>>                     .indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1)
>>>> {       //text/xml
>>>>                 soapVersion = VERSION_SOAP11;
>>>>             } else if (isRESTRequest(contentType)) {
>>>>                 // If REST, construct a SOAP11 envelope to hold the rest
>>>> message and
>>>>                 // indicate that this is a REST message.
>>>>                 soapVersion = VERSION_SOAP11;
>>>>                 msgContext.setDoingREST(true);
>>>>             }
>>>>
>>>> ?
>>>> Martin Gainty
>>>> ______________________________________________
>>>> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>>>>
>>>>
>>>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>>>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
>>>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
>>>> dient lediglich dem Austausch von Informationen und entfaltet keine
>>>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>>>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>>>
>>>> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------
>>>> Date: Fri, 14 May 2010 10:17:21 -0700
>>>>
>>>> Subject: Re: InputStream to DataSource In Axis2
>>>> From: shahvishwal@gmail.com
>>>> To: java-user@axis.apache.org
>>>>
>>>> Hi,
>>>> My Application receives a Http Post from another web application which
>>>> sends ~150mgs of data, i need to take that data and create a DataHandler
>>>> (MTOM) and make a webservice call to another webapp. Its kind of pass
>>>> through. i cannot copy that data onto any drive, it needs to create a
>>>> DataHandler from the inputstream received from HttpRequest. I tried using
>>>>
>>>> import org.apache.axis2.builder.unknowncontent.InputStreamDataSource;
>>>>
>>>> InputStreamDataSource ds = new
>>>> InputStreamDataSource(request.getInputStream());
>>>> DataHandler dh = new DatHandler(ds);
>>>>
>>>> This doesn't seem to be working for me.
>>>>
>>>>
>>>> Thanks,
>>>> Vish
>>>>
>>>>
>>>>
>>>> On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mg...@hotmail.com>wrote:
>>>>
>>>> the most prevelant input source is OMSource which extends
>>>> org.xml.sax.InputSource defined here:
>>>>
>>>> package org.apache.axiom.om.impl.jaxp;
>>>> import javax.xml.transform.sax.SAXSource;
>>>> import org.apache.axiom.om.OMElement;
>>>> import org.apache.axiom.om.impl.serialize.OMXMLReader;
>>>> import org.xml.sax.InputSource;
>>>>
>>>> /**
>>>>  * Implementation of {@link javax.xml.transform.Source} for AXIOM.
>>>>  * The implementation is based on {@link SAXSource} and directly
>>>> transforms an AXIOM
>>>>  * tree into a stream of SAX events using {@link OMXMLReader}.
>>>>  * <p>
>>>>  * Note that {@link org.apache.axiom.om.OMDocType} nodes are not
>>>> supported and will be
>>>>  * silently skipped.
>>>>  */
>>>> public class OMSource extends SAXSource {
>>>>     public OMSource(OMElement element) {
>>>>         super(new OMXMLReader(element), new InputSource());
>>>>     }
>>>> }
>>>>
>>>> perhaps if you could display your definition(s) of InputStreamDatasource
>>>> class
>>>> we could better suggest an implementation which will accomodate your
>>>> needs
>>>>
>>>> Martin
>>>> ______________________________________________
>>>> Verzicht und Vertraulichkeitanmerkung
>>>>
>>>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>>>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
>>>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
>>>> dient lediglich dem Austausch von Informationen und entfaltet keine
>>>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>>>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------
>>>> Date: Thu, 13 May 2010 12:01:41 -0700
>>>> Subject: Re: InputStream to DataSource In Axis2
>>>> From: shahvishwal@gmail.com
>>>> To: java-user@axis.apache.org
>>>>
>>>>
>>>> Anyone? Any help would be greatly appreciated. i cant write it to a
>>>> drive, it has to be an in memory conversion.
>>>>
>>>>
>>>> -Vish
>>>>
>>>> On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <sh...@gmail.com>wrote:
>>>>
>>>> Hi,
>>>> Is there any Datasource inbuilt into Axis2 which can take
>>>> Inputstream(Large data, almost 200 megs) ? I tried using
>>>> InputStreamDataSource, but for some reason i am getting an error and i have
>>>> been reading about issues using InputStreamDatasource. Also, i am not sure
>>>> if it can handle large data (the MTOM way). Any help would be greatly
>>>> appreciated
>>>>
>>>>
>>>>
>>>> Thanks,
>>>> Vish
>>>>
>>>>
>>>>
>>>>  ------------------------------
>>>> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars
>>>> with Hotmail. Get busy.<http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5>
>>>>
>>>>
>>>>
>>>> ------------------------------
>>>> Hotmail has tools for the New Busy. Search, chat and e-mail from your
>>>> inbox. Learn more.<http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1>
>>>>
>>>
>>>
>>
>

Re: InputStream to DataSource In Axis2

Posted by Jorge Medina <ce...@gmail.com>.
a) Is the server that you will call a web service able to receive SOAP
attachments? (MTOM) I am assuming it is.

b) If you use Axis2, your web services client is already able to RETRIEVE
attachments. The generated code will look like
                 TheResponse response =
yourService.serviceWithAttachments(parameter1, parameter2, parameter3)
                  InputStream  is =
response.getDataHandler().getInputStream();
                  ...here use the input stream to read the attachment ...

c) If you use Axis2 and you want to SEND attachments, you need to enable the
client code
             YourServiceStub stub = new YourServiceStub("http://your.url/");
              Options options = stub._getServiceClient().getOptions();
              options.setProperty( Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_TRUE);

 and then you will need to implement a DataSource and set it in your request
object.
Since you want to just forward the request, you may want to use
PipedInputStream/PipedOutputStream in your DataSource implementation



On Wed, May 19, 2010 at 4:07 PM, Vishwal Shah <sh...@gmail.com> wrote:

> Any suggestions ? Its very urgent ?
>
>
>
> On Wed, May 19, 2010 at 8:24 AM, Vishwal Shah <sh...@gmail.com>wrote:
>
>> Hi Martin,
>>
>> Thanks for the response.I checked and can't do the rest as rest is
>> disabled and for reasons it can't be enabled.
>> I am stuck right now on converting from InputStream to DataHandler itself
>> running out of memory. The Only Class that could handle that data was the
>> InputStreamDataSource that i had mentioned earlier in this thread , but that
>> throws the *End of Prolog WSTX *Exception.
>>
>> Is there any API that can help me convert a big InputStream into a
>> DataSource/DataHandler so that i can send it as an Attachment(MTOM) to the
>> service ?
>>
>>
>> Regards,
>> Vish
>>
>>
>>
>> On Fri, May 14, 2010 at 11:48 AM, Martin Gainty <mg...@hotmail.com>wrote:
>>
>>>  //its possible this content type should be processed as REST .. check to
>>> see if your content type is
>>>      * 1. application/xml
>>>      * 2. application/x-www-form-urlencoded
>>>      * 3. multipart/form-data
>>>
>>> //also check the disableRest parameter in axis2.xml is disabled e.g. so
>>> you can use RESTprocessing
>>>     <!-- Following parameter will completely disable REST handling in
>>> Axis2-->
>>>     <parameter name="disableREST" locked="false">false</parameter>
>>>
>>> //here is the processing notice SOAP content-types are either
>>> application/soap+xml or text/xml
>>>         if (contentType != null) {
>>>             if (contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE)
>>> > -1) { //application/soap+xml
>>>                 soapVersion = VERSION_SOAP12;
>>>                 TransportUtils.processContentTypeForAction(contentType,
>>> msgContext);
>>>             } else if (contentType
>>>                     .indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1)
>>> {       //text/xml
>>>                 soapVersion = VERSION_SOAP11;
>>>             } else if (isRESTRequest(contentType)) {
>>>                 // If REST, construct a SOAP11 envelope to hold the rest
>>> message and
>>>                 // indicate that this is a REST message.
>>>                 soapVersion = VERSION_SOAP11;
>>>                 msgContext.setDoingREST(true);
>>>             }
>>>
>>> ?
>>> Martin Gainty
>>> ______________________________________________
>>> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>>>
>>>
>>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
>>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
>>> dient lediglich dem Austausch von Informationen und entfaltet keine
>>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>>
>>> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------
>>> Date: Fri, 14 May 2010 10:17:21 -0700
>>>
>>> Subject: Re: InputStream to DataSource In Axis2
>>> From: shahvishwal@gmail.com
>>> To: java-user@axis.apache.org
>>>
>>> Hi,
>>> My Application receives a Http Post from another web application which
>>> sends ~150mgs of data, i need to take that data and create a DataHandler
>>> (MTOM) and make a webservice call to another webapp. Its kind of pass
>>> through. i cannot copy that data onto any drive, it needs to create a
>>> DataHandler from the inputstream received from HttpRequest. I tried using
>>>
>>> import org.apache.axis2.builder.unknowncontent.InputStreamDataSource;
>>>
>>> InputStreamDataSource ds = new
>>> InputStreamDataSource(request.getInputStream());
>>> DataHandler dh = new DatHandler(ds);
>>>
>>> This doesn't seem to be working for me.
>>>
>>>
>>> Thanks,
>>> Vish
>>>
>>>
>>>
>>> On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mg...@hotmail.com>wrote:
>>>
>>> the most prevelant input source is OMSource which extends
>>> org.xml.sax.InputSource defined here:
>>>
>>> package org.apache.axiom.om.impl.jaxp;
>>> import javax.xml.transform.sax.SAXSource;
>>> import org.apache.axiom.om.OMElement;
>>> import org.apache.axiom.om.impl.serialize.OMXMLReader;
>>> import org.xml.sax.InputSource;
>>>
>>> /**
>>>  * Implementation of {@link javax.xml.transform.Source} for AXIOM.
>>>  * The implementation is based on {@link SAXSource} and directly
>>> transforms an AXIOM
>>>  * tree into a stream of SAX events using {@link OMXMLReader}.
>>>  * <p>
>>>  * Note that {@link org.apache.axiom.om.OMDocType} nodes are not
>>> supported and will be
>>>  * silently skipped.
>>>  */
>>> public class OMSource extends SAXSource {
>>>     public OMSource(OMElement element) {
>>>         super(new OMXMLReader(element), new InputSource());
>>>     }
>>> }
>>>
>>> perhaps if you could display your definition(s) of InputStreamDatasource
>>> class
>>> we could better suggest an implementation which will accomodate your
>>> needs
>>>
>>> Martin
>>> ______________________________________________
>>> Verzicht und Vertraulichkeitanmerkung
>>>
>>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
>>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
>>> dient lediglich dem Austausch von Informationen und entfaltet keine
>>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>>
>>>
>>>
>>>
>>> ------------------------------
>>> Date: Thu, 13 May 2010 12:01:41 -0700
>>> Subject: Re: InputStream to DataSource In Axis2
>>> From: shahvishwal@gmail.com
>>> To: java-user@axis.apache.org
>>>
>>>
>>> Anyone? Any help would be greatly appreciated. i cant write it to a
>>> drive, it has to be an in memory conversion.
>>>
>>>
>>> -Vish
>>>
>>> On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <sh...@gmail.com>wrote:
>>>
>>> Hi,
>>> Is there any Datasource inbuilt into Axis2 which can take
>>> Inputstream(Large data, almost 200 megs) ? I tried using
>>> InputStreamDataSource, but for some reason i am getting an error and i have
>>> been reading about issues using InputStreamDatasource. Also, i am not sure
>>> if it can handle large data (the MTOM way). Any help would be greatly
>>> appreciated
>>>
>>>
>>>
>>> Thanks,
>>> Vish
>>>
>>>
>>>
>>>  ------------------------------
>>> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with
>>> Hotmail. Get busy.<http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5>
>>>
>>>
>>>
>>> ------------------------------
>>> Hotmail has tools for the New Busy. Search, chat and e-mail from your
>>> inbox. Learn more.<http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1>
>>>
>>
>>
>

Re: InputStream to DataSource In Axis2

Posted by Vishwal Shah <sh...@gmail.com>.
Any suggestions ? Its very urgent ?



On Wed, May 19, 2010 at 8:24 AM, Vishwal Shah <sh...@gmail.com> wrote:

> Hi Martin,
>
> Thanks for the response.I checked and can't do the rest as rest is disabled
> and for reasons it can't be enabled.
> I am stuck right now on converting from InputStream to DataHandler itself
> running out of memory. The Only Class that could handle that data was the
> InputStreamDataSource that i had mentioned earlier in this thread , but that
> throws the *End of Prolog WSTX *Exception.
>
> Is there any API that can help me convert a big InputStream into a
> DataSource/DataHandler so that i can send it as an Attachment(MTOM) to the
> service ?
>
>
> Regards,
> Vish
>
>
>
> On Fri, May 14, 2010 at 11:48 AM, Martin Gainty <mg...@hotmail.com>wrote:
>
>>  //its possible this content type should be processed as REST .. check to
>> see if your content type is
>>      * 1. application/xml
>>      * 2. application/x-www-form-urlencoded
>>      * 3. multipart/form-data
>>
>> //also check the disableRest parameter in axis2.xml is disabled e.g. so
>> you can use RESTprocessing
>>     <!-- Following parameter will completely disable REST handling in
>> Axis2-->
>>     <parameter name="disableREST" locked="false">false</parameter>
>>
>> //here is the processing notice SOAP content-types are either
>> application/soap+xml or text/xml
>>         if (contentType != null) {
>>             if (contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE)
>> > -1) { //application/soap+xml
>>                 soapVersion = VERSION_SOAP12;
>>                 TransportUtils.processContentTypeForAction(contentType,
>> msgContext);
>>             } else if (contentType
>>                     .indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1)
>> {       //text/xml
>>                 soapVersion = VERSION_SOAP11;
>>             } else if (isRESTRequest(contentType)) {
>>                 // If REST, construct a SOAP11 envelope to hold the rest
>> message and
>>                 // indicate that this is a REST message.
>>                 soapVersion = VERSION_SOAP11;
>>                 msgContext.setDoingREST(true);
>>             }
>>
>> ?
>> Martin Gainty
>> ______________________________________________
>> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>>
>>
>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
>> dient lediglich dem Austausch von Informationen und entfaltet keine
>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>
>> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>>
>>
>>
>>
>>
>>
>> ------------------------------
>> Date: Fri, 14 May 2010 10:17:21 -0700
>>
>> Subject: Re: InputStream to DataSource In Axis2
>> From: shahvishwal@gmail.com
>> To: java-user@axis.apache.org
>>
>> Hi,
>> My Application receives a Http Post from another web application which
>> sends ~150mgs of data, i need to take that data and create a DataHandler
>> (MTOM) and make a webservice call to another webapp. Its kind of pass
>> through. i cannot copy that data onto any drive, it needs to create a
>> DataHandler from the inputstream received from HttpRequest. I tried using
>>
>> import org.apache.axis2.builder.unknowncontent.InputStreamDataSource;
>>
>> InputStreamDataSource ds = new
>> InputStreamDataSource(request.getInputStream());
>> DataHandler dh = new DatHandler(ds);
>>
>> This doesn't seem to be working for me.
>>
>>
>> Thanks,
>> Vish
>>
>>
>>
>> On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mg...@hotmail.com>wrote:
>>
>> the most prevelant input source is OMSource which extends
>> org.xml.sax.InputSource defined here:
>>
>> package org.apache.axiom.om.impl.jaxp;
>> import javax.xml.transform.sax.SAXSource;
>> import org.apache.axiom.om.OMElement;
>> import org.apache.axiom.om.impl.serialize.OMXMLReader;
>> import org.xml.sax.InputSource;
>>
>> /**
>>  * Implementation of {@link javax.xml.transform.Source} for AXIOM.
>>  * The implementation is based on {@link SAXSource} and directly
>> transforms an AXIOM
>>  * tree into a stream of SAX events using {@link OMXMLReader}.
>>  * <p>
>>  * Note that {@link org.apache.axiom.om.OMDocType} nodes are not supported
>> and will be
>>  * silently skipped.
>>  */
>> public class OMSource extends SAXSource {
>>     public OMSource(OMElement element) {
>>         super(new OMXMLReader(element), new InputSource());
>>     }
>> }
>>
>> perhaps if you could display your definition(s) of InputStreamDatasource
>> class
>> we could better suggest an implementation which will accomodate your needs
>>
>> Martin
>> ______________________________________________
>> Verzicht und Vertraulichkeitanmerkung
>>
>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
>> dient lediglich dem Austausch von Informationen und entfaltet keine
>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>
>>
>>
>>
>> ------------------------------
>> Date: Thu, 13 May 2010 12:01:41 -0700
>> Subject: Re: InputStream to DataSource In Axis2
>> From: shahvishwal@gmail.com
>> To: java-user@axis.apache.org
>>
>>
>> Anyone? Any help would be greatly appreciated. i cant write it to a drive,
>> it has to be an in memory conversion.
>>
>>
>> -Vish
>>
>> On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <sh...@gmail.com>wrote:
>>
>> Hi,
>> Is there any Datasource inbuilt into Axis2 which can take
>> Inputstream(Large data, almost 200 megs) ? I tried using
>> InputStreamDataSource, but for some reason i am getting an error and i have
>> been reading about issues using InputStreamDatasource. Also, i am not sure
>> if it can handle large data (the MTOM way). Any help would be greatly
>> appreciated
>>
>>
>>
>> Thanks,
>> Vish
>>
>>
>>
>>  ------------------------------
>> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with
>> Hotmail. Get busy.<http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5>
>>
>>
>>
>> ------------------------------
>> Hotmail has tools for the New Busy. Search, chat and e-mail from your
>> inbox. Learn more.<http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1>
>>
>
>

Re: InputStream to DataSource In Axis2

Posted by Vishwal Shah <sh...@gmail.com>.
Hi Martin,

Thanks for the response.I checked and can't do the rest as rest is disabled
and for reasons it can't be enabled.
I am stuck right now on converting from InputStream to DataHandler itself
running out of memory. The Only Class that could handle that data was the
InputStreamDataSource that i had mentioned earlier in this thread , but that
throws the *End of Prolog WSTX *Exception.

Is there any API that can help me convert a big InputStream into a
DataSource/DataHandler so that i can send it as an Attachment(MTOM) to the
service ?


Regards,
Vish



On Fri, May 14, 2010 at 11:48 AM, Martin Gainty <mg...@hotmail.com> wrote:

>  //its possible this content type should be processed as REST .. check to
> see if your content type is
>      * 1. application/xml
>      * 2. application/x-www-form-urlencoded
>      * 3. multipart/form-data
>
> //also check the disableRest parameter in axis2.xml is disabled e.g. so you
> can use RESTprocessing
>     <!-- Following parameter will completely disable REST handling in
> Axis2-->
>     <parameter name="disableREST" locked="false">false</parameter>
>
> //here is the processing notice SOAP content-types are either
> application/soap+xml or text/xml
>         if (contentType != null) {
>             if (contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE) >
> -1) { //application/soap+xml
>                 soapVersion = VERSION_SOAP12;
>                 TransportUtils.processContentTypeForAction(contentType,
> msgContext);
>             } else if (contentType
>                     .indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1)
> {       //text/xml
>                 soapVersion = VERSION_SOAP11;
>             } else if (isRESTRequest(contentType)) {
>                 // If REST, construct a SOAP11 envelope to hold the rest
> message and
>                 // indicate that this is a REST message.
>                 soapVersion = VERSION_SOAP11;
>                 msgContext.setDoingREST(true);
>             }
>
> ?
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>
>
>
>
>
>
> ------------------------------
> Date: Fri, 14 May 2010 10:17:21 -0700
>
> Subject: Re: InputStream to DataSource In Axis2
> From: shahvishwal@gmail.com
> To: java-user@axis.apache.org
>
> Hi,
> My Application receives a Http Post from another web application which
> sends ~150mgs of data, i need to take that data and create a DataHandler
> (MTOM) and make a webservice call to another webapp. Its kind of pass
> through. i cannot copy that data onto any drive, it needs to create a
> DataHandler from the inputstream received from HttpRequest. I tried using
>
> import org.apache.axis2.builder.unknowncontent.InputStreamDataSource;
>
> InputStreamDataSource ds = new
> InputStreamDataSource(request.getInputStream());
> DataHandler dh = new DatHandler(ds);
>
> This doesn't seem to be working for me.
>
>
> Thanks,
> Vish
>
>
>
> On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mg...@hotmail.com>wrote:
>
> the most prevelant input source is OMSource which extends
> org.xml.sax.InputSource defined here:
>
> package org.apache.axiom.om.impl.jaxp;
> import javax.xml.transform.sax.SAXSource;
> import org.apache.axiom.om.OMElement;
> import org.apache.axiom.om.impl.serialize.OMXMLReader;
> import org.xml.sax.InputSource;
>
> /**
>  * Implementation of {@link javax.xml.transform.Source} for AXIOM.
>  * The implementation is based on {@link SAXSource} and directly transforms
> an AXIOM
>  * tree into a stream of SAX events using {@link OMXMLReader}.
>  * <p>
>  * Note that {@link org.apache.axiom.om.OMDocType} nodes are not supported
> and will be
>  * silently skipped.
>  */
> public class OMSource extends SAXSource {
>     public OMSource(OMElement element) {
>         super(new OMXMLReader(element), new InputSource());
>     }
> }
>
> perhaps if you could display your definition(s) of InputStreamDatasource
> class
> we could better suggest an implementation which will accomodate your needs
>
> Martin
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>
>
>
>
> ------------------------------
> Date: Thu, 13 May 2010 12:01:41 -0700
> Subject: Re: InputStream to DataSource In Axis2
> From: shahvishwal@gmail.com
> To: java-user@axis.apache.org
>
>
> Anyone? Any help would be greatly appreciated. i cant write it to a drive,
> it has to be an in memory conversion.
>
>
> -Vish
>
> On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <sh...@gmail.com>wrote:
>
> Hi,
> Is there any Datasource inbuilt into Axis2 which can take Inputstream(Large
> data, almost 200 megs) ? I tried using InputStreamDataSource, but for some
> reason i am getting an error and i have been reading about issues using
> InputStreamDatasource. Also, i am not sure if it can handle large data (the
> MTOM way). Any help would be greatly appreciated
>
>
>
> Thanks,
> Vish
>
>
>
>  ------------------------------
> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with
> Hotmail. Get busy.<http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5>
>
>
>
> ------------------------------
> Hotmail has tools for the New Busy. Search, chat and e-mail from your
> inbox. Learn more.<http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1>
>

RE: InputStream to DataSource In Axis2

Posted by Martin Gainty <mg...@hotmail.com>.
//its possible this content type should be processed as REST .. check to see if your content type is 

     * 1. application/xml
     * 2. application/x-www-form-urlencoded
     * 3. multipart/form-data


//also check the disableRest parameter in axis2.xml is disabled e.g. so you can use RESTprocessing 

    <!-- Following parameter will completely disable REST handling in Axis2-->
    <parameter name="disableREST" locked="false">false</parameter>

 

//here is the processing notice SOAP content-types are either application/soap+xml or text/xml
        if (contentType != null) {
            if (contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE) > -1) { //application/soap+xml
                soapVersion = VERSION_SOAP12;
                TransportUtils.processContentTypeForAction(contentType, msgContext);
            } else if (contentType
                    .indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1) {       //text/xml
                soapVersion = VERSION_SOAP11;
            } else if (isRESTRequest(contentType)) {
                // If REST, construct a SOAP11 envelope to hold the rest message and
                // indicate that this is a REST message.
                soapVersion = VERSION_SOAP11;
                msgContext.setDoingREST(true);
            }


?
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.



 



Date: Fri, 14 May 2010 10:17:21 -0700
Subject: Re: InputStream to DataSource In Axis2
From: shahvishwal@gmail.com
To: java-user@axis.apache.org

Hi,
My Application receives a Http Post from another web application which sends ~150mgs of data, i need to take that data and create a DataHandler (MTOM) and make a webservice call to another webapp. Its kind of pass through. i cannot copy that data onto any drive, it needs to create a DataHandler from the inputstream received from HttpRequest. I tried using 

import org.apache.axis2.builder.unknowncontent.InputStreamDataSource;

InputStreamDataSource ds = new InputStreamDataSource(request.getInputStream());  
DataHandler dh = new DatHandler(ds);

This doesn't seem to be working for me. 


Thanks,
Vish




On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mg...@hotmail.com> wrote:


the most prevelant input source is OMSource which extends org.xml.sax.InputSource defined here:

package org.apache.axiom.om.impl.jaxp;
import javax.xml.transform.sax.SAXSource;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.impl.serialize.OMXMLReader;
import org.xml.sax.InputSource;

/**
 * Implementation of {@link javax.xml.transform.Source} for AXIOM.
 * The implementation is based on {@link SAXSource} and directly transforms an AXIOM
 * tree into a stream of SAX events using {@link OMXMLReader}.
 * <p>
 * Note that {@link org.apache.axiom.om.OMDocType} nodes are not supported and will be
 * silently skipped.
 */
public class OMSource extends SAXSource {
    public OMSource(OMElement element) {
        super(new OMXMLReader(element), new InputSource());
    }
}

perhaps if you could display your definition(s) of InputStreamDatasource class 
we could better suggest an implementation which will accomodate your needs

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung

 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.






Date: Thu, 13 May 2010 12:01:41 -0700
Subject: Re: InputStream to DataSource In Axis2
From: shahvishwal@gmail.com
To: java-user@axis.apache.org




Anyone? Any help would be greatly appreciated. i cant write it to a drive, it has to be an in memory conversion.


-Vish


On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <sh...@gmail.com> wrote:

Hi,
Is there any Datasource inbuilt into Axis2 which can take Inputstream(Large data, almost 200 megs) ? I tried using InputStreamDataSource, but for some reason i am getting an error and i have been reading about issues using InputStreamDatasource. Also, i am not sure if it can handle large data (the MTOM way). Any help would be greatly appreciated






Thanks,
Vish 




The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. Get busy.
 		 	   		  
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1

Re: InputStream to DataSource In Axis2

Posted by Jorge Medina <ce...@gmail.com>.
I haven't used Axis2 on the server side to receive attachments. But I have
used Axis2 on the client to receive an attachment.

When using JAX-WS, the element of type xs:base64binary must also have an
attribute xmime:expectedContentType.
http://java.sun.com/webservices/docs/2.0/jaxws/mtom-swaref.html

Look at this page for Axis2 differences of MTOM vs SwA
http://ws.apache.org/axis2/1_1/mtom-guide.html



-Jorge


On Wed, May 19, 2010 at 6:18 PM, Nirav Shah <sn...@gmail.com> wrote:

> Thanks Andreas/Jorge,
>
> i used the Axiom package(snapshot).
>
> I have the WSDL using xs:base64Binary (MTOM),. I got an OutOfmemory error
> when making a call to the service. So i used a smaller file and that seemed
> to have work. I added a TCP Mon to intercept the request and to me it seems
> like a SwA request. why would is add MIME boundary ? i generated the ADB
> stubs  and have the following set
>
>
> soapBindingStub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE);
>
>
> *Intercepted Message header:*
>
> POST /axis2/services/sampleApp HTTP/1.1
> Content-Type: multipart/related;
> boundary=MIMEBoundaryurn_uuid_74D2AE27EAED433D531274307161705;
> type="application/xop+xml"; start="<
> 0.urn:uuid:74D2AE27EAED433D531274307161706@apache.org<0....@apache.org>>";
> start-info="text/xml"
> SOAPAction: "sendRequest"
> User-Agent: Axis2
> Host: localhost:8088
> Transfer-Encoding: chunked
>
> 23a5
> --MIMEBoundaryurn_uuid_74D2AE27EAED433D531274307161705
> Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
> Content-Transfer-Encoding: binary
> Content-ID: <0....@apache.org>
> >
>
>
>
> Thanks,
> Vish
>
>
>
> On Wed, May 19, 2010 at 1:31 PM, Andreas Veithen <
> andreas.veithen@gmail.com> wrote:
>
>> The current Axiom trunk (which will soon be released as Axiom 1.2.9),
>> there are a couple of utility classes that can be used for that. See
>> the org.apache.axiom.util.blob package, more specifically OverflowBlob
>> and BlobDataSource. Note that this stuff is new in Axiom and will be
>> reviewed before the 1.2.9 release. Thus the API may still change in
>> the next couple of days.
>>
>> Andreas
>>
>> On Fri, May 14, 2010 at 20:43, Vishwal Shah <sh...@gmail.com>
>> wrote:
>> > Thanks Andreas. Is there an alternative API in Axis2 that i can use ?
>> >
>> >
>> > Thanks,
>> > Vish
>> >
>> >
>> > On Fri, May 14, 2010 at 11:17 AM, Andreas Veithen
>> > <an...@gmail.com> wrote:
>> >>
>> >> You should not use InputStreamDataSource. This code should never have
>> >> been included in Axis2 because it is not a valid DataSource
>> >> implementation [1].
>> >>
>> >> Andreas
>> >>
>> >> [1] http://markmail.org/message/q34d4hxahdlsefob
>> >>
>> >> On Fri, May 14, 2010 at 19:17, Vishwal Shah <sh...@gmail.com>
>> wrote:
>> >> > Hi,
>> >> > My Application receives a Http Post from another web application
>> which
>> >> > sends
>> >> > ~150mgs of data, i need to take that data and create a DataHandler
>> >> > (MTOM)
>> >> > and make a webservice call to another webapp. Its kind of pass
>> through.
>> >> > i
>> >> > cannot copy that data onto any drive, it needs to create a
>> DataHandler
>> >> > from
>> >> > the inputstream received from HttpRequest. I tried using
>> >> >
>> >> > import org.apache.axis2.builder.unknowncontent.InputStreamDataSource;
>> >> >
>> >> > InputStreamDataSource ds = new
>> >> > InputStreamDataSource(request.getInputStream());
>> >> > DataHandler dh = new DatHandler(ds);
>> >> >
>> >> > This doesn't seem to be working for me.
>> >> >
>> >> >
>> >> > Thanks,
>> >> > Vish
>> >> >
>> >> >
>> >> >
>> >> > On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mg...@hotmail.com>
>> >> > wrote:
>> >> >>
>> >> >> the most prevelant input source is OMSource which extends
>> >> >> org.xml.sax.InputSource defined here:
>> >> >>
>> >> >> package org.apache.axiom.om.impl.jaxp;
>> >> >> import javax.xml.transform.sax.SAXSource;
>> >> >> import org.apache.axiom.om.OMElement;
>> >> >> import org.apache.axiom.om.impl.serialize.OMXMLReader;
>> >> >> import org.xml.sax.InputSource;
>> >> >>
>> >> >> /**
>> >> >>  * Implementation of {@link javax.xml.transform.Source} for AXIOM.
>> >> >>  * The implementation is based on {@link SAXSource} and directly
>> >> >> transforms an AXIOM
>> >> >>  * tree into a stream of SAX events using {@link OMXMLReader}.
>> >> >>  * <p>
>> >> >>  * Note that {@link org.apache.axiom.om.OMDocType} nodes are not
>> >> >> supported
>> >> >> and will be
>> >> >>  * silently skipped.
>> >> >>  */
>> >> >> public class OMSource extends SAXSource {
>> >> >>     public OMSource(OMElement element) {
>> >> >>         super(new OMXMLReader(element), new InputSource());
>> >> >>     }
>> >> >> }
>> >> >>
>> >> >> perhaps if you could display your definition(s) of
>> >> >> InputStreamDatasource
>> >> >> class
>> >> >> we could better suggest an implementation which will accomodate your
>> >> >> needs
>> >> >>
>> >> >> Martin
>> >> >> ______________________________________________
>> >> >> Verzicht und Vertraulichkeitanmerkung
>> >> >>
>> >> >> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>> >> >> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
>> >> >> unbefugte
>> >> >> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
>> >> >> Nachricht
>> >> >> dient lediglich dem Austausch von Informationen und entfaltet keine
>> >> >> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit
>> von
>> >> >> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> ________________________________
>> >> >> Date: Thu, 13 May 2010 12:01:41 -0700
>> >> >> Subject: Re: InputStream to DataSource In Axis2
>> >> >> From: shahvishwal@gmail.com
>> >> >> To: java-user@axis.apache.org
>> >> >>
>> >> >> Anyone? Any help would be greatly appreciated. i cant write it to a
>> >> >> drive,
>> >> >> it has to be an in memory conversion.
>> >> >>
>> >> >>
>> >> >> -Vish
>> >> >>
>> >> >> On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <
>> shahvishwal@gmail.com>
>> >> >> wrote:
>> >> >>
>> >> >> Hi,
>> >> >> Is there any Datasource inbuilt into Axis2 which can take
>> >> >> Inputstream(Large data, almost 200 megs) ? I tried using
>> >> >> InputStreamDataSource, but for some reason i am getting an error and
>> i
>> >> >> have
>> >> >> been reading about issues using InputStreamDatasource. Also, i am
>> not
>> >> >> sure
>> >> >> if it can handle large data (the MTOM way). Any help would be
>> greatly
>> >> >> appreciated
>> >> >>
>> >> >>
>> >> >> Thanks,
>> >> >> Vish
>> >> >>
>> >> >> ________________________________
>> >> >> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars
>> >> >> with
>> >> >> Hotmail. Get busy.
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-user-help@axis.apache.org
>> >>
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>>
>

Re: InputStream to DataSource In Axis2

Posted by Vishwal Shah <sh...@gmail.com>.
Hi There,
Thanks for all your help. very much appreciated...







On Wed, May 19, 2010 at 5:21 PM, Jorge Medina
<ce...@gmail.com>wrote:

> If you are getting an OutOfMemoryError with larger files, then your problem
> must be that you are holding the attachment in memory rather than streaming
> it (forwarding) to the webservice as soon as you start receiving it.
>
>
> On Wed, May 19, 2010 at 6:18 PM, Nirav Shah <sn...@gmail.com> wrote:
>
>> Thanks Andreas/Jorge,
>>
>> i used the Axiom package(snapshot).
>>
>> I have the WSDL using xs:base64Binary (MTOM),. I got an OutOfmemory error
>> when making a call to the service. So i used a smaller file and that seemed
>> to have work. I added a TCP Mon to intercept the request and to me it seems
>> like a SwA request. why would is add MIME boundary ? i generated the ADB
>> stubs  and have the following set
>>
>>
>> soapBindingStub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE);
>>
>>
>> *Intercepted Message header:*
>>
>> POST /axis2/services/sampleApp HTTP/1.1
>> Content-Type: multipart/related;
>> boundary=MIMEBoundaryurn_uuid_74D2AE27EAED433D531274307161705;
>> type="application/xop+xml"; start="<
>> 0.urn:uuid:74D2AE27EAED433D531274307161706@apache.org<0....@apache.org>>";
>> start-info="text/xml"
>> SOAPAction: "sendRequest"
>> User-Agent: Axis2
>> Host: localhost:8088
>> Transfer-Encoding: chunked
>>
>> 23a5
>> --MIMEBoundaryurn_uuid_74D2AE27EAED433D531274307161705
>> Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
>> Content-Transfer-Encoding: binary
>> Content-ID: <0....@apache.org>
>> >
>>
>>
>>
>> Thanks,
>> Vish
>>
>>
>>
>> On Wed, May 19, 2010 at 1:31 PM, Andreas Veithen <
>> andreas.veithen@gmail.com> wrote:
>>
>>> The current Axiom trunk (which will soon be released as Axiom 1.2.9),
>>> there are a couple of utility classes that can be used for that. See
>>> the org.apache.axiom.util.blob package, more specifically OverflowBlob
>>> and BlobDataSource. Note that this stuff is new in Axiom and will be
>>> reviewed before the 1.2.9 release. Thus the API may still change in
>>> the next couple of days.
>>>
>>> Andreas
>>>
>>> On Fri, May 14, 2010 at 20:43, Vishwal Shah <sh...@gmail.com>
>>> wrote:
>>> > Thanks Andreas. Is there an alternative API in Axis2 that i can use ?
>>> >
>>> >
>>> > Thanks,
>>> > Vish
>>> >
>>> >
>>> > On Fri, May 14, 2010 at 11:17 AM, Andreas Veithen
>>> > <an...@gmail.com> wrote:
>>> >>
>>> >> You should not use InputStreamDataSource. This code should never have
>>> >> been included in Axis2 because it is not a valid DataSource
>>> >> implementation [1].
>>> >>
>>> >> Andreas
>>> >>
>>> >> [1] http://markmail.org/message/q34d4hxahdlsefob
>>> >>
>>> >> On Fri, May 14, 2010 at 19:17, Vishwal Shah <sh...@gmail.com>
>>> wrote:
>>> >> > Hi,
>>> >> > My Application receives a Http Post from another web application
>>> which
>>> >> > sends
>>> >> > ~150mgs of data, i need to take that data and create a DataHandler
>>> >> > (MTOM)
>>> >> > and make a webservice call to another webapp. Its kind of pass
>>> through.
>>> >> > i
>>> >> > cannot copy that data onto any drive, it needs to create a
>>> DataHandler
>>> >> > from
>>> >> > the inputstream received from HttpRequest. I tried using
>>> >> >
>>> >> > import
>>> org.apache.axis2.builder.unknowncontent.InputStreamDataSource;
>>> >> >
>>> >> > InputStreamDataSource ds = new
>>> >> > InputStreamDataSource(request.getInputStream());
>>> >> > DataHandler dh = new DatHandler(ds);
>>> >> >
>>> >> > This doesn't seem to be working for me.
>>> >> >
>>> >> >
>>> >> > Thanks,
>>> >> > Vish
>>> >> >
>>> >> >
>>> >> >
>>> >> > On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mgainty@hotmail.com
>>> >
>>> >> > wrote:
>>> >> >>
>>> >> >> the most prevelant input source is OMSource which extends
>>> >> >> org.xml.sax.InputSource defined here:
>>> >> >>
>>> >> >> package org.apache.axiom.om.impl.jaxp;
>>> >> >> import javax.xml.transform.sax.SAXSource;
>>> >> >> import org.apache.axiom.om.OMElement;
>>> >> >> import org.apache.axiom.om.impl.serialize.OMXMLReader;
>>> >> >> import org.xml.sax.InputSource;
>>> >> >>
>>> >> >> /**
>>> >> >>  * Implementation of {@link javax.xml.transform.Source} for AXIOM.
>>> >> >>  * The implementation is based on {@link SAXSource} and directly
>>> >> >> transforms an AXIOM
>>> >> >>  * tree into a stream of SAX events using {@link OMXMLReader}.
>>> >> >>  * <p>
>>> >> >>  * Note that {@link org.apache.axiom.om.OMDocType} nodes are not
>>> >> >> supported
>>> >> >> and will be
>>> >> >>  * silently skipped.
>>> >> >>  */
>>> >> >> public class OMSource extends SAXSource {
>>> >> >>     public OMSource(OMElement element) {
>>> >> >>         super(new OMXMLReader(element), new InputSource());
>>> >> >>     }
>>> >> >> }
>>> >> >>
>>> >> >> perhaps if you could display your definition(s) of
>>> >> >> InputStreamDatasource
>>> >> >> class
>>> >> >> we could better suggest an implementation which will accomodate
>>> your
>>> >> >> needs
>>> >> >>
>>> >> >> Martin
>>> >> >> ______________________________________________
>>> >> >> Verzicht und Vertraulichkeitanmerkung
>>> >> >>
>>> >> >> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>>> >> >> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
>>> >> >> unbefugte
>>> >> >> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
>>> >> >> Nachricht
>>> >> >> dient lediglich dem Austausch von Informationen und entfaltet keine
>>> >> >> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit
>>> von
>>> >> >> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> ________________________________
>>> >> >> Date: Thu, 13 May 2010 12:01:41 -0700
>>> >> >> Subject: Re: InputStream to DataSource In Axis2
>>> >> >> From: shahvishwal@gmail.com
>>> >> >> To: java-user@axis.apache.org
>>> >> >>
>>> >> >> Anyone? Any help would be greatly appreciated. i cant write it to a
>>> >> >> drive,
>>> >> >> it has to be an in memory conversion.
>>> >> >>
>>> >> >>
>>> >> >> -Vish
>>> >> >>
>>> >> >> On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <
>>> shahvishwal@gmail.com>
>>> >> >> wrote:
>>> >> >>
>>> >> >> Hi,
>>> >> >> Is there any Datasource inbuilt into Axis2 which can take
>>> >> >> Inputstream(Large data, almost 200 megs) ? I tried using
>>> >> >> InputStreamDataSource, but for some reason i am getting an error
>>> and i
>>> >> >> have
>>> >> >> been reading about issues using InputStreamDatasource. Also, i am
>>> not
>>> >> >> sure
>>> >> >> if it can handle large data (the MTOM way). Any help would be
>>> greatly
>>> >> >> appreciated
>>> >> >>
>>> >> >>
>>> >> >> Thanks,
>>> >> >> Vish
>>> >> >>
>>> >> >> ________________________________
>>> >> >> The New Busy think 9 to 5 is a cute idea. Combine multiple
>>> calendars
>>> >> >> with
>>> >> >> Hotmail. Get busy.
>>> >> >
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>>> >> For additional commands, e-mail: java-user-help@axis.apache.org
>>> >>
>>> >
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-user-help@axis.apache.org
>>>
>>>
>>
>

Re: InputStream to DataSource In Axis2

Posted by Jorge Medina <ce...@gmail.com>.
If you are getting an OutOfMemoryError with larger files, then your problem
must be that you are holding the attachment in memory rather than streaming
it (forwarding) to the webservice as soon as you start receiving it.

On Wed, May 19, 2010 at 6:18 PM, Nirav Shah <sn...@gmail.com> wrote:

> Thanks Andreas/Jorge,
>
> i used the Axiom package(snapshot).
>
> I have the WSDL using xs:base64Binary (MTOM),. I got an OutOfmemory error
> when making a call to the service. So i used a smaller file and that seemed
> to have work. I added a TCP Mon to intercept the request and to me it seems
> like a SwA request. why would is add MIME boundary ? i generated the ADB
> stubs  and have the following set
>
>
> soapBindingStub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE);
>
>
> *Intercepted Message header:*
>
> POST /axis2/services/sampleApp HTTP/1.1
> Content-Type: multipart/related;
> boundary=MIMEBoundaryurn_uuid_74D2AE27EAED433D531274307161705;
> type="application/xop+xml"; start="<
> 0.urn:uuid:74D2AE27EAED433D531274307161706@apache.org<0....@apache.org>>";
> start-info="text/xml"
> SOAPAction: "sendRequest"
> User-Agent: Axis2
> Host: localhost:8088
> Transfer-Encoding: chunked
>
> 23a5
> --MIMEBoundaryurn_uuid_74D2AE27EAED433D531274307161705
> Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
> Content-Transfer-Encoding: binary
> Content-ID: <0....@apache.org>
> >
>
>
>
> Thanks,
> Vish
>
>
>
> On Wed, May 19, 2010 at 1:31 PM, Andreas Veithen <
> andreas.veithen@gmail.com> wrote:
>
>> The current Axiom trunk (which will soon be released as Axiom 1.2.9),
>> there are a couple of utility classes that can be used for that. See
>> the org.apache.axiom.util.blob package, more specifically OverflowBlob
>> and BlobDataSource. Note that this stuff is new in Axiom and will be
>> reviewed before the 1.2.9 release. Thus the API may still change in
>> the next couple of days.
>>
>> Andreas
>>
>> On Fri, May 14, 2010 at 20:43, Vishwal Shah <sh...@gmail.com>
>> wrote:
>> > Thanks Andreas. Is there an alternative API in Axis2 that i can use ?
>> >
>> >
>> > Thanks,
>> > Vish
>> >
>> >
>> > On Fri, May 14, 2010 at 11:17 AM, Andreas Veithen
>> > <an...@gmail.com> wrote:
>> >>
>> >> You should not use InputStreamDataSource. This code should never have
>> >> been included in Axis2 because it is not a valid DataSource
>> >> implementation [1].
>> >>
>> >> Andreas
>> >>
>> >> [1] http://markmail.org/message/q34d4hxahdlsefob
>> >>
>> >> On Fri, May 14, 2010 at 19:17, Vishwal Shah <sh...@gmail.com>
>> wrote:
>> >> > Hi,
>> >> > My Application receives a Http Post from another web application
>> which
>> >> > sends
>> >> > ~150mgs of data, i need to take that data and create a DataHandler
>> >> > (MTOM)
>> >> > and make a webservice call to another webapp. Its kind of pass
>> through.
>> >> > i
>> >> > cannot copy that data onto any drive, it needs to create a
>> DataHandler
>> >> > from
>> >> > the inputstream received from HttpRequest. I tried using
>> >> >
>> >> > import org.apache.axis2.builder.unknowncontent.InputStreamDataSource;
>> >> >
>> >> > InputStreamDataSource ds = new
>> >> > InputStreamDataSource(request.getInputStream());
>> >> > DataHandler dh = new DatHandler(ds);
>> >> >
>> >> > This doesn't seem to be working for me.
>> >> >
>> >> >
>> >> > Thanks,
>> >> > Vish
>> >> >
>> >> >
>> >> >
>> >> > On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mg...@hotmail.com>
>> >> > wrote:
>> >> >>
>> >> >> the most prevelant input source is OMSource which extends
>> >> >> org.xml.sax.InputSource defined here:
>> >> >>
>> >> >> package org.apache.axiom.om.impl.jaxp;
>> >> >> import javax.xml.transform.sax.SAXSource;
>> >> >> import org.apache.axiom.om.OMElement;
>> >> >> import org.apache.axiom.om.impl.serialize.OMXMLReader;
>> >> >> import org.xml.sax.InputSource;
>> >> >>
>> >> >> /**
>> >> >>  * Implementation of {@link javax.xml.transform.Source} for AXIOM.
>> >> >>  * The implementation is based on {@link SAXSource} and directly
>> >> >> transforms an AXIOM
>> >> >>  * tree into a stream of SAX events using {@link OMXMLReader}.
>> >> >>  * <p>
>> >> >>  * Note that {@link org.apache.axiom.om.OMDocType} nodes are not
>> >> >> supported
>> >> >> and will be
>> >> >>  * silently skipped.
>> >> >>  */
>> >> >> public class OMSource extends SAXSource {
>> >> >>     public OMSource(OMElement element) {
>> >> >>         super(new OMXMLReader(element), new InputSource());
>> >> >>     }
>> >> >> }
>> >> >>
>> >> >> perhaps if you could display your definition(s) of
>> >> >> InputStreamDatasource
>> >> >> class
>> >> >> we could better suggest an implementation which will accomodate your
>> >> >> needs
>> >> >>
>> >> >> Martin
>> >> >> ______________________________________________
>> >> >> Verzicht und Vertraulichkeitanmerkung
>> >> >>
>> >> >> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>> >> >> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
>> >> >> unbefugte
>> >> >> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
>> >> >> Nachricht
>> >> >> dient lediglich dem Austausch von Informationen und entfaltet keine
>> >> >> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit
>> von
>> >> >> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> ________________________________
>> >> >> Date: Thu, 13 May 2010 12:01:41 -0700
>> >> >> Subject: Re: InputStream to DataSource In Axis2
>> >> >> From: shahvishwal@gmail.com
>> >> >> To: java-user@axis.apache.org
>> >> >>
>> >> >> Anyone? Any help would be greatly appreciated. i cant write it to a
>> >> >> drive,
>> >> >> it has to be an in memory conversion.
>> >> >>
>> >> >>
>> >> >> -Vish
>> >> >>
>> >> >> On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <
>> shahvishwal@gmail.com>
>> >> >> wrote:
>> >> >>
>> >> >> Hi,
>> >> >> Is there any Datasource inbuilt into Axis2 which can take
>> >> >> Inputstream(Large data, almost 200 megs) ? I tried using
>> >> >> InputStreamDataSource, but for some reason i am getting an error and
>> i
>> >> >> have
>> >> >> been reading about issues using InputStreamDatasource. Also, i am
>> not
>> >> >> sure
>> >> >> if it can handle large data (the MTOM way). Any help would be
>> greatly
>> >> >> appreciated
>> >> >>
>> >> >>
>> >> >> Thanks,
>> >> >> Vish
>> >> >>
>> >> >> ________________________________
>> >> >> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars
>> >> >> with
>> >> >> Hotmail. Get busy.
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-user-help@axis.apache.org
>> >>
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>>
>

Re: InputStream to DataSource In Axis2

Posted by Andreas Veithen <an...@gmail.com>.
On Thu, May 20, 2010 at 00:18, Nirav Shah <sn...@gmail.com> wrote:
> Thanks Andreas/Jorge,
>
> i used the Axiom package(snapshot).
>
> I have the WSDL using xs:base64Binary (MTOM),. I got an OutOfmemory error
> when making a call to the service. So i used a smaller file and that seemed
> to have work.

Can you provide some details about the Axis2 version as well as the
stack trace of the out of memory error?

> I added a TCP Mon to intercept the request and to me it seems
> like a SwA request. why would is add MIME boundary ?

Both SwA and MTOM are based on MIME. The only difference is the way
MIME parts are referenced in the XML and the fact that MTOM defines an
equivalence between plain XML messages and MTOM messages, while for a
SwA message, there is in general no plain XML equivalent.

> i generated the ADB
> stubs  and have the following set
>
>
> soapBindingStub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE);
>
>
> Intercepted Message header:
>
> POST /axis2/services/sampleApp HTTP/1.1
> Content-Type: multipart/related;
> boundary=MIMEBoundaryurn_uuid_74D2AE27EAED433D531274307161705;
> type="application/xop+xml";
> start="<0....@apache.org>";
> start-info="text/xml"
> SOAPAction: "sendRequest"
> User-Agent: Axis2
> Host: localhost:8088
> Transfer-Encoding: chunked
>
> 23a5
> --MIMEBoundaryurn_uuid_74D2AE27EAED433D531274307161705
> Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
> Content-Transfer-Encoding: binary
> Content-ID: <0....@apache.org>
>
>
>
> Thanks,
> Vish
>
>
> On Wed, May 19, 2010 at 1:31 PM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> The current Axiom trunk (which will soon be released as Axiom 1.2.9),
>> there are a couple of utility classes that can be used for that. See
>> the org.apache.axiom.util.blob package, more specifically OverflowBlob
>> and BlobDataSource. Note that this stuff is new in Axiom and will be
>> reviewed before the 1.2.9 release. Thus the API may still change in
>> the next couple of days.
>>
>> Andreas
>>
>> On Fri, May 14, 2010 at 20:43, Vishwal Shah <sh...@gmail.com> wrote:
>> > Thanks Andreas. Is there an alternative API in Axis2 that i can use ?
>> >
>> >
>> > Thanks,
>> > Vish
>> >
>> >
>> > On Fri, May 14, 2010 at 11:17 AM, Andreas Veithen
>> > <an...@gmail.com> wrote:
>> >>
>> >> You should not use InputStreamDataSource. This code should never have
>> >> been included in Axis2 because it is not a valid DataSource
>> >> implementation [1].
>> >>
>> >> Andreas
>> >>
>> >> [1] http://markmail.org/message/q34d4hxahdlsefob
>> >>
>> >> On Fri, May 14, 2010 at 19:17, Vishwal Shah <sh...@gmail.com>
>> >> wrote:
>> >> > Hi,
>> >> > My Application receives a Http Post from another web application
>> >> > which
>> >> > sends
>> >> > ~150mgs of data, i need to take that data and create a DataHandler
>> >> > (MTOM)
>> >> > and make a webservice call to another webapp. Its kind of pass
>> >> > through.
>> >> > i
>> >> > cannot copy that data onto any drive, it needs to create a
>> >> > DataHandler
>> >> > from
>> >> > the inputstream received from HttpRequest. I tried using
>> >> >
>> >> > import org.apache.axis2.builder.unknowncontent.InputStreamDataSource;
>> >> >
>> >> > InputStreamDataSource ds = new
>> >> > InputStreamDataSource(request.getInputStream());
>> >> > DataHandler dh = new DatHandler(ds);
>> >> >
>> >> > This doesn't seem to be working for me.
>> >> >
>> >> >
>> >> > Thanks,
>> >> > Vish
>> >> >
>> >> >
>> >> >
>> >> > On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mg...@hotmail.com>
>> >> > wrote:
>> >> >>
>> >> >> the most prevelant input source is OMSource which extends
>> >> >> org.xml.sax.InputSource defined here:
>> >> >>
>> >> >> package org.apache.axiom.om.impl.jaxp;
>> >> >> import javax.xml.transform.sax.SAXSource;
>> >> >> import org.apache.axiom.om.OMElement;
>> >> >> import org.apache.axiom.om.impl.serialize.OMXMLReader;
>> >> >> import org.xml.sax.InputSource;
>> >> >>
>> >> >> /**
>> >> >>  * Implementation of {@link javax.xml.transform.Source} for AXIOM.
>> >> >>  * The implementation is based on {@link SAXSource} and directly
>> >> >> transforms an AXIOM
>> >> >>  * tree into a stream of SAX events using {@link OMXMLReader}.
>> >> >>  * <p>
>> >> >>  * Note that {@link org.apache.axiom.om.OMDocType} nodes are not
>> >> >> supported
>> >> >> and will be
>> >> >>  * silently skipped.
>> >> >>  */
>> >> >> public class OMSource extends SAXSource {
>> >> >>     public OMSource(OMElement element) {
>> >> >>         super(new OMXMLReader(element), new InputSource());
>> >> >>     }
>> >> >> }
>> >> >>
>> >> >> perhaps if you could display your definition(s) of
>> >> >> InputStreamDatasource
>> >> >> class
>> >> >> we could better suggest an implementation which will accomodate your
>> >> >> needs
>> >> >>
>> >> >> Martin
>> >> >> ______________________________________________
>> >> >> Verzicht und Vertraulichkeitanmerkung
>> >> >>
>> >> >> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>> >> >> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
>> >> >> unbefugte
>> >> >> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
>> >> >> Nachricht
>> >> >> dient lediglich dem Austausch von Informationen und entfaltet keine
>> >> >> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit
>> >> >> von
>> >> >> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> ________________________________
>> >> >> Date: Thu, 13 May 2010 12:01:41 -0700
>> >> >> Subject: Re: InputStream to DataSource In Axis2
>> >> >> From: shahvishwal@gmail.com
>> >> >> To: java-user@axis.apache.org
>> >> >>
>> >> >> Anyone? Any help would be greatly appreciated. i cant write it to a
>> >> >> drive,
>> >> >> it has to be an in memory conversion.
>> >> >>
>> >> >>
>> >> >> -Vish
>> >> >>
>> >> >> On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah
>> >> >> <sh...@gmail.com>
>> >> >> wrote:
>> >> >>
>> >> >> Hi,
>> >> >> Is there any Datasource inbuilt into Axis2 which can take
>> >> >> Inputstream(Large data, almost 200 megs) ? I tried using
>> >> >> InputStreamDataSource, but for some reason i am getting an error and
>> >> >> i
>> >> >> have
>> >> >> been reading about issues using InputStreamDatasource. Also, i am
>> >> >> not
>> >> >> sure
>> >> >> if it can handle large data (the MTOM way). Any help would be
>> >> >> greatly
>> >> >> appreciated
>> >> >>
>> >> >>
>> >> >> Thanks,
>> >> >> Vish
>> >> >>
>> >> >> ________________________________
>> >> >> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars
>> >> >> with
>> >> >> Hotmail. Get busy.
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-user-help@axis.apache.org
>> >>
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: InputStream to DataSource In Axis2

Posted by Nirav Shah <sn...@gmail.com>.
Thanks Andreas/Jorge,

i used the Axiom package(snapshot).

I have the WSDL using xs:base64Binary (MTOM),. I got an OutOfmemory error
when making a call to the service. So i used a smaller file and that seemed
to have work. I added a TCP Mon to intercept the request and to me it seems
like a SwA request. why would is add MIME boundary ? i generated the ADB
stubs  and have the following set


soapBindingStub._getServiceClient().getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE);


*Intercepted Message header:*

POST /axis2/services/sampleApp HTTP/1.1
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_74D2AE27EAED433D531274307161705;
type="application/xop+xml"; start="<
0.urn:uuid:74D2AE27EAED433D531274307161706@apache.org<0....@apache.org>>";
start-info="text/xml"
SOAPAction: "sendRequest"
User-Agent: Axis2
Host: localhost:8088
Transfer-Encoding: chunked

23a5
--MIMEBoundaryurn_uuid_74D2AE27EAED433D531274307161705
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <0....@apache.org>
>



Thanks,
Vish


On Wed, May 19, 2010 at 1:31 PM, Andreas Veithen
<an...@gmail.com>wrote:

> The current Axiom trunk (which will soon be released as Axiom 1.2.9),
> there are a couple of utility classes that can be used for that. See
> the org.apache.axiom.util.blob package, more specifically OverflowBlob
> and BlobDataSource. Note that this stuff is new in Axiom and will be
> reviewed before the 1.2.9 release. Thus the API may still change in
> the next couple of days.
>
> Andreas
>
> On Fri, May 14, 2010 at 20:43, Vishwal Shah <sh...@gmail.com> wrote:
> > Thanks Andreas. Is there an alternative API in Axis2 that i can use ?
> >
> >
> > Thanks,
> > Vish
> >
> >
> > On Fri, May 14, 2010 at 11:17 AM, Andreas Veithen
> > <an...@gmail.com> wrote:
> >>
> >> You should not use InputStreamDataSource. This code should never have
> >> been included in Axis2 because it is not a valid DataSource
> >> implementation [1].
> >>
> >> Andreas
> >>
> >> [1] http://markmail.org/message/q34d4hxahdlsefob
> >>
> >> On Fri, May 14, 2010 at 19:17, Vishwal Shah <sh...@gmail.com>
> wrote:
> >> > Hi,
> >> > My Application receives a Http Post from another web application which
> >> > sends
> >> > ~150mgs of data, i need to take that data and create a DataHandler
> >> > (MTOM)
> >> > and make a webservice call to another webapp. Its kind of pass
> through.
> >> > i
> >> > cannot copy that data onto any drive, it needs to create a DataHandler
> >> > from
> >> > the inputstream received from HttpRequest. I tried using
> >> >
> >> > import org.apache.axis2.builder.unknowncontent.InputStreamDataSource;
> >> >
> >> > InputStreamDataSource ds = new
> >> > InputStreamDataSource(request.getInputStream());
> >> > DataHandler dh = new DatHandler(ds);
> >> >
> >> > This doesn't seem to be working for me.
> >> >
> >> >
> >> > Thanks,
> >> > Vish
> >> >
> >> >
> >> >
> >> > On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mg...@hotmail.com>
> >> > wrote:
> >> >>
> >> >> the most prevelant input source is OMSource which extends
> >> >> org.xml.sax.InputSource defined here:
> >> >>
> >> >> package org.apache.axiom.om.impl.jaxp;
> >> >> import javax.xml.transform.sax.SAXSource;
> >> >> import org.apache.axiom.om.OMElement;
> >> >> import org.apache.axiom.om.impl.serialize.OMXMLReader;
> >> >> import org.xml.sax.InputSource;
> >> >>
> >> >> /**
> >> >>  * Implementation of {@link javax.xml.transform.Source} for AXIOM.
> >> >>  * The implementation is based on {@link SAXSource} and directly
> >> >> transforms an AXIOM
> >> >>  * tree into a stream of SAX events using {@link OMXMLReader}.
> >> >>  * <p>
> >> >>  * Note that {@link org.apache.axiom.om.OMDocType} nodes are not
> >> >> supported
> >> >> and will be
> >> >>  * silently skipped.
> >> >>  */
> >> >> public class OMSource extends SAXSource {
> >> >>     public OMSource(OMElement element) {
> >> >>         super(new OMXMLReader(element), new InputSource());
> >> >>     }
> >> >> }
> >> >>
> >> >> perhaps if you could display your definition(s) of
> >> >> InputStreamDatasource
> >> >> class
> >> >> we could better suggest an implementation which will accomodate your
> >> >> needs
> >> >>
> >> >> Martin
> >> >> ______________________________________________
> >> >> Verzicht und Vertraulichkeitanmerkung
> >> >>
> >> >> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> >> >> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
> >> >> unbefugte
> >> >> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
> >> >> Nachricht
> >> >> dient lediglich dem Austausch von Informationen und entfaltet keine
> >> >> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit
> von
> >> >> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> ________________________________
> >> >> Date: Thu, 13 May 2010 12:01:41 -0700
> >> >> Subject: Re: InputStream to DataSource In Axis2
> >> >> From: shahvishwal@gmail.com
> >> >> To: java-user@axis.apache.org
> >> >>
> >> >> Anyone? Any help would be greatly appreciated. i cant write it to a
> >> >> drive,
> >> >> it has to be an in memory conversion.
> >> >>
> >> >>
> >> >> -Vish
> >> >>
> >> >> On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <shahvishwal@gmail.com
> >
> >> >> wrote:
> >> >>
> >> >> Hi,
> >> >> Is there any Datasource inbuilt into Axis2 which can take
> >> >> Inputstream(Large data, almost 200 megs) ? I tried using
> >> >> InputStreamDataSource, but for some reason i am getting an error and
> i
> >> >> have
> >> >> been reading about issues using InputStreamDatasource. Also, i am not
> >> >> sure
> >> >> if it can handle large data (the MTOM way). Any help would be greatly
> >> >> appreciated
> >> >>
> >> >>
> >> >> Thanks,
> >> >> Vish
> >> >>
> >> >> ________________________________
> >> >> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars
> >> >> with
> >> >> Hotmail. Get busy.
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-user-help@axis.apache.org
> >>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>

Re: InputStream to DataSource In Axis2

Posted by Andreas Veithen <an...@gmail.com>.
The current Axiom trunk (which will soon be released as Axiom 1.2.9),
there are a couple of utility classes that can be used for that. See
the org.apache.axiom.util.blob package, more specifically OverflowBlob
and BlobDataSource. Note that this stuff is new in Axiom and will be
reviewed before the 1.2.9 release. Thus the API may still change in
the next couple of days.

Andreas

On Fri, May 14, 2010 at 20:43, Vishwal Shah <sh...@gmail.com> wrote:
> Thanks Andreas. Is there an alternative API in Axis2 that i can use ?
>
>
> Thanks,
> Vish
>
>
> On Fri, May 14, 2010 at 11:17 AM, Andreas Veithen
> <an...@gmail.com> wrote:
>>
>> You should not use InputStreamDataSource. This code should never have
>> been included in Axis2 because it is not a valid DataSource
>> implementation [1].
>>
>> Andreas
>>
>> [1] http://markmail.org/message/q34d4hxahdlsefob
>>
>> On Fri, May 14, 2010 at 19:17, Vishwal Shah <sh...@gmail.com> wrote:
>> > Hi,
>> > My Application receives a Http Post from another web application which
>> > sends
>> > ~150mgs of data, i need to take that data and create a DataHandler
>> > (MTOM)
>> > and make a webservice call to another webapp. Its kind of pass through.
>> > i
>> > cannot copy that data onto any drive, it needs to create a DataHandler
>> > from
>> > the inputstream received from HttpRequest. I tried using
>> >
>> > import org.apache.axis2.builder.unknowncontent.InputStreamDataSource;
>> >
>> > InputStreamDataSource ds = new
>> > InputStreamDataSource(request.getInputStream());
>> > DataHandler dh = new DatHandler(ds);
>> >
>> > This doesn't seem to be working for me.
>> >
>> >
>> > Thanks,
>> > Vish
>> >
>> >
>> >
>> > On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mg...@hotmail.com>
>> > wrote:
>> >>
>> >> the most prevelant input source is OMSource which extends
>> >> org.xml.sax.InputSource defined here:
>> >>
>> >> package org.apache.axiom.om.impl.jaxp;
>> >> import javax.xml.transform.sax.SAXSource;
>> >> import org.apache.axiom.om.OMElement;
>> >> import org.apache.axiom.om.impl.serialize.OMXMLReader;
>> >> import org.xml.sax.InputSource;
>> >>
>> >> /**
>> >>  * Implementation of {@link javax.xml.transform.Source} for AXIOM.
>> >>  * The implementation is based on {@link SAXSource} and directly
>> >> transforms an AXIOM
>> >>  * tree into a stream of SAX events using {@link OMXMLReader}.
>> >>  * <p>
>> >>  * Note that {@link org.apache.axiom.om.OMDocType} nodes are not
>> >> supported
>> >> and will be
>> >>  * silently skipped.
>> >>  */
>> >> public class OMSource extends SAXSource {
>> >>     public OMSource(OMElement element) {
>> >>         super(new OMXMLReader(element), new InputSource());
>> >>     }
>> >> }
>> >>
>> >> perhaps if you could display your definition(s) of
>> >> InputStreamDatasource
>> >> class
>> >> we could better suggest an implementation which will accomodate your
>> >> needs
>> >>
>> >> Martin
>> >> ______________________________________________
>> >> Verzicht und Vertraulichkeitanmerkung
>> >>
>> >> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>> >> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
>> >> unbefugte
>> >> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
>> >> Nachricht
>> >> dient lediglich dem Austausch von Informationen und entfaltet keine
>> >> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>> >> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>> >>
>> >>
>> >>
>> >>
>> >> ________________________________
>> >> Date: Thu, 13 May 2010 12:01:41 -0700
>> >> Subject: Re: InputStream to DataSource In Axis2
>> >> From: shahvishwal@gmail.com
>> >> To: java-user@axis.apache.org
>> >>
>> >> Anyone? Any help would be greatly appreciated. i cant write it to a
>> >> drive,
>> >> it has to be an in memory conversion.
>> >>
>> >>
>> >> -Vish
>> >>
>> >> On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <sh...@gmail.com>
>> >> wrote:
>> >>
>> >> Hi,
>> >> Is there any Datasource inbuilt into Axis2 which can take
>> >> Inputstream(Large data, almost 200 megs) ? I tried using
>> >> InputStreamDataSource, but for some reason i am getting an error and i
>> >> have
>> >> been reading about issues using InputStreamDatasource. Also, i am not
>> >> sure
>> >> if it can handle large data (the MTOM way). Any help would be greatly
>> >> appreciated
>> >>
>> >>
>> >> Thanks,
>> >> Vish
>> >>
>> >> ________________________________
>> >> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars
>> >> with
>> >> Hotmail. Get busy.
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: InputStream to DataSource In Axis2

Posted by Vishwal Shah <sh...@gmail.com>.
Thanks Andreas. Is there an alternative API in Axis2 that i can use ?


Thanks,
Vish


On Fri, May 14, 2010 at 11:17 AM, Andreas Veithen <andreas.veithen@gmail.com
> wrote:

> You should not use InputStreamDataSource. This code should never have
> been included in Axis2 because it is not a valid DataSource
> implementation [1].
>
> Andreas
>
> [1] http://markmail.org/message/q34d4hxahdlsefob
>
> On Fri, May 14, 2010 at 19:17, Vishwal Shah <sh...@gmail.com> wrote:
> > Hi,
> > My Application receives a Http Post from another web application which
> sends
> > ~150mgs of data, i need to take that data and create a DataHandler (MTOM)
> > and make a webservice call to another webapp. Its kind of pass through. i
> > cannot copy that data onto any drive, it needs to create a DataHandler
> from
> > the inputstream received from HttpRequest. I tried using
> >
> > import org.apache.axis2.builder.unknowncontent.InputStreamDataSource;
> >
> > InputStreamDataSource ds = new
> > InputStreamDataSource(request.getInputStream());
> > DataHandler dh = new DatHandler(ds);
> >
> > This doesn't seem to be working for me.
> >
> >
> > Thanks,
> > Vish
> >
> >
> >
> > On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mg...@hotmail.com>
> wrote:
> >>
> >> the most prevelant input source is OMSource which extends
> >> org.xml.sax.InputSource defined here:
> >>
> >> package org.apache.axiom.om.impl.jaxp;
> >> import javax.xml.transform.sax.SAXSource;
> >> import org.apache.axiom.om.OMElement;
> >> import org.apache.axiom.om.impl.serialize.OMXMLReader;
> >> import org.xml.sax.InputSource;
> >>
> >> /**
> >>  * Implementation of {@link javax.xml.transform.Source} for AXIOM.
> >>  * The implementation is based on {@link SAXSource} and directly
> >> transforms an AXIOM
> >>  * tree into a stream of SAX events using {@link OMXMLReader}.
> >>  * <p>
> >>  * Note that {@link org.apache.axiom.om.OMDocType} nodes are not
> supported
> >> and will be
> >>  * silently skipped.
> >>  */
> >> public class OMSource extends SAXSource {
> >>     public OMSource(OMElement element) {
> >>         super(new OMXMLReader(element), new InputSource());
> >>     }
> >> }
> >>
> >> perhaps if you could display your definition(s) of InputStreamDatasource
> >> class
> >> we could better suggest an implementation which will accomodate your
> needs
> >>
> >> Martin
> >> ______________________________________________
> >> Verzicht und Vertraulichkeitanmerkung
> >>
> >> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> >> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
> unbefugte
> >> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
> Nachricht
> >> dient lediglich dem Austausch von Informationen und entfaltet keine
> >> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> >> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> >>
> >>
> >>
> >>
> >> ________________________________
> >> Date: Thu, 13 May 2010 12:01:41 -0700
> >> Subject: Re: InputStream to DataSource In Axis2
> >> From: shahvishwal@gmail.com
> >> To: java-user@axis.apache.org
> >>
> >> Anyone? Any help would be greatly appreciated. i cant write it to a
> drive,
> >> it has to be an in memory conversion.
> >>
> >>
> >> -Vish
> >>
> >> On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <sh...@gmail.com>
> >> wrote:
> >>
> >> Hi,
> >> Is there any Datasource inbuilt into Axis2 which can take
> >> Inputstream(Large data, almost 200 megs) ? I tried using
> >> InputStreamDataSource, but for some reason i am getting an error and i
> have
> >> been reading about issues using InputStreamDatasource. Also, i am not
> sure
> >> if it can handle large data (the MTOM way). Any help would be greatly
> >> appreciated
> >>
> >>
> >> Thanks,
> >> Vish
> >>
> >> ________________________________
> >> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars
> with
> >> Hotmail. Get busy.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>

Re: InputStream to DataSource In Axis2

Posted by Andreas Veithen <an...@gmail.com>.
You should not use InputStreamDataSource. This code should never have
been included in Axis2 because it is not a valid DataSource
implementation [1].

Andreas

[1] http://markmail.org/message/q34d4hxahdlsefob

On Fri, May 14, 2010 at 19:17, Vishwal Shah <sh...@gmail.com> wrote:
> Hi,
> My Application receives a Http Post from another web application which sends
> ~150mgs of data, i need to take that data and create a DataHandler (MTOM)
> and make a webservice call to another webapp. Its kind of pass through. i
> cannot copy that data onto any drive, it needs to create a DataHandler from
> the inputstream received from HttpRequest. I tried using
>
> import org.apache.axis2.builder.unknowncontent.InputStreamDataSource;
>
> InputStreamDataSource ds = new
> InputStreamDataSource(request.getInputStream());
> DataHandler dh = new DatHandler(ds);
>
> This doesn't seem to be working for me.
>
>
> Thanks,
> Vish
>
>
>
> On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mg...@hotmail.com> wrote:
>>
>> the most prevelant input source is OMSource which extends
>> org.xml.sax.InputSource defined here:
>>
>> package org.apache.axiom.om.impl.jaxp;
>> import javax.xml.transform.sax.SAXSource;
>> import org.apache.axiom.om.OMElement;
>> import org.apache.axiom.om.impl.serialize.OMXMLReader;
>> import org.xml.sax.InputSource;
>>
>> /**
>>  * Implementation of {@link javax.xml.transform.Source} for AXIOM.
>>  * The implementation is based on {@link SAXSource} and directly
>> transforms an AXIOM
>>  * tree into a stream of SAX events using {@link OMXMLReader}.
>>  * <p>
>>  * Note that {@link org.apache.axiom.om.OMDocType} nodes are not supported
>> and will be
>>  * silently skipped.
>>  */
>> public class OMSource extends SAXSource {
>>     public OMSource(OMElement element) {
>>         super(new OMXMLReader(element), new InputSource());
>>     }
>> }
>>
>> perhaps if you could display your definition(s) of InputStreamDatasource
>> class
>> we could better suggest an implementation which will accomodate your needs
>>
>> Martin
>> ______________________________________________
>> Verzicht und Vertraulichkeitanmerkung
>>
>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
>> dient lediglich dem Austausch von Informationen und entfaltet keine
>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>
>>
>>
>>
>> ________________________________
>> Date: Thu, 13 May 2010 12:01:41 -0700
>> Subject: Re: InputStream to DataSource In Axis2
>> From: shahvishwal@gmail.com
>> To: java-user@axis.apache.org
>>
>> Anyone? Any help would be greatly appreciated. i cant write it to a drive,
>> it has to be an in memory conversion.
>>
>>
>> -Vish
>>
>> On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <sh...@gmail.com>
>> wrote:
>>
>> Hi,
>> Is there any Datasource inbuilt into Axis2 which can take
>> Inputstream(Large data, almost 200 megs) ? I tried using
>> InputStreamDataSource, but for some reason i am getting an error and i have
>> been reading about issues using InputStreamDatasource. Also, i am not sure
>> if it can handle large data (the MTOM way). Any help would be greatly
>> appreciated
>>
>>
>> Thanks,
>> Vish
>>
>> ________________________________
>> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with
>> Hotmail. Get busy.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: InputStream to DataSource In Axis2

Posted by Vishwal Shah <sh...@gmail.com>.
Hi,
My Application receives a Http Post from another web application which sends
~150mgs of data, i need to take that data and create a DataHandler (MTOM)
and make a webservice call to another webapp. Its kind of pass through. i
cannot copy that data onto any drive, it needs to create a DataHandler from
the inputstream received from HttpRequest. I tried using

import org.apache.axis2.builder.unknowncontent.InputStreamDataSource;

InputStreamDataSource ds = new
InputStreamDataSource(request.getInputStream());
DataHandler dh = new DatHandler(ds);

This doesn't seem to be working for me.


Thanks,
Vish



On Thu, May 13, 2010 at 1:37 PM, Martin Gainty <mg...@hotmail.com> wrote:

>  the most prevelant input source is OMSource which extends
> org.xml.sax.InputSource defined here:
>
> package org.apache.axiom.om.impl.jaxp;
> import javax.xml.transform.sax.SAXSource;
> import org.apache.axiom.om.OMElement;
> import org.apache.axiom.om.impl.serialize.OMXMLReader;
> import org.xml.sax.InputSource;
>
> /**
>  * Implementation of {@link javax.xml.transform.Source} for AXIOM.
>  * The implementation is based on {@link SAXSource} and directly transforms
> an AXIOM
>  * tree into a stream of SAX events using {@link OMXMLReader}.
>  * <p>
>  * Note that {@link org.apache.axiom.om.OMDocType} nodes are not supported
> and will be
>  * silently skipped.
>  */
> public class OMSource extends SAXSource {
>     public OMSource(OMElement element) {
>         super(new OMXMLReader(element), new InputSource());
>     }
> }
>
> perhaps if you could display your definition(s) of InputStreamDatasource
> class
> we could better suggest an implementation which will accomodate your needs
>
> Martin
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>
>
>
>
> ------------------------------
> Date: Thu, 13 May 2010 12:01:41 -0700
> Subject: Re: InputStream to DataSource In Axis2
> From: shahvishwal@gmail.com
> To: java-user@axis.apache.org
>
>
> Anyone? Any help would be greatly appreciated. i cant write it to a drive,
> it has to be an in memory conversion.
>
>
> -Vish
>
> On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <sh...@gmail.com>wrote:
>
> Hi,
> Is there any Datasource inbuilt into Axis2 which can take Inputstream(Large
> data, almost 200 megs) ? I tried using InputStreamDataSource, but for some
> reason i am getting an error and i have been reading about issues using
> InputStreamDatasource. Also, i am not sure if it can handle large data (the
> MTOM way). Any help would be greatly appreciated
>
>
>
> Thanks,
> Vish
>
>
>
> ------------------------------
> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with
> Hotmail. Get busy.<http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5>
>

RE: InputStream to DataSource In Axis2

Posted by Martin Gainty <mg...@hotmail.com>.
the most prevelant input source is OMSource which extends org.xml.sax.InputSource defined here:

package org.apache.axiom.om.impl.jaxp;
import javax.xml.transform.sax.SAXSource;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.impl.serialize.OMXMLReader;
import org.xml.sax.InputSource;

/**
 * Implementation of {@link javax.xml.transform.Source} for AXIOM.
 * The implementation is based on {@link SAXSource} and directly transforms an AXIOM
 * tree into a stream of SAX events using {@link OMXMLReader}.
 * <p>
 * Note that {@link org.apache.axiom.om.OMDocType} nodes are not supported and will be
 * silently skipped.
 */
public class OMSource extends SAXSource {
    public OMSource(OMElement element) {
        super(new OMXMLReader(element), new InputSource());
    }
}

perhaps if you could display your definition(s) of InputStreamDatasource class 
we could better suggest an implementation which will accomodate your needs

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.




Date: Thu, 13 May 2010 12:01:41 -0700
Subject: Re: InputStream to DataSource In Axis2
From: shahvishwal@gmail.com
To: java-user@axis.apache.org

Anyone? Any help would be greatly appreciated. i cant write it to a drive, it has to be an in memory conversion.


-Vish

On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <sh...@gmail.com> wrote:

Hi,Is there any Datasource inbuilt into Axis2 which can take Inputstream(Large data, almost 200 megs) ? I tried using InputStreamDataSource, but for some reason i am getting an error and i have been reading about issues using InputStreamDatasource. Also, i am not sure if it can handle large data (the MTOM way). Any help would be greatly appreciated




Thanks,Vish 

 		 	   		  
_________________________________________________________________
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

Re: InputStream to DataSource In Axis2

Posted by Vishwal Shah <sh...@gmail.com>.
Anyone? Any help would be greatly appreciated. i cant write it to a drive,
it has to be an in memory conversion.


-Vish

On Thu, May 13, 2010 at 8:56 AM, Vishwal Shah <sh...@gmail.com> wrote:

> Hi,
> Is there any Datasource inbuilt into Axis2 which can take Inputstream(Large
> data, almost 200 megs) ? I tried using InputStreamDataSource, but for some
> reason i am getting an error and i have been reading about issues using
> InputStreamDatasource. Also, i am not sure if it can handle large data (the
> MTOM way). Any help would be greatly appreciated
>
>
>
> Thanks,
> Vish
>