我正在 WSO2ESB 中通过 XSLT 将 XML 请求转换为 SOAP,只是想知道是否可以使请求参数可用于响应?
E.g.
<request>
<test>123</test>
<param1>testing</param1>
</request>
-> 转换为 SOAP
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">#S:Body><ns2:testrequest xmlns:ns2="http://xml.testing.com/test"><teststring>testing</teststring></ns2:testrequest></S:Body></S:Envelope></soapenv:Body></soapenv:Envelope>
在回应中
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:testresponse xmlns:ns2="http://xml.testing.com/test"><responsestring>success</responsestring></ns2:testresponse></S:Body></S:Envelope></soapenv:Body></soapenv:Envelope>
我想以 XML 形式返回
<responsestring>
<test>123</test>
<return1>success</return1>
</responsestring>
如您所见,123 没有发送到服务器,也没有从服务器接收。但是,客户端正在发送此参数,我想在请求中使用此参数并发送回响应,这可能吗?通过什么方式?我对 synapse 非常陌生,对 WSO2ESB 也非常陌生,有人可以启发我吗?
Thanks.
对的,这是可能的。您可以使用财产调解员在 Insequence 中将所需的值设置为属性,然后将其添加到 outsequence 中以使用丰富中介者.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)