cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Howto question - SOAP on the command line

From: Roth, Kevin P. <kproth_at_mapllc.com>
Date: Wed, 20 Apr 2005 09:13:05 -0400

If you look closely, you'll see the wget command submits an
authorization header on the initial request:

> ---request begin---
> POST /tvlistings/xtvdService HTTP/1.0
> User-Agent: Wget/1.9.1
> Host: datadirect.webservices.zap2it.com
> Accept: */*
> Connection: Keep-Alive
> Authorization: Basic ljydtdgyf5t79870ryghuggi=

and then the web server responds with 401 Unauthorized, and includes
only one WWW-Authenticate response header:

> ---request end---
> HTTP request sent, awaiting response... HTTP/1.1 401 Unauthorized
> 6 WWW-Authenticate: Digest realm="TMSWebServiceRealm", ...

and finally a second POST is sent, with Digest authentication this time
instead of basic:

> POST /tvlistings/xtvdService HTTP/1.0
> ...
> Authorization: Digest username="userid", realm="TMSWebServiceRealm",
...

The curl command only tried the basic auth, and when that failed it gave
up.

I believe if you added "--digest" to your curl command line, as in:

   curl -v --trace-ascii - -u userid:password --digest \
     -d @soap.xml --compressed -o theOutputFile \
     http://.....

that you would find curl would then handle it OK too.

- Kevin
Received on 2005-04-20