Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Passing large documents via web services (http://www.velocityreviews.com/forums/t390722-passing-large-documents-via-web-services.html)

jro 02-08-2007 10:23 PM

Passing large documents via web services
 
Suppose I am developing a web service with the following features:
- doc/literal
- has an operation whose input message has a part whose type is
defined by a schema
- The documents that is will be receiving can be quite large
I want to develop this service in a top down fashion - i.e. starting
with the wsdl.
I don't want to use generated java classes based on the schema due to
the size of the documents. If I use a java object generated from the
schema, the entire document will have to be pulled into memory,
killing performance.
What are my options?


Chris 02-09-2007 10:08 PM

Re: Passing large documents via web services
 
jro wrote:
> Suppose I am developing a web service with the following features:
> - doc/literal
> - has an operation whose input message has a part whose type is
> defined by a schema
> - The documents that is will be receiving can be quite large
> I want to develop this service in a top down fashion - i.e. starting
> with the wsdl.
> I don't want to use generated java classes based on the schema due to
> the size of the documents. If I use a java object generated from the
> schema, the entire document will have to be pulled into memory,
> killing performance.
> What are my options?
>


This is a tough one, because web services are message-based, which means
the whole thing is sent at once. You probably want something
stream-based, which will allow you to process the docs a piece at a time.

You might have the web service return a URL that points at the doc,
instead of the doc itself. Then the receiving process can use the URL to
pull the doc across at its leisure.

=?ISO-8859-1?Q?Arne_Vajh=F8j?= 02-10-2007 06:55 PM

Re: Passing large documents via web services
 
jro wrote:
> Suppose I am developing a web service with the following features:
> - doc/literal
> - has an operation whose input message has a part whose type is
> defined by a schema
> - The documents that is will be receiving can be quite large
> I want to develop this service in a top down fashion - i.e. starting
> with the wsdl.
> I don't want to use generated java classes based on the schema due to
> the size of the documents. If I use a java object generated from the
> schema, the entire document will have to be pulled into memory,
> killing performance.
> What are my options?


Web Services is really a type of API it is not a file
transfer protocol.

If you want to make a call it is a standard requirement to
have the argument in memory.

If you really want to move a file use a protocol designed
for that: FTP, plain HTTP etc..

Arne


All times are GMT. The time now is 01:56 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57