Is that the nightly build? I could try, but what is the expected behavior ? Since the service generated stub is defined as "synchronous", Is the beaviour I am seeing expected ? does an Axis2 client caches all the attachment before returning?
On Mon, Jun 7, 2010 at 6:48 PM, Andreas Veithen <[email protected]>wrote: > Jorge, > > Can you try that with Axis2 1.6-SNAPSHOT? > > Andreas > > On Mon, Jun 7, 2010 at 23:58, Jorge Medina <[email protected]> > wrote: > > Hi Axis2 users: > > > > I am accessing a service that provides the response with an MTOM > > attachment. (The attachment can be just hundreds of KB up to 75 MB). > > I am using an Axis2 v 1.5.1 client. > > My client code looks something like: > > > > > > MyServiceResponse myServiceResponse= > > service.downloadTable(tableid); > > DataHandler dataHandler = myServiceResponse.getTableFile(); > > is = new GZIPInputStream( new BufferedInputStream( > > dataHandler.getInputStream() ) ); > > BufferedReader br = new BufferedReader( new > InputStreamReader( > > is, "UTF-8") ); > > int members =0; > > for(String line = br.readLine(); line != null; line = > > br.readLine() ) { > > // do something with the record here ... > > System.out.println(line); > > } > > > > where "service" is the generated stub using ADB databinding. > > > > wsdl2java -o myoutputpath -d adb -u -uw -ap -or -uri > > http://url/to/my/service.wsdl > > > > The The attachment is a tab-separated text file that has been gzipped. > > The file is produced "on-the-fly" from a database, there is never a > physical > > file. > > The server uses SpringWS with JAXB as the marshaller/unmarshaller with > mtom > > enabled. > > But I believe these details are irrelevant. > > > > I was expecting that the call to service.downloadTable(tableid) would > return > > almost immediately and that the file would be streamed, resulting on > > execution of the loop in parallel as the server provides the file. > > But what I am observing is that my server streams the whole file (table) > and > > just after all the data was sent (according to server logs) then the > call > > to downloadTable(tableid) returns and the loop starts executing. > > > > Is the client caching the attachment prior to return from > > service.downloadTable(tableid) ? I noticed the memory used by the JVM > > increases, but that does not prove anything) > > > > Is there a way to make the call such as the loop will start executing as > the > > file is streamed ? > > > > -Jorge > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
