我正在使用邮件传输,并且已完成 axis2 文件中的更改,并且 ESB 运行正常。我收到了带有提示性提示的状态代码,我将尝试将状态代码与邮件一起发送但不发送
任何人,请建议我。
<?xml version="1.0" encoding="UTF-8"?>
<api context="/first" name="firston" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="GET">
<inSequence>
<property description="http" name="HTTP_SC" scope="axis2" type="STRING" value="404"/>
<log level="full"/>
<send>
<endpoint key="firstone"/>
</send>
</inSequence>
<outSequence>
<log description="reslog" level="custom">
<property expression="$ctx:ERROR_CODE" name="reserrorcode"/>
<property expression="$ctx:ERROR_MESSAGE" name="reserrormessage"/>
<property expression="get-property('axis2','HTTP_SC')" name="reshttpsc"/>
</log>
<send/>
</outSequence>
<faultSequence>
<property expression="get-property('ERROR_CODE')" name="reserrorcode" scope="default" type="INTEGER" xmlns:ns="http://org.apache.synapse/xsd"/>
<property expression="get-property('ERROR_MESSAGE')" name="reserrormessage" scope="default" type="STRING"/>
<property expression="get-property('axis2','HTTP_SC')" name="reshttpsc" scope="default" type="STRING"/>
<property name="messageType" scope="axis2" type="STRING" value="text/html"/>
<property name="ContentType" scope="axis2" type="STRING" value="text/html"/>
<property expression="$ctx:ErrorCode" name="Subject" scope="transport" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/>
<payloadFactory media-type="xml">
<format>
<ns:text xmlns:ns="http://ws.apache.org/commons/ns/payload">$1</ns:text>
</format>
<args>
<arg evaluator="xml" expression="$ctx:ErrorMessage"/>
</args>
</payloadFactory>
<property name="reshttpsc" scope="default" type="STRING" value="true"/>
<send>
<endpoint>
<address format="rest" uri="varun.gu39@gmail.com"/>
</endpoint>
</send>
</faultSequence>
</resource>
</api>