Hi,
I am new to using web services and xml and I hope someone can help.
I am trying to write a client application that will consume a web service. The first thing I need to do is connect to the service using a url and post a request with the login info in an xml file.
When I run the test program I get the following error message.
ERROR:-15553 (Configuration needed to perform HTTPS connection.)
Below is the test program I wrote and the output from my displays. It is stopping at the CALL req.doTextRequest statement.
IMPORT COM
IMPORT XML
MAIN
CALL test()
EXIT PROGRAM
END MAIN
FUNCTION test()
DEFINE req com.HTTPRequest
DEFINE resp com.HTTPResponse
DEFINE doc xml.DomDocument
TRY
LET req = com.HTTPRequest.Create("
https://anscert.drfirst.com/getURL")
DISPLAY "The URL is created."
--CALL req.setMethod("POST/getURL HTTP/1.0")
CALL req.setMethod("POST")
DISPLAY "The Post Method is set."
CALL req.setCharset("UTF-8")
CALL req.setKeepConnection(0)
DISPLAY "The Keep Connection is set."
CALL req.setTimeOut(120)
DISPLAY "The Time Out is set."
CALL req.setMaximumResponseLength(32768)
DISPLAY "The Max Length is set."
DISPLAY "Before the doTextRequest Call."
CALL req.doTextRequest('<?xml version="1.0" encoding="UTF-8"?><RCExtRequest><Caller><VendorName>vendormc9898</VendorName><VendorPassword>accountmc9898</VendorPassword><Application>MM EMR</Application><Version>1</Version><PracticeName>mc9898</PracticeName><Station>Station A</Station></Caller><RcopiaPracticeUsername>mc9898</RcopiaPracticeUsername><Request><Command>get_url</Command></Request></RCExtRequest>')
DISPLAY "Do text request."
LET resp = req.getResponse()
IF resp.getStatusCode() != 200 THEN
DISPLAY "HTTP Error ("||resp.getStatusCode()||") ",resp.getStatusDescription()
ELSE
DISPLAY "HTTP Response is OK."
END IF
CATCH
DISPLAY "ERROR:",STATUS||" ("||SQLCA.SQLERRM||")"
END TRY
END FUNCTION
Result:
The URL is created.
The Post Method is set.
The Keep Connection is set.
The Time Out is set.
The Max Length is set.
Before the doTextRequest Call.
ERROR:-15553 (Configuration needed to perform HTTPS connection.)
Thanks,
Jean