File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes How to send xml in request using spring rest template with post method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "How to send xml in request using spring rest template with post method" Watch "How to send xml in request using spring rest template with post method" New topic
Author

How to send xml in request using spring rest template with post method

Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
Hi,

I have to send xml with request for post method using spring rest template.I tried to find some code from Google but i could not.
Can anyone let me know any working code example by which i can send xml(post method) using spring rest template.


Thanks
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

Have you looked at the reference documentation?
http://static.springsource.org/spring/docs/3.2.1.RELEASE/spring-framework-reference/htmlsingle/#rest-client-access

There is a postForObject(...) postForLocation(...) and exchange(...) method that can all be used depending on your needs. Please have a look and give these a try. If you have problems post back with what you have tried and we will see if we can help you.


[How To Ask Questions][Read before you PM me]
Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
Thanks Bill
After few attempts i am able to write code.
 
jQuery in Action, 2nd edition
 
subject: How to send xml in request using spring rest template with post method
 
Similar Threads
Rendering XML as a response of @RequestMapping
Within the infrastruture - How to and Where - to intercept HTTP request and to send HTTP response?
Transfer XML over REST POST
Any Free API's like Yahoo GEO?
Need XML elements marshalling / unmarshalling example code