WSO2 ESB 中介 SOAP 服务 [英] WSO2 ESB mediate SOAP services
问题描述
我正在努力使我在 wso2 esb 中的消息流工作,所以我需要一些帮助来实现基本的通信:
I am struggling to make work my message flow in the wso2 esb so I would need some help to implement a basic communication:
Service1 想要接收一个整数Service2 生成随机数
Service1 wants to receive an integer number Service2 Generates random numbers
Service1 具有 InSequence: log, send (to addresspoint specified).OutSequence:记录,发送
Service1 has InSequence: log, send (to addresspoint specified). OutSequence: log, send
这看起来像:
<proxy name="ClientAskNumber" transports="https http" startOnLoad="true"
trace="disable">
<target faultSequence="fault">
<inSequence>
<log level="full">
<property name="Insequence" value="***" />
</log>
<send>
<endpoint>
<address uri="http://localhost:8280/services/RandomNumbers" />
</endpoint>
</send>
</inSequence>
<outSequence>
<log level="full">
<property name="Outsequence" value="***" />
</log>
<send />
</outSequence>
</target>
</proxy>
我有这个响应:<faultstring>System.Web.Services.Protocols.SoapException: 服务器没有识别 HTTP Header SOAPAction:urn:mediate 的值.在 System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()....等
这是什么意思?我还缺少其他东西吗?请帮忙.谢谢
What it means? Am I missing something else? Please help. Thank you
我正在研究 Wso2 ESB,我只需要了解如何使工作成为消息通信,之后我将尝试添加不同类型的中介.我只是在解决这个问题,因为我是这项技术的新手,正如你所看到的,我真的很难让它发挥作用......
I am studying the Wso2 ESB and I just need to understand how to make work a message communication, after it I will try to add different kind of mediation. I am just breaking down the problem, because I am new to this technology and as you can see I am really struggling to make it work...
*
<proxy xmlns="http://ws.apache.org/ns/synapse" name="ClientAskNumber" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target endpoint="RandomNumbers">
<inSequence>
<log>
<property name="CLIENTASKS" value="******C_ASKS" />
</log>
<send>
<endpoint key="RandomNumbers" />
</send>
</inSequence>
<outSequence>
<log>
<property name="CLIENTRECEIVES" value="*******C_RECEIVES" />
</log>
</outSequence>
</target>
</proxy>
推荐答案
如果这对其他人有帮助:的问题服务器无法识别 HTTP Header SOAPAction 的值:urn:mediate..."
是我需要在 InSequence 中添加一个 Header 调解器,以便调用我的 Web 服务方法getNumbers",如下所示:
In the case this helps someone else: the problem with "Server did not recognize the value of HTTP Header SOAPAction: urn:mediate..."
is that I needed to add an Header mediator in order to call my webservice method "getNumbers", into my InSequence as follows:
<inSequence>
<log>
<property name="CLIENTASKS" value="******C_ASKS" />
</log>
<header name="Action" value="http://tempuri.org/getNumbers" />
<send>
<endpoint key="RandomNumbers" />
</send>
</inSequence>
并通过soapUI发送这个请求:
and send this request via soapUI:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Numbers xmlns="http://tempuri.org/" />
</soap:Body>
</soap:Envelope>
我希望这对其他使用带有 WSO2ESB 的 .Net 解决方案的人有用(不幸的是,没有太多示例......)
I hope this can be useful to other persons who are using .Net Solutions with WSO2ESB (unfortunately there are not many examples out there...)
附:感谢 Ratha 的帮助
P.S. thanks to Ratha for his help
这篇关于WSO2 ESB 中介 SOAP 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!