cURL / Mailing Lists / curl-library / Single Mail

curl-library

Howto question - SOAP on the command line

From: Dan White <ygor_at_comcast.net>
Date: Tue, 19 Apr 2005 15:54:34 -0400 (EDT)

  I would like to use curl (on a command line/in a script) to do the
  equivalent of this wget command :

  wget --http-user='username' --http-passwd='password'
--post-file='soap.xml' --header='Accept-Encoding:gzip'
http://datadirect.webservices.zap2it.com/tvlistings/xtvdService
--output-document=outputFile.gz

But I cannot figure it out from the documentation.

The XML file contains:
<?xml version='1.0' encoding='utf-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'>
         <SOAP-ENV:Body>
                 <tms:download xmlns:tms='urn:TMSWebServices'>
                         <startTime
xsi:type='xsd:dateTime'>2005-04-09T00:05:00Z</startTime>
                         <endTime
xsi:type='xsd:dateTime'>2005-04-09T00:06:00Z</endTime>
                 </tms:download>
         </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The difficulty seems to be that this service responds with
"HTTP/1.1 401 Unauthorized"

but then responds with a large XML statement.

I am trying to get this to work with curl so that I can then code it into
an application with libcurl.

Or should I just go straight to the library ?

Thanks.
Received on 2005-04-19