File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Saving a PDF from a URL in my Server. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Saving a PDF from a URL in my Server." Watch "Saving a PDF from a URL in my Server." New topic

Saving a PDF from a URL in my Server.

Thapliyal Akshat

Joined: Jun 04, 2009
Posts: 29
Hello Everyone,

I have created a web service client using Axis2. Within the response I get a PDF URL which the Web service has created on its own server. The Web service is developed by a third party.

My concern is how can I save that PDF on my servers. I need exact replica of the actual PDF because that PDF is mailed to every customer.

I know that there are lot of API's available to which I can pass the URL but Is there any other way through which I can achieve this using the Web Service technologies.

Thanks and Regards,
Akshat Thapliyal
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

You can open a URLConnection and stream the data to your server. Is that what you want ?

If the URL sent by the web service is public and unprotected, then you can simply pass that URL to your clients. They can download it from there if they want to. Reliability of the third party server will be a matter for consideration of course.

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
I agree. Here's the link:
subject: Saving a PDF from a URL in my Server.
jQuery in Action, 3rd edition