curl-users
Re: Need to send and receive xml data using curl
Date: Fri, 12 Jun 2015 01:30:15 +0200
On Wed, Jun 10, 2015 at 03:55:25PM -0600, Sourin Maiti wrote:
> I use SoapUI to verify my responses below are the sample details. I am planning
> to automate the processes in linux. How can I achieve it using curl? or wget? I
I'll list the curl options as you mention them.
> would like to receive the result in a file.
-o file
> Raw SoapUI request:
>
> POST http://soa-internal.xxxxxx.yyyyyy.com:30160/B2BGateway/execute/XMLSelect
> HTTP/1.1
http://soa-internal.xxxxxx.yyyyyy.com:30160/B2BGateway/execute/XMLSelect
> Accept-Encoding: gzip,deflate
> Content-Type: text/xml;charset=UTF-8
-H 'Content-Type: text/xml;charset=UTF-8'
> SOAPAction: "https://webservices.xxxxxx.com/SubmitXml"
-H 'SOAPAction: "https://webservices.xxxxxx.com/SubmitXml"'
> Authorization: Basic R1dTL0FQT1RFU1RJTkdVU0VSOkFwMHRlc3Rpbmc=
-u user:pass
> Content-Length: 7082
> Host: xxxxxx.yyyyyy.com:30160
> Connection: Keep-Alive
> User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Probably don't need this line, but -A would set it.
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:web="http://webservices.galileo.com">
> <soapenv:Header/>
> <soapenv:Body>
> <web:SubmitXml>
> X
> X
> X
> X
> X
> X
> X
>
> </web:SubmitXml>
> </soapenv:Body>
> </soapenv:Envelope>
Put the data into a file and use: -d @file.xml
> Really Appreciate your response.
There you go!
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-06-12