我想在响应中添加一个自定义的隐式肥皂头。
MsqFlow :
ESQL :
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
SET OutputRoot.MQMD = InputRoot.MQMD;
CREATE LASTCHILD OF OutputRoot DOMAIN 'SOAP' NAME 'SOAP';
SET OutputRoot.SOAP.Header.eaie:apiHeader.messageId = UUIDASCHAR;
SET OutputRoot.SOAP.Header.eaie:apiHeader.timestamp = CURRENT_TIMESTAMP;
SET OutputRoot.SOAP.Header.eaie:apiHeader.transactionId = Environment.Variables.Generic.Session.TransactionId;
SET OutputRoot.SOAP.Header.eaie:apiHeader.correlationId = Environment.Variables.Generic.Session.CorrelationId;
SET OutputRoot.SOAP.Header.eaie:apiHeader.scrSystem = 'EAI';
SET OutputRoot.XMLNSC = InputRoot.XMLNSC;
RETURN TRUE;
END;
END MODULE;
消息中的[计算节点]和[SOAP回复]之间的断点用正确的参数填充SOAP,但作为响应,仍然看到只有肥皂体而没有头。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
我缺少什么?
答案 0 :(得分:1)
我终于找到了解决方案,我没有创建XMLNSC,也没有添加强制性的SOAP Body。
最终代码:
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
SET OutputRoot.MQMD = InputRoot.MQMD;
CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNSC' NAME 'XMLNSC';
SET OutputRoot.SOAP.Header.eaie:apiHeader.messageId = UUIDASCHAR;
SET OutputRoot.SOAP.Header.eaie:apiHeader.timestamp = CURRENT_TIMESTAMP;
SET OutputRoot.SOAP.Header.eaie:apiHeader.transactionId = Environment.Variables.Generic.Session.TransactionId;
SET OutputRoot.SOAP.Header.eaie:apiHeader.correlationId = Environment.Variables.Generic.Session.CorrelationId;
SET OutputRoot.SOAP.Header.eaie:apiHeader.scrSystem = 'EAI';
SET OutputRoot.SOAP.Body.nsOut:getXXXResponse = InputRoot.XMLNSC.nsOut:getXXXResponse;
SET OutputRoot.XMLNSC = InputRoot.XMLNSC;
RETURN TRUE;
END;
END MODULE;