Thank you for the example. But I think I am not going about this correctly. 
What I actually need to be able to do is connect to a web service (which it 
appears I am able to do), and send it a POST request. Below is an example of 
the request that I am sending. I think I really just need a curl option that 
will simply send the request to the web service. Any thoughts, can this be done 
(I'm hoping!)?

Again, thanks.

POST /licensecertificationext/service/licensecertification.asmx HTTP/1.1
Host: acc.dwd.wisconsin.gov
Connection: keep-alive
Authorization: Basic - an encrypted username and password here
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Content-Type: text/xml; charset=utf-8
Content-Length:  767

SOAPAction:"http://workweb.dwd.state.wi.us/KIDS/LicenseCertification/Service/checkCertifications";
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
<soap:Body>
<checkCertifications 
xmlns="http://workweb.dwd.state.wi.us/KIDS/LicenseCertification/Service";>
<licenseApplicants>
<LicenseApplicant>
<ssn>395555555</ssn>
<firstName>LARRY</firstName>
<lastName>MEDICINA</lastName>
<middleName>A</middleName>
<dateOfBirth>05/15/1965</dateOfBirth>
<genderCode>M</genderCode>
<agencyCode>WDHF</agencyCode>
<licenseCategoryCode>PO</licenseCategoryCode>
<uniqueRecordIdentifier>1</uniqueRecordIdentifier>
</LicenseApplicant>
</licenseApplicants>
<errmsg>N</errmsg>
</checkCertifications>
</soap:Body>
</soap:Envelope>

Kevin Fitzgerald
Provider SE
Eligibility/SSI SE
Healthcheck SE
TPL SE
Batch Promotion Coordinator
HP Enterprise Services
Work:  847-485-8060
Cell: 847-204-5077
[email protected]

From: curl-library [mailto:[email protected]] On Behalf Of 
Aaron Meriwether
Sent: Tuesday, July 14, 2015 4:23 PM
To: libcurl development <[email protected]>
Subject: Re: CURL custom POST commands


On Jul 14, 2015, at 12:10 PM, Fitzgerald, Kevin 
<[email protected]<mailto:[email protected]>> wrote:

I have to connect to a web service that requires a username and password and as 
a result I cannot use the basic CURL POST logic. Does anyone have a program or 
example of how to use CURL to set up a custom POST? I need to send a request 
and then receive a response from the web service.

The anyauthput.c example shows how to use HTTP auth with a PUT request, but it 
also includes some extra stuff (ioctl callback) needed to support the "any" 
auth type.
http://curl.haxx.se/libcurl/c/anyauthput.html

For just HTTP Basic auth, here is a working example:
https://gist.github.com/p120ph37/71fb340f7a0d38fa5443

-Aaron
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to