wood burning stoves*
The moose likes Web Services and the fly likes restful service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "restful service" Watch "restful service" New topic

restful service

karibasappa Guttur Chikkaveerappa

Joined: Jan 26, 2013
Posts: 11
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

Joined: Mar 22, 2005
Posts: 41601
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/

Ping & DNS - my free Android networking tools app
karibasappa Guttur Chikkaveerappa

Joined: Jan 26, 2013
Posts: 11
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

Joined: Mar 22, 2000
Posts: 12769
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.


I agree. Here's the link: http://aspose.com/file-tools
subject: restful service