Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

restful service

 
karibasappa Guttur Chikkaveerappa
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

how the processing of xml can be done by rest service. and how clent can pass the xml to rest service.
please help me on this. its urgent.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which API are you using - JAX-RS? If so, look here for some options: http://stackoverflow.com/questions/1725315/how-to-get-full-rest-request-body-using-jersey/
 
karibasappa Guttur Chikkaveerappa
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi dear, thank you for the help. yes i am using Jersy API.

the link is good, but there is no client program. can you give me the client code to pass xml to the rest service?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since RESTful services are based on HTTP methods, all you need are the standard library java.net.HttpURLConnection and related classes to create a HTTP POST request to the URL of the service with the body of the request containing the text of the XML document.

Nothing magic about it - so much simpler than SOAP.

Of course the various toolkits for RESTful services contain examples, but the client side is always very simple.

Bill

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic