Return-Path: Delivered-To: apmail-axis-java-user-archive@www.apache.org Received: (qmail 33559 invoked from network); 14 May 2010 18:49:28 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 May 2010 18:49:28 -0000 Received: (qmail 35737 invoked by uid 500); 14 May 2010 18:49:26 -0000 Delivered-To: apmail-axis-java-user-archive@axis.apache.org Received: (qmail 35693 invoked by uid 500); 14 May 2010 18:49:26 -0000 Mailing-List: contact java-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@axis.apache.org Delivered-To: mailing list java-user@axis.apache.org Received: (qmail 35685 invoked by uid 99); 14 May 2010 18:49:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 May 2010 18:49:26 +0000 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=AWL,FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mgainty@hotmail.com designates 65.55.116.88 as permitted sender) Received: from [65.55.116.88] (HELO blu0-omc3-s13.blu0.hotmail.com) (65.55.116.88) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 May 2010 18:49:19 +0000 Received: from BLU142-W11 ([65.55.116.73]) by blu0-omc3-s13.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 14 May 2010 11:48:58 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_971b77a3-19f3-429b-9fc1-d4955e7f5d84_" X-Originating-IP: [71.232.74.24] From: Martin Gainty To: Subject: RE: InputStream to DataSource In Axis2 Date: Fri, 14 May 2010 14:48:58 -0400 Importance: Normal In-Reply-To: References: ,,, MIME-Version: 1.0 X-OriginalArrivalTime: 14 May 2010 18:48:58.0729 (UTC) FILETIME=[1CCC8590:01CAF396] --_971b77a3-19f3-429b-9fc1-d4955e7f5d84_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable //its possible this content type should be processed as REST .. check to se= e if your content type is=20 * 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=20 false =20 //here is the processing notice SOAP content-types are either application/s= oap+xml or text/xml if (contentType !=3D null) { if (contentType.indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE) >= -1) { //application/soap+xml soapVersion =3D VERSION_SOAP12=3B TransportUtils.processContentTypeForAction(contentType=2C m= sgContext)=3B } else if (contentType .indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) > -1) { = //text/xml soapVersion =3D VERSION_SOAP11=3B } else if (isRESTRequest(contentType)) { // If REST=2C construct a SOAP11 envelope to hold the rest = message and // indicate that this is a REST message. soapVersion =3D VERSION_SOAP11=3B msgContext.setDoingREST(true)=3B } ? Martin Gainty=20 ______________________________________________=20 Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit= =E9 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng= er sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiter= leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient l= ediglich dem Austausch von Informationen und entfaltet keine rechtliche Bin= dungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen w= ir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes= pas le destinataire pr=E9vu=2C nous te demandons avec bont=E9 que pour sat= isfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e= ou la copie de ceci est interdite. Ce message sert =E0 l'information seule= ment et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant d= onn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation= =2C nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni= . =20 Date: Fri=2C 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=2C My Application receives a Http Post from another web application which send= s ~150mgs of data=2C i need to take that data and create a DataHandler (MTO= M) and make a webservice call to another webapp. Its kind of pass through. = i cannot copy that data onto any drive=2C it needs to create a DataHandler = from the inputstream received from HttpRequest. I tried using=20 import org.apache.axis2.builder.unknowncontent.InputStreamDataSource=3B InputStreamDataSource ds =3D new InputStreamDataSource(request.getInputStre= am())=3B =20 DataHandler dh =3D new DatHandler(ds)=3B This doesn't seem to be working for me.=20 Thanks=2C Vish On Thu=2C May 13=2C 2010 at 1:37 PM=2C Martin Gainty = wrote: the most prevelant input source is OMSource which extends org.xml.sax.Input= Source defined here: package org.apache.axiom.om.impl.jaxp=3B import javax.xml.transform.sax.SAXSource=3B import org.apache.axiom.om.OMElement=3B import org.apache.axiom.om.impl.serialize.OMXMLReader=3B import org.xml.sax.InputSource=3B /** * 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}. *

* 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)=2C new InputSource())=3B } } perhaps if you could display your definition(s) of InputStreamDatasource cl= ass=20 we could better suggest an implementation which will accomodate your needs Martin=20 ______________________________________________=20 Verzicht und Vertraulichkeitanmerkung =20 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng= er sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiter= leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient l= ediglich dem Austausch von Informationen und entfaltet keine rechtliche Bin= dungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen w= ir keine Haftung fuer den Inhalt uebernehmen. Date: Thu=2C 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= =2C it has to be an in memory conversion. -Vish On Thu=2C May 13=2C 2010 at 8:56 AM=2C Vishwal Shah = wrote: Hi=2C Is there any Datasource inbuilt into Axis2 which can take Inputstream(Large= data=2C almost 200 megs) ? I tried using InputStreamDataSource=2C but for = some reason i am getting an error and i have been reading about issues usin= g InputStreamDatasource. Also=2C i am not sure if it can handle large data = (the MTOM way). Any help would be greatly appreciated Thanks=2C Vish=20 The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with H= otmail. Get busy. =20 _________________________________________________________________ Hotmail has tools for the New Busy. Search=2C chat and e-mail from your inb= ox. http://www.windowslive.com/campaign/thenewbusy?ocid=3DPID28326::T:WLMTAGL:O= N:WL:en-US:WM_HMP:042010_1= --_971b77a3-19f3-429b-9fc1-d4955e7f5d84_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable //its possible this content type should be processed as =3BREST =3B= .. check to see if your content type is
 =3B =3B =3B =3B * 1. application/xml
 =3B =3B&n= bsp=3B =3B * 2. application/x-www-form-urlencoded
 =3B =3B&n= bsp=3B =3B * 3. multipart/form-data

//also check the disableRest parameter in axis2.xml is disabled e.g. so you= can use RESTprocessing
 =3B =3B =3B <=3B!-- Following parameter will completely disa= ble REST handling in Axis2-->=3B
 =3B =3B =3B <=3Bparame= ter name=3D"disableREST" locked=3D"false">=3Bfalse<=3B/parameter>=3B<= BR>  =3B
//here is the processing notice SOAP content-types are either application/s= oap+xml or text/xml
 =3B =3B =3B =3B =3B =3B&nbs= p=3B if (contentType !=3D null) {
 =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B if (contentType.indexOf= (SOAP12Constants.SOAP_12_CONTENT_TYPE) >=3B -1) { //application/soap+xml<= BR> =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B soapVersion =3D VERSION_SO= AP12=3B
 =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B TransportUtils.pro= cessContentTypeForAction(contentType=2C msgContext)=3B
 =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B } e= lse if (contentType
 =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B .indexOf(SOAP11Constants.SOAP_11_CONTENT_TYPE) = >=3B -1) { =3B =3B =3B =3B =3B =3B //text/xml
=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B soapVersion =3D VERSION_SOAP1= 1=3B
 =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B } else if (isRESTRequest(contentType)) {
 =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B // If REST=2C construct a SOAP11 envel= ope to hold the rest message and
 =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B // indicate that this is a REST message.
 =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B soapVersion =3D VERSION_SOAP11=3B
 =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B msgContext.setDoingREST(true)=3B
 = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B }

?
Martin Gainty
______________________________________________
V= erzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit=E9=

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene = Empfaenger sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugt= e Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht= dient lediglich dem Austausch von Informationen und entfaltet keine rechtl= iche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails k= oennen wir keine Haftung fuer den Inhalt uebernehmen.

Ce message es=
t confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes pas le desti=
nataire pr=E9vu=2C nous te demandons avec bont=E9 que pour satisfaire infor=
mez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e ou la copie =
de ceci est interdite. Ce message sert =E0 l'information seulement et n'aur=
a pas n'importe quel effet l=E9galement obligatoire. =C9tant donn=E9 que le=
s email peuvent facilement =EAtre sujets =E0 la manipulation=2C nous ne pou=
vons accepter aucune responsabilit=E9 pour le contenu fourni.


=

 =3B

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

Hi=2C
My Application receives a Http Post from another web a= pplication which sends ~150mgs of data=2C i need to take that data and crea= te a DataHandler (MTOM) and make a webservice call to another webapp. Its k= ind of pass through. i cannot copy that data onto any drive=2C it needs to = create a DataHandler from the inputstream received from HttpRequest. I trie= d using

import org.apache.axis2.builder.unknowncontent.InputStreamD= ataSource=3B

InputStreamDataSource ds =3D new InputStreamDataSource(= request.getInputStream())=3B =3B
DataHandler dh =3D new DatHandler(= ds)=3B

This doesn't seem to be working for me.


Thanks=2C=
Vish



On Thu=2C May 13=2C 2010 at 1:37 PM=2C Martin G= ainty <=3Bmgainty@= hotmail.com>=3B wrote:
the most prevelant input source is OMSource which extends org.xml.sax.= InputSource defined here:

package org.apache.axiom.om.impl.jaxp=3Bimport javax.xml.transform.sax.SAXSource=3B
import org.apache.axiom.om= .OMElement=3B
import org.apache.axiom.om.impl.serialize.OMXMLReader=3Bimport org.xml.sax.InputSource=3B

/**
 =3B* Implementation = of {@link javax.xml.transform.Source} for AXIOM.
 =3B* The implement= ation is based on {@link SAXSource} and directly transforms an AXIOM
&nb= sp=3B* tree into a stream of SAX events using {@link OMXMLReader}.
 = =3B* <=3Bp>=3B
 =3B* Note that {@link org.apache.axiom.om.OMDocT= ype} nodes are not supported and will be
 =3B* silently skipped.
=  =3B*/
public class OMSource extends SAXSource {
 =3B =3B=  =3B public OMSource(OMElement element) {
 =3B =3B =3B&n= bsp=3B =3B =3B =3B super(new OMXMLReader(element)=2C new InputS= ource())=3B
 =3B =3B =3B }
}

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

Martin=
______________________________________________
Verzicht und Vertra= ulichkeitanmerkung
 =3B
Diese Nachricht ist vertraulich. Sollten Sie nicht der vor= gesehene Empfaenger sein=2C 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 kei= ne rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von = E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.




Date: Thu=2C 13 May 2010 12:01:41 -0700
Subject: Re: InputStream to Data= Source In Axis2
From: shahvishw= al@gmail.com
To: java-u= ser@axis.apache.org


Anyone? Any help would be greatly appreciated. i ca= nt write it to a drive=2C it has to be an in memory conversion.


= -Vish

On Thu=2C May 13=2C 2010 at 8:56 AM=2C Vishwal Shah &l= t=3Bshahvishwal@gmail.com>= =3B wrote:
Hi=2C
Is there any Datasource inbuilt into Axis2 which can take Inputstream(= Large data=2C almost 200 megs) ? I tried using InputStreamDataSource=2C but= for some reason i am getting an error and i have been reading about issues= using InputStreamDatasource. Also=2C i am not sure if it can handle large = data (the MTOM way). Any help would be greatly appreciated



Thanks=2C
Vish =3B



The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with H= otmail. G= et busy.



Hotm= ail has tools for the New Busy. Search=2C chat and e-mail from your inbox. = Learn more. = --_971b77a3-19f3-429b-9fc1-d4955e7f5d84_--