-->

WSO2 Error - Exception encountered but no fault ha

2019-08-28 06:02发布

问题:

I am getting the above error,Below is my configuration

I configured a proxy service and i want to use Filter Mediator to check some conditon (JSON format i passed through request) and need to call another back end service

Here is my configuration

<?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/>

I am passing the json input as

  {
  "TestClass" :
 {
  "lotus" : "yes",
  "gmail" : "no"
 }
 }

I am getting those in the proxy service,but as per the filter condition,it entering in the first filter too,but while i am calling the back end service,i am getting the following error

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

Can anyone help me what actually the problem,since i am new to wso2 .

How to call back end service?

Thanks in Advance