aspose 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
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: 1676
    
    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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to send xml in request using spring rest template with post method