Passing large documents via web services

Discussion in 'Java' started by jro, Feb 8, 2007.

  1. jro

    jro Guest

    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?
    jro, Feb 8, 2007
    #1
    1. Advertising

  2. jro

    Chris Guest

    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.
    Chris, Feb 9, 2007
    #2
    1. Advertising

  3. 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
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Feb 10, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    10
    Views:
    9,626
    Chris Uppal
    Oct 28, 2005
  2. 8
    Replies:
    1
    Views:
    1,551
  3. Mike
    Replies:
    4
    Views:
    874
    Bob Foster
    Nov 23, 2003
  4. Replies:
    1
    Views:
    478
    Juan T. Llibre
    Oct 18, 2006
  5. John
    Replies:
    4
    Views:
    439
Loading...

Share This Page