cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Using CURL to post SOAP messages

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 17 May 2001 23:53:06 +0200 (MET DST)

On Thu, 17 May 2001, Tim Uckun wrote:

(Sticking my neck out here, I'm not very SOAP nor PHP oriented!)

> Does anybody have an example of using CURL to send SOAP packets.

I don't. I'd love to get one too.

> SOAP content type must be txt/xml and there must be a soapaction headers.

To get the content-type right, you just add a content-type header as you'd
like to see (it will then replace the internally generated one). The
soapaction headers are of course also a few extra custom headers to add.
CURLOPT_HTTPHEADER is the option to use for adding headers.

You might need some rather recent version of PHP for this option to work
properly, as I recall some earlier problems with this.

> The body is the soap envelope. What I don't understand is how to pass in
> the body to the SOAP server.

Check out a POST example. In PHP lingo, it would look similar to this:

  curl_setopt($curl, CURLOPT_POST, 1);
  curl_setopt($curl, CURLOPT_POSTFIELDS, [chunk of data]);

-- 
     Daniel Stenberg -- curl dude -- http://curl.haxx.se/
_______________________________________________
Curl-and-php mailing list
Curl-and-php_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-and-php
Received on 2001-05-17