how to return .xml file from web service?

Discussion in 'Java' started by Bharat, Sep 5, 2006.

  1. Bharat

    Bharat Guest

    Hi Everybody...

    I have one web service ,which interacts with database and creates one
    ..xml file, now I want to pass this file to client...

    can I return this file from web service to client....if yes plz tell me
    how??

    Thanks
    Bharat
     
    Bharat, Sep 5, 2006
    #1
    1. Advertising

  2. Bharat

    Zaph0d Guest

    Well, baisically, you have three options:
    1. Returned escaped XML as xsd:string. This is usually very easy to do.
    However this denies you from checking against a schema - your client
    will have to have "blind faith" in the xml you send instead of being
    able to verify it against the web service schema.
    2. Change your schema to include the returned xml, then return the xml
    by returning it's root. This is usually much harder to do with
    automatic tools, but will enable the client to know if the xml you sent
    is valid.
    3. Use a seperate cache and send the client the key. This should be
    done only if the web service is asynchronous and then it's usually the
    only option then. This can be done by either using an internal cache
    and another web service request (then you're back to 1 and 2), or by
    external cache (ftp/http).
     
    Zaph0d, Sep 5, 2006
    #2
    1. Advertising

  3. Bharat wrote:
    > I have one web service ,which interacts with database and creates one
    > .xml file, now I want to pass this file to client...
    >
    > can I return this file from web service to client....if yes plz tell me
    > how??


    Do you really want to send your XML embedded in SOAP XML ?

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Sep 5, 2006
    #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. Bharat
    Replies:
    2
    Views:
    5,924
    Bharat
    Sep 13, 2006
  2. Greenhorn
    Replies:
    15
    Views:
    834
    Keith Thompson
    Mar 6, 2005
  3. Richard A. Wells

    Receive and return bare XML in C#/ASP.NET Web Service

    Richard A. Wells, Dec 12, 2003, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    1,788
  4. R.A.

    how to return xml document from a web service

    R.A., Nov 24, 2004, in forum: ASP .Net Web Services
    Replies:
    4
    Views:
    546
    Dan Rogers
    Nov 29, 2004
  5. Leo Violette
    Replies:
    0
    Views:
    1,056
    Leo Violette
    Apr 17, 2009
Loading...

Share This Page