Oracle Service Bus(JDeveloper)-替换错误处理程序中的$ fault

时间:2019-12-03 10:50:41

标签: jdeveloper osb fault

当我没有数据库中的数据时,我向错误处理程序提出了一个错误,并且得到了类似的响应:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>noData: noData</faultstring>
         <detail>
            <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
               <con:errorCode>noData</con:errorCode>
               <con:reason>noData</con:reason>
            </con:fault>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

但是我想将错误处理程序中的$ fault替换为指定的响应(带有前缀,名称空间等),例如:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>noData: noData</faultstring>
         <detail>
            <ctx:fault xmlns:ctx="http://www.bea.com/wli/sb/context" xmlns:con="http://www.bea.com/wli/sb/context" xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
               <con:errorCode>noData</con:errorCode>
               <con:reason>noData</con:reason>
            </ctx:fault>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

我该如何实现?我尝试使用选项替换节点内容,但是会导致错误。

0 个答案:

没有答案
相关问题