为什么WSO2发送中介不';不要等待回应?
我有一个WSO2 ESB-4.6.0代理,它调用另一个调用Web服务的代理。为什么WSO2发送中介不';不要等待回应?,wso2,soa,wso2esb,Wso2,Soa,Wso2esb,我有一个WSO2 ESB-4.6.0代理,它调用另一个调用Web服务的代理。 Proxy1 --> Proxy2 --> Endpoint 如果我通过soapUI直接调用第二个代理,则正确返回并打印响应,但如果我调用第一个代理,则返回一个空白体。 在ESB日志中,Proxy1的顺序打印在Proxy2的顺序之前。 似乎Proxy1序列中的发送中介正在对Proxy2进行异步调用。 我尝试用Callout中介替换Send中介,但结果是一样的。 遵循教程,但它也不起作用。 如何将代理2的响
Proxy1 --> Proxy2 --> Endpoint
如果我通过soapUI直接调用第二个代理,则正确返回并打印响应,但如果我调用第一个代理,则返回一个空白体。在ESB日志中,Proxy1的顺序打印在Proxy2的顺序之前。 似乎Proxy1序列中的发送中介正在对Proxy2进行异步调用。
我尝试用Callout中介替换Send中介,但结果是一样的。
遵循教程,但它也不起作用。
如何将代理2的响应转发给调用者?
请帮忙。我快死了 编辑 问题解决了!我使用了错误的端口为Callout mediator指定serviceURL参数 编辑 当前代理配置: Proxy1(调用代理2-ManageWorkforce):
代理2(调用Proxy3-GetAppointPeopleProvcs):
代理3(调用服务-GetAppointment):
最终端点(服务):
有两个中介来调用web服务。这些是和。调用中介器执行阻塞调用,调用中介器执行非阻塞调用
这样,如果考虑性能,就应该使用呼叫中介器。它在ESB4.8.0中可用
在wiki文档中有两种方法 还有一个来自独山博客的呼叫调解人。这有更复杂的中介,但您可以尝试 这只是一个简单的答案 我希望这有帮助谢谢 Proxy1等待来自Proxy2的响应,即使您使用了发送中介。 不应在执行Proxy2的outSequence之前执行Proxy1的outSequence 切换到Callout Mediator并不是解决此问题的理想方案。 我认为代理配置应该有问题
如果您可以在此处发布代理配置,我们可能会为您提供解决此问题的帮助。但是,在iterate mediator中,等待调用中介器不起作用。如何正确地做?
<proxy xmlns="http://ws.apache.org/ns/synapse" name="GetAppointmentSchedulePortalReqCS" transports="http https" startOnLoad="true" trace="disable">
<target>
<inSequence>
<xslt key="conf:ManageWorkforce/xslt/GetAppointmentSchedulePortalReqCS_Request.xsl"/>
<header name="Action" value="getAppointment"/>
<send>
<endpoint>
<address uri="https://localhost:9443/services/ManageWorkforce"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<xslt key="conf:ManageWorkforce/xslt/GetAppointmentSchedulePortalReqCS_Response.xsl"/>
<send/>
</outSequence>
<faultSequence/>
</target>
<publishWSDL key="conf:ManageWorkforce/GetAppointmentSchedulePortalReqCS.wsdl" />
</proxy>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="ManageWorkforce" transports="https http" startOnLoad="true" trace="disable">
<target>
<inSequence>
<switch source="get-property('Action')">
<case regex="getAppointment">
<callout serviceURL="https://localhost:8243/services/GetAppointmentPeopleProvCS" action="getAppointment">
<source xmlns:s12="http://www.w3.org/2003/05/soap-envelope" xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/" xpath="s11:Body/child::*[fn:position()=1] | s12:Body/child::*[fn:position()=1]"/>
<target xmlns:s12="http://www.w3.org/2003/05/soap-envelope" xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/" xpath="s11:Body/child::*[fn:position()=1] | s12:Body/child::*[fn:position()=1]"/>
</callout>
</case>
<!-- another cases -->
<default/>
</switch>
<property name="RESPONSE" value="true" scope="default" type="STRING"/>
<header name="To" action="remove"/>
<send/>
</inSequence>
<outSequence>
<drop/>
</outSequence>
<faultSequence/>
</target>
<publishWSDL key="conf:ManageWorkforce/ManageWorkforce.wsdl"/>
</publishWSDL>
</proxy>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="GetAppointmentPeopleProvCS" transports="http https" serviceGroup="" startOnLoad="true" trace="disable">
<target>
<endpoint key="GetAppointment"/>
<inSequence>
<xslt key="conf:ManageWorkforce/xslt/GetAppointmentPeopleProvCS_Request.xsl"/>
</inSequence>
<outSequence>
<xslt key="conf:ManageWorkforce/xslt/GetAppointmentPeopleProvCS_Response.xsl"/>
<send/>
</outSequence>
<faultSequence/>
</target>
</proxy>
<endpoint xmlns="http://ws.apache.org/ns/synapse" name="GetAppointment">
<address uri="http://10.13.6.75:9764/services/GetAppointment" />
</endpoint>