[英]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.