IBM BUS 更改 Responce 的 SOAP 命名空间



My Soap Responce like

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <Response xmlns="http://tempuri.org/">
            <Result>
                <Result>LOGON FAILED</Result>
            </Result>
        </Response>
    </soapenv:Body>
</soapenv:Envelope>

但是,我需要更改命名空间和响应的前缀,并且必须喜欢这个。

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <Response xmlns="http://tempuri.org/">
            <Result>
                <Result>LOGON FAILED</Result>
            </Result>
        </Response>
    </soapenv:Body>
</soap:Envelope>

如果您使用 ESQL 来构造消息,那么可以按如下所述执行此操作:

https://www.ibm.com/support/knowledgecenter/SSKM8N_8.0.0/com.ibm.etools.mft.doc/ac67194_.htm

DECLARE soapNs NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE tempNs NAMESPACE 'http://tempuri.org/';
SET OutputRoot.XMLNSC.soapNs:Envelope.(XMLNSC.NamespaceDecl)xmlns:soap = soapNs;
SET OutputRoot.XMLNSC.soapNs:Envelope.soapNs:Body.tempNs:Response.(XMLNSC.NamespaceDecl)xmlns = tempNs;
SET OutputRoot.XMLNSC.soapNs:Envelope.soapNs:Body.tempNs:Response.tempNs:Result.tempNs:Result = 'LOGON FAILED';

但是,命名空间标记的值仍然不会产生影响。

最新更新