[英]WSO2 ESB mediate SOAP services
我正在努力使我的消息流在wso2 esb中工作,所以我需要一些帮助来实现基本的通信:
Service1想要接收整数Service2生成随机数
Service1具有InSequence:log,send(指定的地址点)。 OutSequence:记录,发送
这看起来像:
<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: 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
这是什么意思? 我错过了别的什么吗? 请帮忙。 谢谢
编辑:
我正在研究Wso2 ESB,我只需要了解如何使工作成为一种消息沟通,之后我会尝试添加不同类型的中介。 我正在解决这个问题,因为我是这项技术的新手,你可以看到我真的在努力让它发挥作用......
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>
在这种情况下,这有助于其他人: "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>
并通过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>
我希望这对于使用.Net解决方案和WSO2ESB的其他人有用(不幸的是,那里没有很多例子......)
PS感谢Ratha的帮助
这是我可以告诉你的流程。你必须指出你的第二个服务作为你的第一个服务的终点。在上面的配置中
http://localhost:8280/services/RandomNumbers --->2nd service url
ClientAskNumber -->1st service..
现在你可以发送执行第二个服务所需的请求(即:检索随机数)所以代理将转发到该端点并将响应返回到outsequence ..你应该在控制台/日志中看到你使用了日志调解员。
在错误响应中,我希望您从第二次服务中获得该错误。 检查您是否向端点发送了正确的请求
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.