The handler was pretty simple.
method OnRequest
/+ &_MSG as Message +/
/+ Returns Message +/
/+ Extends/implements PS_PT:Integration:IRequestHandler.OnRequest +/
/* Variable Declaration */
Local Message &msgReply;
Local XmlDoc &ResponseXML, &XML_MESSAGE;
&msgReply = CreateMessage(Operation.ZZ_TEST_SERVICE, %IntBroker_Response);
&XML_MESSAGE = &_MSG.GetXmlDoc();
SendMail(0, "kevin.weaver@umb.com", "", "", "HCMSND", &XML_MESSAGE.GenXmlString());
&ResponseXML = CreateXmlDoc(GetHTMLText(HTML.ZZ_TEST_SERVICE));
&msgReply.SetXmlDoc(&ResponseXML);
Return &msgReply;
end-method;
The problem I was having was Integration broker was not calling my handler and was responding back with this error.
<?xml version="1.0"?>
<IBResponse
type="error"><DefaultTitle>Integration Broker
Response</DefaultTitle><StatusCode>20</StatusCode><MessageSet>158</MessageSet><MessageID>10733</MessageID><DefaultMessage>
Integration Gateway failed while processing the message.
</DefaultMessage><MessageParameters><Parameter>NodeName:
ZZ_ESB Is Not Default Local
Node!!!</Parameter></MessageParameters></IBResponse>
So I went to my msgLog.html and discovered that Integration Broker was adding some HTTP Headers to the message.
Headers
NonRepudiation : [False]
TransactionID : [47956670-f86f-11e2-872e-a426c6fef051]
DataChunkCount : [1]
To : [ZZ_ESB]
Content-Type : [text/xml; charset=utf-8]
MessageType : [sync]
From : [PSFT_DEV]
MessageName : [ZZ_BR_SEND.v1]
DataChunk : [1]
version : [v1]
NonRepudiation : [False]
TransactionID : [47956670-f86f-11e2-872e-a426c6fef051]
DataChunkCount : [1]
To : [ZZ_ESB]
Content-Type : [text/xml; charset=utf-8]
MessageType : [sync]
From : [PSFT_DEV]
MessageName : [ZZ_BR_SEND.v1]
DataChunk : [1]
version : [v1]
These Headers where impacting how the HttpListeningConnector was processing the message and preventing it from ever getting to my Handler. Luckily, DataPower has the option to suppress headers and prevent them from being sent to their end point. After, I suppressed these headers I was able to test my XLST and my logic to handle Kenexa responses.
No comments:
Post a Comment