【问题标题】:IBM BUS Change Soap Namespace of ResponceIBM BUS 更改响应的 Soap 命名空间
【发布时间】:2017-06-10 08:21:09
【问题描述】:

我的肥皂反应喜欢

<?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>

【问题讨论】:

  • 看看这篇文章:mqseries.net/phpBB/…
  • 您的问题有点令人困惑,因为您在标题中谈论了请求,但您在问题中谈论了响应。无论如何,您是否已经阅读过这个问题? stackoverflow.com/q/2524191/4894900也许有帮助!
  • 谢谢,已更改标题
  • 命名空间前缀的值在它们引用同一个命名空间之前没有区别,所以我不明白你为什么需要这样做。

标签: messagebroker ibm-integration-bus


【解决方案1】:

如果您使用 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';

但是,命名空间标签的值不应该有所作为。

【讨论】:

  • 谢谢!它有帮助
猜你喜欢
  • 2011-08-19
  • 1970-01-01
  • 1970-01-01
  • 2014-06-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多