cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Microsoft.Web.Services3.Security: how to reproduce tokens with cURL?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 15 Feb 2008 22:35:23 +0100 (CET)

On Fri, 15 Feb 2008, thomas Armstrong wrote:

> I was told to create a PHP client to call a remote webservice and I
> received a C# sample code containing this line:
> -----
> Microsoft.Web.Services3.Security.Tokens.UsernameToken token = new
> Microsoft.Web.Services3.Security.Tokens.UsernameToken(par1, par2,
> Microsoft.Web.Services3.Security.Tokens.PasswordOption.SendPlainText);
> -----
> where 'par1' is an username, and 'par2' is a hashed password
>
> I don't know how to reproduce this call with cURL. Must I include it within
> headers?

curl speaks HTTP. This source snippet seems to be a webservice/soap thing, so
that API and other things your code does probably ends up in a XML-chunk being
sent over HTTP to a server.

So sure, you can make curl send XML blobs to servers. But curl (or PHP/CURL
for that matter) won't help you generate the SOAP (or any other XML) message
you might need. I suggest you read up on the specs and standards for the
protocol you're about to use, or you wireshark what your existing app
sends/receives...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-02-15