Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Neet to write web services response in file

 
Ranveer K Kumar
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am very new in Web Services.

I need to receive response.

for example:

http://www.example.com/getDataAll

after requesting above URL I am receiving response in xml format.

Now I need to write the response in file.(whatever response is coming).

please suggest..

thanks
Ranveer K
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of client is this? How is it accessing the service?
 
Ranveer K Kumar
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:What kind of client is this? How is it accessing the service?


I am using using http post.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then you can get at the response as shown here: http://www.exampledepot.com/egs/java.net/Post.html Then it's just a matter of writing the data from the Stream/Reader to a file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic