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

curl-and-php

Re: Using CURL to post SOAP messages

From: Tim Uckun <tim_at_diligence.com>
Date: Thu, 17 May 2001 23:08:22 -0700

> > Does anybody have an example of using CURL to send SOAP packets.
>
>I don't. I'd love to get one too.

If I get it right I'll let this listserve know.

> > 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.

I figured this part out.

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

I do seem to have CURL compiled and working properly

> > 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]);

The post example would not work (I think). Its pretty confusing to me but
nowhere does it do I see where I would include the SOAP envelope as a field
or a value pair. According to my reading of the spec the body of the
request itself is the soap env. Does this make sense to you?

I have an HTTP sample which opens up the port (80) and send the entire
string including the headers and sends it over to the server. Is is
possible to do the same with CURL. Can I manually construct a message and
send it over https 433 port?

----------------------------------------------
              Tim Uckun
       Mobile Intelligence Unit.
----------------------------------------------
    "There are some who call me TIM?"
----------------------------------------------

_______________________________________________
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-18