WSO2 ESB中介SOAP服务
我正在努力使wso2 esb中的工作成为我的消息流,因此我需要一些帮助来实现基本通信: Service1希望接收一个整数 Service2生成随机数 Service1的顺序为:log,send(发送到指定的地址点)。结果:记录、发送 这看起来像:WSO2 ESB中介SOAP服务,soap,wso2,wso2esb,axis2,Soap,Wso2,Wso2esb,Axis2,我正在努力使wso2 esb中的工作成为我的消息流,因此我需要一些帮助来实现基本通信: Service1希望接收一个整数 Service2生成随机数 Service1的顺序为:log,send(发送到指定的地址点)。结果:记录、发送 这看起来像: <proxy name="ClientAskNumber" transports="https http" startOnLoad="true" trace="disable"> <target fa
<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>
我有以下响应:System.Web.Services.Protocols.SoapException:服务器未识别HTTP头SOAPAction:urn:mediate的值。在System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouterRequest()…等处
这意味着什么?我还缺什么吗?请帮忙。多谢各位
编辑:
我正在研究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>
这就是我可以告诉你的流程。。 在上述配置中,您必须将第二个服务作为第一个服务的端点
http://localhost:8280/services/RandomNumbers --->2nd service url
ClientAskNumber -->1st service..
现在您可以发送执行第二个服务所需的请求(即:检索随机数)
因此代理将forwrad到该端点,并将响应返回给outsequence..您应该在控制台/日志中看到这一点,因为您使用了日志中介
在您得到的错误响应中,我希望您是从第二次服务中得到的。检查您是否正在向端点发送正确的请求这是我可以告诉您的流程。。 在上述配置中,您必须将第二个服务作为第一个服务的端点
http://localhost:8280/services/RandomNumbers --->2nd service url
ClientAskNumber -->1st service..
现在您可以发送执行第二个服务所需的请求(即:检索随机数)
因此代理将forwrad到该端点,并将响应返回给outsequence..您应该在控制台/日志中看到这一点,因为您使用了日志中介
在您得到的错误响应中,我希望您是从第二次服务中得到的。检查您是否向您的端点发送了正确的请求,以防这对其他人有所帮助:
“服务器未识别HTTP标头SOAPAction:urn:mediate…”的问题是,我需要添加标头中介,以便在我的插入序列中调用我的webservice方法“getNumbers”,如下所示:
<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>
我希望这对其他使用WSO2ESB的.Net解决方案的人有用(不幸的是,没有太多的例子…)
另外,感谢Ratha的帮助,这对其他人有帮助:“服务器无法识别HTTP头SOAPAction:urn:mediate…”的问题是,我需要添加头中介,以便调用我的Web服务方法“getNumbers”,如下所示:
<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>
我希望这对其他使用WSO2ESB的.Net解决方案的人有用(不幸的是,没有太多的例子…)
另外,感谢Ratha的帮助查看您的序列,您似乎只是将传入的请求转发到地址端点?使用WSO2的直通代理可以很好地实现上述功能?你能更清楚地说明你想要实现什么吗?我正在研究Wso2 ESB,我只需要了解如何使工作成为一种消息通信,之后我将尝试添加不同类型的中介。我只是想解决这个问题,因为我是这项技术的新手,正如你所看到的,我真的很难让它工作……我已经从这个问题中删除了carbon
标记,因为它不相关。看看你的序列,你似乎只是将传入的请求转发到地址端点?使用WSO2的直通代理可以很好地实现上述功能?你能更清楚地说明你想要实现什么吗?我正在研究Wso2 ESB,我只需要了解如何使工作成为一种消息通信,之后我将尝试添加不同类型的中介。我只是想解决这个问题,因为我是这项技术的新手,正如你所看到的,我真的很难让它工作……我已经从这个问题中去掉了carbon
标签,因为它不相关。但指向url和作为端点键是一样的…您的配置是正确的(我更正了位)…关键是您必须正确地将第二个服务指向端点..并执行代理您可以检查此示例,了解指向的内容和位置,因此看起来我的顺序是正确的,问题出在其他地方:“服务器未识别HTTP标头SOAPAction:urn:mediate的值。" ... 谢谢你的帮助。也许我需要在标题中指定:Action=urn:getNumber?但指向url和作为端点键是相同的…您的配置