我收到上述错误,下面是我的配置
我配置了一个代理服务,我想使用Filter Mediator检查一些条件(我通过请求传递的JSON格式)并需要调用另一个后端服务
这是我的配置
<?xml version="1.0" encoding="UTF-8"?><proxy xmlns="http://ws.apache.org/ns/synapse" name="SampleProxy" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<payloadFactory media-type="json">
<format>
{
"TestClass" :
{
"lotus" : $1,
"gmail" : $2
}
}
</format>
<args>
<arg evaluator="json" expression="$.TestClass.lotus"/>
<arg evaluator="json" expression="$.TestClass.gmail"/>
</args>
</payloadFactory>
<log>
<property name="Lotus Value" expression="json-eval($.TestClass.lotus)"/>
</log>
<log>
<property name="Gmail Value" expression="json-eval($.TestClass.gmail)"/>
</log>
<filter source="json-eval($.TestClass.lotus)" regex="yes">
<then>
<log>
<property name="Filter Value" value="Filter Reached"/>
</log>
<send>
<endpoint>
<address uri="https://10.132.97.131:9443/services/TestGmailConnector/getHello"/>
</endpoint>
</send>
</then>
<else>
<log level="custom">
<property name="Filter Else Condition" value="Reached"/>
</log>
</else>
</filter>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<description/>
我将json输入传递为
{
"TestClass" :
{
"lotus" : "yes",
"gmail" : "no"
}
}
我正在使用代理服务,但是根据过滤条件,它也会进入第一个过滤器,但是当我调用后端服务时,我收到以下错误
INFO {SERVICE_LOGGER.SampleProxy} - Successfully created the Axis2 service for Proxy service : SampleProxy
INFO {SERVICE_LOGGER.SampleProxy} - To: /services/SampleProxy.SampleProxyHttpEndpoint/, From: 10.132.97.131, Direction: request, Lotus Value = yes
INFO {SERVICE_LOGGER.SampleProxy} - To: /services/SampleProxy.SampleProxyHttpEndpoint/, From: 10.132.97.131, Direction: request, Gmail Value = no
INFO {SERVICE_LOGGER.SampleProxy} - To: /services/SampleProxy.SampleProxyHttpEndpoint/, From: 10.132.97.131, Direction: request, Filter Value = Filter Reached
WARN {SERVICE_LOGGER.SampleProxy} - Executing fault handler due to exception encountered
WARN {SERVICE_LOGGER.SampleProxy} - ERROR_CODE : 0 ERROR_MESSAGE : Unexpected error during sending message out
任何人都可以帮我解决实际问题,因为我是wso2的新手。
如何回电终端服务?
先谢谢