A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Passing multiple XML objects using curl
Joined: Oct 16, 2011
Apr 06, 2012 02:56:05
The following cul command works
curl -X PUT -HContent-type:application/xml --data "<User><ip_address>foo</ip_address></User>"
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>""
fails ? one object is User and other is Field
Joined: Jan 29, 2012
May 05, 2012 10:16:28
Please try below:
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
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:
curl -X PUT -d @test.xml http://localhost:8080/EdaRest/rest/sub/Whatever -H "Content-Type: text/xml"
I agree. Here's the link:
subject: Passing multiple XML objects using curl
some basic queries regarding value stack in struts 2?
I really stuck and need help
Why is this PUT called in REST webservice
Same method in two classes - conflict?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014