This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes Web Services and the fly likes Passing multiple XML objects using curl Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Passing multiple XML objects using curl" Watch "Passing multiple XML objects using curl" New topic
Author

Passing multiple XML objects using curl

Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 230
The following cul command works
curl -X PUT -HContent-type:application/xml --data "<User><ip_address>foo</ip_address></User>" http://localhost:8080/Rest/rest/sub/Whatever
but when passing two objects like such

curl -X PUT -HContent-type:application/xml --data " "<User><ip_address>foo</ip_address></User>" "<Field><page_uri>something</page_uri></Field>"" http://localhost:8080/EdaRest/rest/sub/Whatever
fails ? one object is User and other is Field
Sp Wong
Greenhorn

Joined: Jan 29, 2012
Posts: 4
Please try below:



If you have too long XML request data to send over, you can place the XML into a file...and the execute your command like below:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing multiple XML objects using curl
 
Similar Threads
some basic queries regarding value stack in struts 2?
I really stuck and need help
Same method in two classes - conflict?
Why is this PUT called in REST webservice
message-resources reload