Hello Everybody,
I am trying to connect to Amadeus webservice (dedicated test environment provided by Amadeus) from Openedge 10.2B Unix platform AIX server.
I have downloaded the WSDL file and all the given XSD's to a specified location in our server.
When I run the following piece of code it says that it is connected. When I try to run a specific Security_Authenticate webservice it says "Error sending Web Service Request: Fatal Error: Can't locate remote host (11767)".
I am pasting the piece of code with which I have tried to get an response. Please let me know if I am missing something or anything which needs to be corrected.
DEFINE VARIABLE ghWebService AS HANDLE NO-UNDO.
DEFINE VARIABLE ghAmadeusWebServicesPT AS HANDLE NO-UNDO.
DEFINE VARIABLE gcWsdlFile AS CHARACTER NO-UNDO.
DEFINE VARIABLE deTime AS DECIMAL NO-UNDO EXTENT 6.
DEFINE VARIABLE conversationClt AS LONGCHAR NO-UNDO.
DEFINE VARIABLE userIdentifier AS LONGCHAR EXTENT 1 NO-UNDO. /* n is in the range of 1-2 */
DEFINE VARIABLE dutyCode AS LONGCHAR NO-UNDO.
DEFINE VARIABLE systemDetails AS LONGCHAR NO-UNDO.
DEFINE VARIABLE passwordInfo AS LONGCHAR EXTENT 2 NO-UNDO. /* n is in the range of 0-2 */
DEFINE VARIABLE fullLocation AS LONGCHAR NO-UNDO.
DEFINE VARIABLE applicationId AS LONGCHAR NO-UNDO.
DEFINE VARIABLE errorSection AS LONGCHAR NO-UNDO.
DEFINE VARIABLE processStatus AS LONGCHAR NO-UNDO.
DEFINE VARIABLE organizationInfo AS LONGCHAR NO-UNDO.
DEFINE VARIABLE conversationGrp AS LONGCHAR NO-UNDO.
/* These are both local locations */
&IF OPSYS="UNIX" &THEN
gcWsdlFile = "/home/Indranil/1ASIWBEEMSC_PDT_12October11.wsdl".
&ELSE
gcWsdlFile = "c:\temp\amad-prod-5\1ASIWBEEMSC_PDT_12October11.wsdl".
&ENDIF
assign userIdentifier = "<userIdentifier xmlns=" + "~'http://xml.amadeus.com/VLSSLQ_06_1_1A~'" +
"><originIdentification>" +
"<sourceOffice>NAPIG28MC</sourceOffice>" +
"</originIdentification>" +
"<originatorTypeCode>U</originatorTypeCode>" +
"<originator>WSMSCBEE</originator>" +
"</userIdentifier>"
dutyCode = "<dutyCode xmlns=" + "~'http://xml.amadeus.com/VLSSLQ_06_1_1A~'" +
"><dutyCodeDetails>" +
"<referenceQualifier>DUT</referenceQualifier>" +
"<referenceIdentifier>SU</referenceIdentifier>" +
"</dutyCodeDetails>" +
"</dutyCode>"
systemDetails = "<systemDetails xmlns=" + "~'http://xml.amadeus.com/VLSSLQ_06_1_1A~'" +
"><organizationDetails><organizationId>NMC-ITALY</organizationId>" +
"</organizationDetails>" +
"</systemDetails>"
passwordInfo = "<passwordInfo xmlns=" + "~'http://xml.amadeus.com/VLSSLQ_06_1_1A~'" +
"><dataLength>7</dataLength><dataType>E</dataType>" +
"<binaryData>QU1BREVVUw==</binaryData></passwordInfo>".
CREATE SERVER ghWebService.
ghWebService:CONNECT(" -WSDL '" + gcWsdlFile + "'").
RUN AmadeusWebServicesPT SET ghAmadeusWebServicesPT ON ghWebService.
/*** If i comment this part of code and only check connected or not it gives as connected, please find the attached screen shot **/
RUN Security_Authenticate IN ghAmadeusWebServicesPT
(INPUT conversationClt,
input userIdentifier,
input dutyCode,
input systemDetails,
input passwordInfo,
input fullLocation ,
input applicationId,
OUTPUT errorSection,
OUTPUT processStatus,
OUTPUT organizationInfo,
OUTPUT conversationGrp).
IF VALID-HANDLE(ghWebService) AND ghWebService:CONNECTED() THEN
do:
message "connected".
ghWebService:DISCONNECT().
end.
IF VALID-HANDLE(ghWebService) THEN
DELETE OBJECT ghWebService NO-ERROR.
IF VALID-HANDLE(ghAmadeusWebServicesPT) THEN
DELETE OBJECT ghAmadeusWebServicesPT NO-ERROR.