[英]WSO2 ESB mediate SOAP services
I am struggling to make work my message flow in the wso2 esb so I would need some help to implement a basic communication: 我正在努力使我的消息流在wso2 esb中工作,所以我需要一些帮助来实现基本的通信:
Service1 wants to receive an integer number Service2 Generates random numbers Service1想要接收整数Service2生成随机数
Service1 has InSequence: log, send (to addresspoint specified). Service1具有InSequence:log,send(指定的地址点)。 OutSequence: log, send OutSequence:记录,发送
this looks like: 这看起来像:
<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>
I have this response: <faultstring>System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: urn:mediate. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()....etc
我有这样的回应: <faultstring>System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: urn:mediate. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()....etc
<faultstring>System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: urn:mediate. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()....etc
What it means? 这是什么意思? Am I missing something else? 我错过了别的什么吗? Please help. 请帮忙。 Thank you 谢谢
EDIT: 编辑:
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. 我正在研究Wso2 ESB,我只需要了解如何使工作成为一种消息沟通,之后我会尝试添加不同类型的中介。 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... 我正在解决这个问题,因为我是这项技术的新手,你可以看到我真的在努力让它发挥作用......
EDIT2:* EDIT2:*
<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>
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: 在这种情况下,这有助于其他人: "Server did not recognize the value of HTTP Header SOAPAction: urn:mediate..."
是我需要添加一个Header介体才能调用我的webservice方法“getNumbers”,进入我的InSequence如下:
<inSequence>
<log>
<property name="CLIENTASKS" value="******C_ASKS" />
</log>
<header name="Action" value="http://tempuri.org/getNumbers" />
<send>
<endpoint key="RandomNumbers" />
</send>
</inSequence>
and send this request via soapUI: 并通过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>
I hope this can be useful to other persons who are using .Net Solutions with WSO2ESB (unfortunately there are not many examples out there...) 我希望这对于使用.Net解决方案和WSO2ESB的其他人有用(不幸的是,那里没有很多例子......)
PS thanks to Ratha for his help PS感谢Ratha的帮助
This is the flow i can tell you.. You have to point your 2nd service as the endpoint of your fist service..In the above configuration 这是我可以告诉你的流程。你必须指出你的第二个服务作为你的第一个服务的终点。在上面的配置中
http://localhost:8280/services/RandomNumbers --->2nd service url
ClientAskNumber -->1st service..
Now you can send the request which is needed to execute the 2nd service(ie:to retrive the random number) So the proxy will forwrad to that endpoint and return the response to the outsequence..You should see that in the console/log since you used a log mediator. 现在你可以发送执行第二个服务所需的请求(即:检索随机数)所以代理将转发到该端点并将响应返回到outsequence ..你应该在控制台/日志中看到你使用了日志调解员。
In the error response you are getting i hope you are getting that from your second service. 在错误响应中,我希望您从第二次服务中获得该错误。 Check whether you are sending correct request to your endpoint 检查您是否向端点发送了正确的请求
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.