• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

restful service

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic