curl-library
Re: Can cURL only POST for SOAP?
Date: Wed, 7 Jun 2006 18:58:20 GMT
The code is very simple, I just grabbed it from the web.
CURL *curl;
CURLcode res;
struct curl_slist *headers = NULL;
curl = curl_easy_init();
headers = curl_slist_append(headers, "Content-Type: text/xml");
curl_easy_setopt(curl, CURLOPT_POST, 1);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, xml);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error);
curl_easy_setopt(curl, CURLOPT_PORT, "50927");
curl_easy_setopt(curl, CURLOPT_URL, "http://localhost/");
curl_easy_perform(curl)
curl_easy_cleanup(curl);
curl_slist_free_all(headers);
I send the XML no problem and the server receives it no problem. However it appears curl_easy_perform blocks until it receives something back from the SOAP server. In my particular case I'm sending the server some info that I want it to validate without having to respond to curl.
I was then hoping to get the program to continue so that I could send something else to the server. I have a loop and I don't want to wait for the server's response. I just want to keep sending.
From what I've read this doesn't seem possible. I think I might just send back some dummy ACK message to allow my app to keep looping.
If there are any other thoughts I'm open to criticism. Thanks for the help.
________________________________________________________________________
Try Juno Platinum for Free! Then, only $9.95/month!
Unlimited Internet Access with 1GB of Email Storage.
Visit http://www.juno.com/value to sign up today!
Received on 2006-06-07