Return-Path: Delivered-To: apmail-axis-java-user-archive@www.apache.org Received: (qmail 63008 invoked from network); 20 May 2010 11:12:27 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 May 2010 11:12:27 -0000 Received: (qmail 48409 invoked by uid 500); 20 May 2010 11:12:25 -0000 Delivered-To: apmail-axis-java-user-archive@axis.apache.org Received: (qmail 48355 invoked by uid 500); 20 May 2010 11:12:25 -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 48347 invoked by uid 99); 20 May 2010 11:12:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 May 2010 11:12:25 +0000 X-ASF-Spam-Status: No, hits=3.8 required=10.0 tests=FREEMAIL_FROM,FREEMAIL_REPLY,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of andreas.veithen@gmail.com designates 209.85.161.45 as permitted sender) Received: from [209.85.161.45] (HELO mail-fx0-f45.google.com) (209.85.161.45) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 May 2010 11:12:18 +0000 Received: by fxm6 with SMTP id 6so590969fxm.32 for ; Thu, 20 May 2010 04:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=mvyrZYLpiP4+MPu+w8rD2yflx9zIKtXShu1OF0tGHbw=; b=CcwqyhaNwDfwEP9ClOzC0/bOR0iyNicW9O600j7OoAQIZw6R1Zxr2/HLs05NaSNycW /ihbGnN2pKZrcSGSkqhiP+rbCPP422eQKlb+FDITKnDurEoY/8+vZiCi1jpHWII3sy9x 3Rw0TJp6ElddT/P11rahGlREr8v39PdTfY/MQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=obBCn71foin2ra/lKWhsvgl/T4LRktIKhLPqDn2rUptgJRoJFkIGEWH+o18Zk/ivUX ZY8vY9SC5qGIW9dSRrfuTcqjwOpUa54tHwVuhexisjFTFQRppZVf5deSlo36Ui2PZW7e Nr8lM5s7kwFufkmDHqDEX1SEZNeX16UAPtokg= Received: by 10.239.129.136 with SMTP id 8mr959980hbf.50.1274353918089; Thu, 20 May 2010 04:11:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.239.181.83 with HTTP; Thu, 20 May 2010 04:11:38 -0700 (PDT) In-Reply-To: References: From: Andreas Veithen Date: Thu, 20 May 2010 13:11:38 +0200 Message-ID: Subject: Re: InputStream to DataSource In Axis2 To: java-user@axis.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, May 20, 2010 at 00:18, Nirav Shah 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 seem= ed > 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=A0 and have the following set > > > soapBindingStub._getServiceClient().getOptions().setProperty(Constants.Co= nfiguration.ENABLE_MTOM,Constants.VALUE_TRUE); > > > Intercepted Message header: > > POST /axis2/services/sampleApp HTTP/1.1 > Content-Type: multipart/related; > boundary=3DMIMEBoundaryurn_uuid_74D2AE27EAED433D531274307161705; > type=3D"application/xop+xml"; > start=3D"<0.urn:uuid:74D2AE27EAED433D531274307161706@apache.org>"; > start-info=3D"text/xml" > SOAPAction: "sendRequest" > User-Agent: Axis2 > Host: localhost:8088 > Transfer-Encoding: chunked > > 23a5 > --MIMEBoundaryurn_uuid_74D2AE27EAED433D531274307161705 > Content-Type: application/xop+xml; charset=3DUTF-8; type=3D"text/xml" > Content-Transfer-Encoding: binary > Content-ID: <0.urn:uuid:74D2AE27EAED433D531274307161706@apache.org> > > > > Thanks, > Vish > > > On Wed, May 19, 2010 at 1:31 PM, Andreas Veithen > 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 wrot= e: >> > 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 >> > 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 >> >> 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.InputStreamDataSourc= e; >> >> > >> >> > InputStreamDataSource ds =3D new >> >> > InputStreamDataSource(request.getInputStream()); >> >> > DataHandler dh =3D 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 >> >> > 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; >> >> >> >> >> >> /** >> >> >> =A0* Implementation of {@link javax.xml.transform.Source} for AXIO= M. >> >> >> =A0* The implementation is based on {@link SAXSource} and directly >> >> >> transforms an AXIOM >> >> >> =A0* tree into a stream of SAX events using {@link OMXMLReader}. >> >> >> =A0*

>> >> >> =A0* Note that {@link org.apache.axiom.om.OMDocType} nodes are not >> >> >> supported >> >> >> and will be >> >> >> =A0* silently skipped. >> >> >> =A0*/ >> >> >> public class OMSource extends SAXSource { >> >> >> =A0=A0=A0 public OMSource(OMElement element) { >> >> >> =A0=A0=A0=A0=A0=A0=A0 super(new OMXMLReader(element), new InputSou= rce()); >> >> >> =A0=A0=A0 } >> >> >> } >> >> >> >> >> >> perhaps if you could display your definition(s) of >> >> >> InputStreamDatasource >> >> >> class >> >> >> we could better suggest an implementation which will accomodate yo= ur >> >> >> 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 kein= e >> >> >> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkei= t >> >> >> 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 >> >> >> >> >> >> 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 a= nd >> >> >> 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 calenda= rs >> >> >> 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