Calling a Web page using UHTTP
Author: email@example.com (Colin)
Hi All, I have been asked to write a program that generates XML and then submits it to a website for processing. That process then returns the results to my program. I have no problem with generating the XML - it's easy using the UXMLWRITER facility. My problem is that I can't get the submit to work. Here is the example using LIBCURL I was given to base my code on The following is a cURL sample for DOS and may need slight modification for UNIX: REM sample curl call for Label Print Service curl -v -X POST -d@GenerateLabels.xml https://webapi.auspost.com.au/soap/LodgementManagement_v1 --header "Content-Type: application/soap+xml;charset=UTF-8;action=\"generateLabel\"" --insecure --user lps_merchant_dev:LabelDev123$ 2>out2.txt >out1.xml Here is my uniface code activate "UHTTP".SEND("https://webapi.auspost.com.au/soap/LodgementManagement_MerchantTest_v1", "POST", "userid", "password", "Content-Type:application/soap+xml;charset=UTF-8;action=%%"generatelabel%%"", v_xmlcode, v_response_header) My generated XML is in v_xmlcode. When I run this I get nothing. $status is 0. $procerror is 0. The response in both v_xmlcode and v_response_header is null. Its as if it was not executed in the first place (other than the variable v_xmlcode being NULLed). I am obviously doing something wrong but I have no idea what. Any suggestions? Thanks in advance. Col.