【发布时间】:2014-10-28 15:54:01
【问题描述】:
我正在使用 wso2esb-4.8.1, 我希望在那之后发送我的消息想要审核我的消息正在发出并获得审核,当我使用调出调解器 URL 选项时,我使用发送调解器 URI 它不起作用。 示例代理和序列是
<proxy xmlns="http://ws.apache.org/ns/synapse" name="Test_Proxy" transports="https http" startOnLoad="true" trace="disable">
<description/>
<target>
<inSequence onError="FaultSeq">
<property name="FORCE_ERROR_ON_SOAP_FAULT" value="true" scope="default" type="STRING"/>
<log>
<property xmlns:ns="http://org.apache.synapse/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="ProxyInRequest"
expression="/soapenv:Envelope"/>
</log>
<xquery key="ProxyRequestTransformation">
<variable xmlns:ns="http://org.apache.synapse/xsd" name="Operation" expression="//Operation/text()" type="STRING"/>
<variable xmlns:ns="http://org.apache.synapse/xsd" name="ServiceNameSpace" expression="//ServiceNameSpace/text()" type="STRING"/>
<variable name="Payload" type="DOCUMENT_ELEMENT"/>
<variable xmlns:ns="http://org.apache.synapse/xsd" name="ServiceName" expression="//Service/text()" type="STRING"/>
</xquery>
<send>
<endpoint>
<address uri="http://localhost:8081/middleware/services/test1" format="soap11"/>
</endpoint>
</send>
</inSequence>
<outSequence onError="FaultSeq">
<property name="FORCE_ERROR_ON_SOAP_FAULT" value="true"/>
<property action="set" name="RESPONSE" scope="default" type="STRING" value="true"/>
<send/>
<sequence key="AuditSeq"/>
</outSequence>
</target>
<publishWSDL key="EaiEnvelope"/>
</proxy>
和sequnce是这样的
<sequence xmlns="http://ws.apache.org/ns/synapse" name="AuditSeq"> <property name="FORCE_ERROR_ON_SOAP_FAULT" value="true" scope="default" type="STRING"/>
<property xmlns:ns="http://org.apache.synapse/xsd" name="RESULT_CODE" expression="get-property('ResultCode')" scope="default" type="STRING"/>
<property xmlns:ns="http://org.apache.synapse/xsd" name="RESULT_MESSAGE" expression="get-property('ResultMessage')" scope="default" type="STRING"/>
<property xmlns:ns="http://org.apache.synapse/xsd" name="REFERENCE_ID" expression="get-property('ReferenceID')" scope="default" type="STRING"/>
<property xmlns:ns="http://org.apache.synapse/xsd" name="FAULT_DETAILS" expression="concat(get-property('ERROR_CODE'),get-property('ERROR_MESSAGE'))" scope="default" type="STRING"/>
<payloadFactory media-type="xml">
<format>
<open:processRequest xmlns:open="http://www.openuri.org/">
<aud:Auditor xmlns:aud="http://jhm.kkk.fff/Auditor">
<aud:Request>
<aud:Operation_Name>processRequest</aud:Operation_Name>
<aud:Auditor_InputData>
<aud:Result_Code>$1</aud:Result_Code>
<aud:Result_Message>$2</aud:Result_Message>
<aud:Reference_Id>$3</aud:Reference_Id>
</aud:Auditor_InputData>
</aud:Request>
</aud:Auditor>
</open:processRequest>
</format>
<args>
<arg evaluator="xml" expression="get-property('RESULT_CODE')"/>
<arg evaluator="xml" expression="get-property('RESULT_MESSAGE')"/>
<arg evaluator="xml" expression="get-property('REFERENCE_ID')"/>
</args>
</payloadFactory>
<header name="Action" scope="default" value="http://www.openuri.org/processRequest"/>
<send>
<endpoint>
<address uri="http://localhost:8081/middleware/services/AuditService" format="soap11"/>
</endpoint>
</send>
</sequence>
如果我使用 send mediator 配置,它不会被调用。因为 callout mediator 与 URL 选项一起工作正常,并且再次与 addressendpoint 一起工作,
if i use below properties its working fine
<callout serviceURL="http:///localhost:8081/middleware/services/AuditService">
<source type="envelope"/>
<target key="IsThisResponse"/>
</callout>
我使用了这个属性,我得到 WSAction 和 soapAction 为 NULL
< header name="Action" scope="default" value="urn:http://www.openuri.org/processRequest"/>
<header action="remove" name="To"/>
<property action="set" name="RESPONSE" scope="default" type="STRING" value="true"/>
<property name="target.endpoint" value="AuditEndpoint"/>
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
<property name="FORCE_ERROR_ON_SOAP_FAULT" value="true"/>
提前致谢
【问题讨论】:
-
wso2.org/jira/browse/ESBJAVA-3398 更多参考请看这里
标签: wso2 wso2esb wso2carbon