cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Howto question - SOAP on the command line

From: Dan White <ygor_at_comcast.net>
Date: Wed, 20 Apr 2005 06:54:40 -0400

I am afraid that does not help.

curl does not wait for the big XML.

===================================================
curl -v --digest --trace-ascii - -u userid:password -d @soap.xml
--compressed -o theOutputFile
http://datadirect.webservices.zap2it.com/tvlistings/xtvdService
== Info: About to connect() to datadirect.webservices.zap2it.com port 80
== Info: Connected to datadirect.webservices.zap2it.com (206.18.98.160)
port 80
=> Send header, 336 bytes (0x150)
0000: POST /tvlistings/xtvdService HTTP/1.1
0027: User-Agent: curl/7.11.1 (powerpc-apple-darwin7.9.0) libcurl/7.11
0067: .1 OpenSSL/0.9.7d ipv6 zlib/1.1.4
008a: Host: datadirect.webservices.zap2it.com
00b3: Pragma: no-cache
00c5: Accept: */*
00d2: Accept-Encoding: deflate, gzip
00f2: Content-Length: 562
0107: Content-Type: application/x-www-form-urlencoded
0138: Expect: 100-continue
014e:
<= Recv header, 23 bytes (0x17)
0000: HTTP/1.1 100 Continue
<= Recv header, 21 bytes (0x15)
0000: Server: Orion/2.0.2
<= Recv header, 37 bytes (0x25)
0000: Date: Wed, 20 Apr 2005 10:48:57 GMT
=> Send data, 562 bytes (0x232)
0000: <?xml version='1.0' encoding='utf-8'?><SOAP-ENV:Envelope xmlns:S
0040: OAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='h
0080: ttp://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/20
00c0: 01/XMLSchema-instance' xmlns:SOAP-ENC='http://schemas.xmlsoap.or
0100: g/soap/encoding/'> <SOAP-ENV:Body> <ns1:download xmln
0140: s:ns1='urn:TMSWebServices'> <startTime xsi:type='xsd:
0180: dateTime'>2005-04-20T00:00:00</startTime> <endTime xs
01c0: i:type='xsd:dateTime'>2005-04-20T00:06:00</endTime> </ns1
0200: :download> </SOAP-ENV:Body></SOAP-ENV:Envelope>
   % Total % Received % Xferd Average Speed Time
  Curr.
                                  Dload Upload Total Current Left
  Speed
100 562 0 0 100 562 0 1789 0:00:00 0:00:00
0:00:00 1789<= Recv header, 27 bytes (0x1b)
0000: HTTP/1.1 401 Unauthorized
<= Recv header, 37 bytes (0x25)
0000: Date: Wed, 20 Apr 2005 10:48:57 GMT
<= Recv header, 21 bytes (0x15)
0000: Server: Orion/2.0.2
<= Recv header, 19 bytes (0x13)
0000: Connection: Close
<= Recv header, 25 bytes (0x19)
0000: Content-Type: text/html
<= Recv header, 197 bytes (0xc5)
0000: WWW-Authenticate: Digest realm="TMSWebServiceRealm", nonce="PDEx
0040: MTM5OTQxMzcyNTMuMzAxNzk4MDNjYWM2MzM5ZmRjMzI4ZDI0MzI4ZDIzMDJAY2l0
0080: eXNsaWNrZXI+", opaque="91fe5865c216ae9a", algorithm=MD5, qop="au
00c0: th"
<= Recv header, 28 bytes (0x1c)
0000: Transfer-Encoding: chunked
100 562 0 0 100 562 0 1767 0:00:00 0:00:00
0:00:00 0
== Info: Closing connection #0
== Info: Issue another request to this URL:
'http://datadirect.webservices.zap2it.com/tvlistings/xtvdService'
== Info: About to connect() to datadirect.webservices.zap2it.com port 80
== Info: Connected to datadirect.webservices.zap2it.com (206.18.98.160)
port 80
== Info: Server auth using Digest with user 'userid'
=> Send header, 1113 bytes (0x459)
0000: POST /tvlistings/xtvdService HTTP/1.1
0027: Authorization: Digest username="userid", realm="TMSWebServiceR
0067: ealm", nonce="PDExMTM5OTQxMzcyNTMuMzAxNzk4MDNjYWM2MzM5ZmRjMzI4ZD
00a7: I0MzI4ZDIzMDJAY2l0eXNsaWNrZXI+", uri="/tvlistings/xtvdService",
00e7: response="85661e6d902ee908e233c5c3de092f91"
0114: User-Agent: curl/7.11.1 (powerpc-apple-darwin7.9.0) libcurl/7.11
0154: .1 OpenSSL/0.9.7d ipv6 zlib/1.1.4
0177: Host: datadirect.webservices.zap2it.com
01a0: Pragma: no-cache
01b2: Accept: */*
01bf: Accept-Encoding: deflate, gzip
01df: Content-Length: 562
01f4: Content-Type: application/x-www-form-urlencoded
0225:
0227: <?xml version='1.0' encoding='utf-8'?><SOAP-ENV:Envelope xmlns:S
0267: OAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='h
02a7: ttp://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/20
02e7: 01/XMLSchema-instance' xmlns:SOAP-ENC='http://schemas.xmlsoap.or
0327: g/soap/encoding/'> <SOAP-ENV:Body> <ns1:download xmln
0367: s:ns1='urn:TMSWebServices'> <startTime xsi:type='xsd:
03a7: dateTime'>2005-04-20T00:00:00</startTime> <endTime xs
03e7: i:type='xsd:dateTime'>2005-04-20T00:06:00</endTime> </ns1
0427: :download> </SOAP-ENV:Body></SOAP-ENV:Envelope>
<= Recv header, 23 bytes (0x17)
0000: HTTP/1.1 100 Continue
<= Recv header, 21 bytes (0x15)
0000: Server: Orion/2.0.2
<= Recv header, 37 bytes (0x25)
0000: Date: Wed, 20 Apr 2005 10:48:57 GMT
<= Recv header, 27 bytes (0x1b)
0000: HTTP/1.1 401 Unauthorized
<= Recv header, 37 bytes (0x25)
0000: Date: Wed, 20 Apr 2005 10:48:57 GMT
<= Recv header, 21 bytes (0x15)
0000: Server: Orion/2.0.2
<= Recv header, 19 bytes (0x13)
0000: Connection: Close
<= Recv header, 25 bytes (0x19)
0000: Content-Type: text/html
== Info: Authentication problem. Ignoring this.
<= Recv header, 209 bytes (0xd1)
0000: WWW-Authenticate: Digest realm="TMSWebServiceRealm", nonce="PDEx
0040: MTM5OTQxMzc4ODEuYjEyNTQ0NGJjYzMxMDBmM2MyNWFmYWEwYzc5OGFhZjRAY2l0
0080: eXNsaWNrZXI+", opaque="da94a679eafe15cf", stale=true, algorithm=
00c0: MD5, qop="auth"
<= Recv header, 28 bytes (0x1c)
0000: Transfer-Encoding: chunked
<= Recv data, 106 bytes (0x6a)
0000: 5f
0004: <HTML><HEAD><TITLE>401 Unauthorized</TITLE></HEAD><BODY><H1>401
0044: Unauthorized</H1></BODY></HTML>
0065: 0
0068:
100 95 0 95 0 0 190 0 --:--:-- 0:00:00
--:--:-- -921
100 95 0 95 0 0 190 0 --:--:-- 0:00:00
--:--:-- -919
== Info: Closing connection #0
===================================================
On Apr 20, 2005, at 12:46 AM, Ralph Mitchell wrote:

> OK, I think I may see what's going on. I've trimmed the debug output
> to make it easier to explain. Wget starts off sending Basic Auth
>
>
>> POST /tvlistings/xtvdService HTTP/1.0
>> Host: datadirect.webservices.zap2it.com
>> Authorization: Basic ljydtdgyf5t79870ryghuggi=
>> Content-Type: application/x-www-form-urlencoded
>
>
> but that's rejected by the server: A demand for Digest Auth is
> returned:
>
>
>> HTTP request sent, awaiting response... HTTP/1.1 401 Unauthorized
>> Date: Wed, 20 Apr 2005 01:22:02 GMT
>> 2 Date: Wed, 20 Apr 2005 01:22:02 GMTServer: Orion/2.0.2
>> 3 Server: Orion/2.0.2Connection: Close
>> 4 Connection: CloseContent-Type: text/html
>> 5 Content-Type: text/htmlWWW-Authenticate: Digest
>> realm="TMSWebServiceRealm",
>> nonce="PDExMTM5NjAxMjMxNzcuNGJmY2Q3YTdiMDg5MjMzYzNhMDA4M2I3NmRmNzkzODZ
>> Ac
>> HJpbWV0aW1lPg==", opaque="a064ab3c7afaa4cf", algorithm=MD5, qop="auth"
>>
>> 6 WWW-Authenticate: Digest realm="TMSWebServiceRealm",
>> nonce="PDExMTM5NjAxMjMxNzcuNGJmY2Q3YTdiMDg5MjMzYzNhMDA4M2I3NmRmNzkzODZ
>> Ac
>> HJpbWV0aW1lPg==", opaque="a064ab3c7afaa4cf", algorithm=MD5, qop="auth"
>
>
> Wget closes the connection, then retries using Digest Auth:
>
>
>> POST /tvlistings/xtvdService HTTP/1.0
>> User-Agent: Wget/1.9.1
>> Host: datadirect.webservices.zap2it.com
>> Accept: */*
>> Connection: Keep-Alive
>> Authorization: Digest username="userid", realm="TMSWebServiceRealm",
>> nonce="PDExMTM5NjAxMjMxNzcuNGJmY2Q3YTdiMDg5MjMzYzNhMDA4M2I3NmRmNzkzODZ
>> Ac
>> HJpbWV0aW1lPg==", uri="/tvlistings/xtvdService",
>> response="27b41196dda61ef84158df43f501b1fe", opaque="a064ab3c7afaa4cf"
>
>
> and the server is happy. Curl starts off sending Basic Auth too:
>
>
>> 0000: POST /tvlistings/xtvdService HTTP/1.1
>> 0027: Authorization: Basic ljydtdgyf5t79870ryghuggi=
>
>
> gets the same "Unauthorised" response, along with the demand for
> Digest Auth. Curl then tells you the bad news and stops.
>
>
>> 0000: HTTP/1.1 401 Unauthorized
>> 0000: Date: Wed, 20 Apr 2005 02:05:12 GMT
>> <= Recv header, 197 bytes (0xc5)
>> 0000: WWW-Authenticate: Digest realm="TMSWebServiceRealm", nonce="PDEx
>
>
> I'll leave it to Daniel to decide if curl should be switching from
> Basic to Digest in mid-stream. What you could try next would be to
> *tell* curl to send Digest Auth the first time around:
>
>
> curl --digest -u userid:userpwd .......
>
>
> Ralph Mitchell
>
Received on 2005-04-20

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET