我有一个运行良好的代理服务,是WSO2 ESB上的任务要求的,但是有时在将XML正文发送到调用介体时会发出重复的请求。为什么有时会重复?也许我应该就这种结构获得一些建议?有人可以帮我这个代理服务吗?
<proxy name="MyServiceStartOperProxy" startOnLoad="true" transports="https http" xmlns="http://ws.apache.org/ns/synapse">
<target>
<inSequence onError="CustomFaultHandlerForWs_Sequence">
<property expression="fn:normalize-space($body//PaymentDate)" name="PrPaymentDate" scope="default" type="STRING"/>
<filter xpath="get-property('PrPaymentDate') = ''">
<then>
<property expression="get-property('SYSTEM_DATE', 'yyyy-MM-dd')" name="PrPaymentDate" scope="default" type="STRING"/>
</then>
<else>
<property expression="get-property('PrPaymentDate')" name="PrPaymentDate" scope="default" type="STRING"/>
</else>
</filter>
<property expression="get-property('MyServiceSettingsXml_Local-entries')" name="LocalEntriesXML" scope="default" type="OM"/>
<property expression="fn:concat($ctx:LocalEntriesXML//*[local-name()='HostPortWS'], '/services/MyServiceSendToMethod1_Proxy')" name="uri.var.PrWSAddress" scope="default" type="STRING"/>
<payloadFactory media-type="xml">
<format>
<dat:MyServiceGetCardPaymentDataService_Operation xmlns:dat="http://ws.wso2.org/dataservice">
<dat:PaymentDate>$1</dat:PaymentDate>
</dat:MyServiceGetCardPaymentDataService_Operation>
</format>
<args>
<arg evaluator="xml" expression="get-property('PrPaymentDate')"/>
</args>
</payloadFactory>
<header name="Action" scope="default" value="MyServiceGetCardPaymentDataService_Operation"/>
<log level="custom">
<property name="ProxyName" value="MyServiceStartOperProxy.inSequence BeforeCall MyServiceSendToMethod1_Proxy"/>
</log>
<property description="Convert application/xml format to text/xml format, because got response application/xml format" name="messageType" scope="axis2" type="STRING" value="text/xml"/>
<property description="Convert application/xml format to text/xml format, because got response application/xml format" name="ContentType" scope="axis2" type="STRING" value="text/xml"/>
<!------------------------------------------------------------->
<!--Here happen problem, endpoint is called two times-->
<!------------------------------------------------------------->
<call>
<endpoint>
<http method="post" uri-template="{uri.var.PrWSAddress}"/>
</endpoint>
</call>
<log level="custom">
<property name="ProxyName" value="MyServiceStartOperProxy.inSequence AfterCall MyServiceSendToMethod1_Proxy"/>
</log>
</inSequence>
<outSequence>
..................
</outSequence>
<faultSequence/>
</target>
<publishWSDL key="gov:_system/config/resources/MyServiceStartOperProxyCustom.wsdl" preservePolicy="true"/>
</proxy>
给定的突触配置似乎没有任何问题。按照给定的描述任务正在调用代理服务,并且您遇到从代理服务发出的重复请求。以下是缩小问题范围的一些步骤,