Proxy 在WSO2中阻止消息处理器的MessageSender时出错

Proxy 在WSO2中阻止消息处理器的MessageSender时出错,proxy,wso2,Proxy,Wso2,我正在尝试使用WSO2(4.8.1)中的消息转发处理器 背景如下: 1) 我在邮件存储中保存了我的邮件 2) 我使用消息转发处理器从存储中提取消息并调用wso2代理 3) 我的代理调用外部服务 我正在测试我的外部服务的SOAP错误 这是我的密码 我的邮件转发处理器配置如下 <?xml version="1.0" encoding="UTF-8"?><messageProcessor xmlns="http://ws.apache.org/ns/synapse" class="

我正在尝试使用WSO2(4.8.1)中的消息转发处理器

背景如下:

1) 我在邮件存储中保存了我的邮件 2) 我使用消息转发处理器从存储中提取消息并调用wso2代理 3) 我的代理调用外部服务

我正在测试我的外部服务的SOAP错误

这是我的密码

我的邮件转发处理器配置如下

<?xml version="1.0" encoding="UTF-8"?><messageProcessor xmlns="http://ws.apache.org/ns/synapse"  class="org.apache.synapse.message.processor.impl.forwarder.ScheduledMessageForwardingProcessor" name="AnotherCapForwardMessageProcessor" targetEndpoint="AnotherCapProxyEndPoint" messageStore="OperCupIDStore">
 <parameter name="message.processor.reply.sequence">AnotherCapProcessorReply</parameter>
<parameter name="max.delivery.attempts">2</parameter>
<parameter name="client.retry.interval">5000</parameter>
<parameter name="interval">5000</parameter>
<parameter name="message.processor.fault.sequence">AnotherCapProcessorFault</parameter>
<parameter name="is.active">true</parameter>
<?xml version="1.0" encoding="UTF-8"?>
  <proxy xmlns="http://ws.apache.org/ns/synapse" name="AnotherCapProxy" transports="http https" startOnLoad="true" trace="disable">
<target>
    <inSequence>
        <log level="custom">
            <property name="where" value="********** [ANOTHER-CAP-PROXY] - BEGINNING OF IN SEQUENCE .... "/>
        </log>
        <log level="full">
            <property name="what" value="********** [ANOTHER-CAP-PROXY] - MESSAGE FROM OPERCUPIDSTORE...."/>
        </log>
        <property name="FORCE_ERROR_ON_SOAP_FAULT" value="false" scope="default" type="STRING"/>
        <property name="OUT_ONLY" value="false" scope="default" type="STRING"/>
        <property name="InternalCodErr" value="WSO2_xxx" scope="default" type="STRING"/>
        <property xmlns:ns="http://org.apache.synapse/xsd" xmlns:p="http://gamopera.ifpl.csi.it" name="ProcessingID" expression="//p:id" scope="default" type="STRING"/>
        <log level="custom">
            <property xmlns:ns="http://org.apache.synapse/xsd" name="what" expression="fn:concat('****[ANOTHER-CAP-PROXY] - PROCESSING ID: ',get-property('default','ProcessingID'))"/>
        </log>
        <xslt xmlns:ns="http://org.apache.synapse/xsd" key="gov:xslt/getInputCUPXml_Transform.xslt" source="$body">
            <property name="idOp" expression="get-property('default','ProcessingID')"/>
        </xslt>
        <log level="full">
            <property name="what" value="********** [ANOTHER-CAP-PROXY] - CALLING GAMOPERA FOR THE XML REQUEST TO INVOKE SIMON.... "/>
        </log>
        <header name="Action" scope="default" value=" "/>
        <send>
            <endpoint key="AnotherCapGamoperaCreateXMLServiceEndpoint"/>
        </send>
    </inSequence>
    <outSequence>
        <log level="full">
            <property name="where" value="********** [ANOTHER-CAP-PROXY] - BEGINNING OF OUT SEQUENCE .... "/>
            <property name="where" value="********** [ANOTHER-CAP-PROXY] - THE GAMOPERA RESPONSE ...."/>
        </log>
        <filter xmlns:s12="http://www.w3.org/2003/05/soap-envelope" xmlns:ns="http://org.apache.synapse/xsd" xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/" xpath="s11:Body/s11:Fault | s12:Body/s12:Fault">
            <then>
                <property name="ErrorCode" value="WSO2_004" scope="operation" type="STRING"/>
                <log level="custom">
                    <property name="where" value="********** [ANOTHER-CAP-PROXY] - SOAP FAULT !!! SOMETHING WENT WRONG CALLING GAMOPERA IN GETTING XML ...."/>
                    <property name="ERROR_CODE" expression="get-property('operation','ErrorCode')"/>
                </log>
            </then>
            <else>
                <property name="ErrorCode" value="WSO2_003" scope="default" type="STRING"/>
                <log level="custom">
                    <property name="where" value="********** [ANOTHER-CAP-PROXY] - NOT COMPLETE RESPONSE FROM GAMOPERA IN GETTING XML ..."/>
                    <property name="ERROR_CODE = " expression="get-property('default','ErrorCode')"/>
                </log>
            </else>
        </filter>
        <send/>
    </outSequence>
    <faultSequence>
        <log level="full">
            <property name="where" value="********** [ANOTHER-CAP-PROXY] - BEGINNING OF FAULT SEQUENCE .... "/>
            <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
            <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
            <property name="ERROR_DETAIL" expression="get-property('ERROR_DETAIL')"/>
            <property name="ERROR_EXCEPTION" expression="get-property('ERROR_EXCEPTION')"/>
        </log>
        <send/>
    </faultSequence>
</target>
<publishWSDL key="gov:wsdl/AnotherWSDL.wsdl"/>

另一个处理程序
2.
5000
5000
另一个处理器故障
真的

我的代理如下

<?xml version="1.0" encoding="UTF-8"?><messageProcessor xmlns="http://ws.apache.org/ns/synapse"  class="org.apache.synapse.message.processor.impl.forwarder.ScheduledMessageForwardingProcessor" name="AnotherCapForwardMessageProcessor" targetEndpoint="AnotherCapProxyEndPoint" messageStore="OperCupIDStore">
 <parameter name="message.processor.reply.sequence">AnotherCapProcessorReply</parameter>
<parameter name="max.delivery.attempts">2</parameter>
<parameter name="client.retry.interval">5000</parameter>
<parameter name="interval">5000</parameter>
<parameter name="message.processor.fault.sequence">AnotherCapProcessorFault</parameter>
<parameter name="is.active">true</parameter>
<?xml version="1.0" encoding="UTF-8"?>
  <proxy xmlns="http://ws.apache.org/ns/synapse" name="AnotherCapProxy" transports="http https" startOnLoad="true" trace="disable">
<target>
    <inSequence>
        <log level="custom">
            <property name="where" value="********** [ANOTHER-CAP-PROXY] - BEGINNING OF IN SEQUENCE .... "/>
        </log>
        <log level="full">
            <property name="what" value="********** [ANOTHER-CAP-PROXY] - MESSAGE FROM OPERCUPIDSTORE...."/>
        </log>
        <property name="FORCE_ERROR_ON_SOAP_FAULT" value="false" scope="default" type="STRING"/>
        <property name="OUT_ONLY" value="false" scope="default" type="STRING"/>
        <property name="InternalCodErr" value="WSO2_xxx" scope="default" type="STRING"/>
        <property xmlns:ns="http://org.apache.synapse/xsd" xmlns:p="http://gamopera.ifpl.csi.it" name="ProcessingID" expression="//p:id" scope="default" type="STRING"/>
        <log level="custom">
            <property xmlns:ns="http://org.apache.synapse/xsd" name="what" expression="fn:concat('****[ANOTHER-CAP-PROXY] - PROCESSING ID: ',get-property('default','ProcessingID'))"/>
        </log>
        <xslt xmlns:ns="http://org.apache.synapse/xsd" key="gov:xslt/getInputCUPXml_Transform.xslt" source="$body">
            <property name="idOp" expression="get-property('default','ProcessingID')"/>
        </xslt>
        <log level="full">
            <property name="what" value="********** [ANOTHER-CAP-PROXY] - CALLING GAMOPERA FOR THE XML REQUEST TO INVOKE SIMON.... "/>
        </log>
        <header name="Action" scope="default" value=" "/>
        <send>
            <endpoint key="AnotherCapGamoperaCreateXMLServiceEndpoint"/>
        </send>
    </inSequence>
    <outSequence>
        <log level="full">
            <property name="where" value="********** [ANOTHER-CAP-PROXY] - BEGINNING OF OUT SEQUENCE .... "/>
            <property name="where" value="********** [ANOTHER-CAP-PROXY] - THE GAMOPERA RESPONSE ...."/>
        </log>
        <filter xmlns:s12="http://www.w3.org/2003/05/soap-envelope" xmlns:ns="http://org.apache.synapse/xsd" xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/" xpath="s11:Body/s11:Fault | s12:Body/s12:Fault">
            <then>
                <property name="ErrorCode" value="WSO2_004" scope="operation" type="STRING"/>
                <log level="custom">
                    <property name="where" value="********** [ANOTHER-CAP-PROXY] - SOAP FAULT !!! SOMETHING WENT WRONG CALLING GAMOPERA IN GETTING XML ...."/>
                    <property name="ERROR_CODE" expression="get-property('operation','ErrorCode')"/>
                </log>
            </then>
            <else>
                <property name="ErrorCode" value="WSO2_003" scope="default" type="STRING"/>
                <log level="custom">
                    <property name="where" value="********** [ANOTHER-CAP-PROXY] - NOT COMPLETE RESPONSE FROM GAMOPERA IN GETTING XML ..."/>
                    <property name="ERROR_CODE = " expression="get-property('default','ErrorCode')"/>
                </log>
            </else>
        </filter>
        <send/>
    </outSequence>
    <faultSequence>
        <log level="full">
            <property name="where" value="********** [ANOTHER-CAP-PROXY] - BEGINNING OF FAULT SEQUENCE .... "/>
            <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
            <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
            <property name="ERROR_DETAIL" expression="get-property('ERROR_DETAIL')"/>
            <property name="ERROR_EXCEPTION" expression="get-property('ERROR_EXCEPTION')"/>
        </log>
        <send/>
    </faultSequence>
</target>
<publishWSDL key="gov:wsdl/AnotherWSDL.wsdl"/>

因此,我的消息处理器尝试两次,然后自动停止

当执行日志时,如下所示

TID: [0] [ESB] [2014-10-31 11:00:17,128]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  where = ********** [ANOTHER-CAP-PROXY] - BEGINNING OF IN SEQUENCE ....  {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-10-31 11:00:17,128]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: /wso003/services/AnotherCapProxy, WSAction: urn:process, SOAPAction: urn:process, MessageID: urn:uuid:2262a521-97da-471a-8691-da9016cbeac3, Direction: request, what = ********** [ANOTHER-CAP-PROXY] - MESSAGE FROM OPERCUPIDSTORE...., Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
  <gam:process xmlns:gam="http://gamopera.ifpl.csi.it">
     <!--Zero or more repetitions:-->         
  <gam:id>459</gam:id></gam:process>
</soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-10-31 11:00:17,129]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  what = ****[ANOTHER-CAP-PROXY] - PROCESSING ID: 459 {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-10-31 11:00:17,132]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: /wso003/services/AnotherCapProxy, WSAction: urn:process, SOAPAction: urn:process, MessageID: urn:uuid:2262a521-97da-471a-8691-da9016cbeac3, Direction: request, what = ********** [ANOTHER-CAP-PROXY] - CALLING GAMOPERA FOR THE XML REQUEST TO INVOKE SIMON.... , Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
<p:gestWso2GetInputCUPXml xmlns:p="http://operintegrated.interfacews.operserv.gamopera.csi.it/"><input><idOperazione>459</idOperazione></input></p:gestWso2GetInputCUPXml></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-10-31 11:00:18,980]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:bf5762a3-2324-4fed-8b56-fdc7cdd4cac2, Direction: response, where = ********** [ANOTHER-CAP-PROXY] - BEGINNING OF OUT SEQUENCE .... , where = ********** [ANOTHER-CAP-PROXY] - THE GAMOPERA RESPONSE ...., Envelope: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Errore imprevisto occorso durante l'esecuzione del metodo:java.lang.NullPointerException</faultstring><detail><ns1:Exception xmlns:ns1="http://operintegrated.interfacews.operserv.gamopera.csi.it/"></ns1:Exception></detail></soap:Fault></soap:Body></soap:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-10-31 11:00:18,980]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  where = ********** [ANOTHER-CAP-PROXY] - FAULT !!! SOMETHING WENT WRONG CALLING GAMOPERA IN GETTING XML ...., ERROR_CODE = WSO2_004 {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-10-31 11:00:18,985] ERROR {org.apache.synapse.message.processor.impl.forwarder.ForwardingService} -  BlockingMessageSender of message processor [AnotherCapForwardMessageProcessor] failed to send message to the endpoint {org.apache.synapse.message.processor.impl.forwarder.ForwardingService}
TID: [0] [ESB] [2014-10-31 11:00:18,986]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  To: /wso003/services/OperCupPrepareProxy.OperCupPrepareProxyHttpSoap11Endpoint, WSAction: urn:process, SOAPAction: urn:process, MessageID: urn:uuid:4ECFA324C9FBB675AB842060829710186-582880576, Direction: request, where = ********** [ANOTHER-CAP-PROCESSOR-FAULT] - BEGINNING PROCESSOR FAULT SEQUENCE .... , Envelope: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Errore imprevisto occorso durante l'esecuzione del metodo:java.lang.NullPointerException</faultstring><detail><ns1:Exception xmlns:ns1="http://operintegrated.interfacews.operserv.gamopera.csi.it/"></ns1:Exception></detail></soap:Fault></soap:Body></soap:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-10-31 11:00:18,992]  INFO {org.apache.synapse.message.processor.impl.ScheduledMessageProcessor} -  Successfully deactivated the message processor [AnotherCapForwardMessageProcessor] {org.apache.synapse.message.processor.impl.ScheduledMessageProcessor}
TID:[0][ESB][2014-10-31 11:00:17128]信息{org.apache.synapse.mediators.builtin.LogMediator}-其中=***************[other-CAP-PROXY]-顺序中的开始。。。。{org.apache.synapse.mediators.builtin.LogMediator}
TID:[0][ESB][2014-10-31 11:00:17128]INFO{org.apache.synapse.mediators.builtin.LogMediator}-To:/wso003/services/AnotherCapProxy,WSAction:urn:process,SOAPAction:urn:process,MessageID:urn:urn:uuid:2262a521-97da-471a-8691-da9016cbeac3,Direction:request,what=*********************[other-CAP-PROXY]-来自OperaidStore的消息,信封:
459
{org.apache.synapse.mediators.builtin.LogMediator}
TID:[0][ESB][2014-10-31 11:00:17129]INFO{org.apache.synapse.mediators.builtin.LogMediator}-what=***[other-CAP-PROXY]-处理ID:459{org.apache.synapse.mediators.builtin.LogMediator}
TID:[0][ESB][2014-10-31 11:00:17132]INFO{org.apache.synapse.mediators.builtin.LogMediator}-To:/wso003/services/AnotherCapProxy,WSAction:urn:process,SOAPAction:urn:process,MessageID:urn:uuid:2262a521-97da-471a-8691-da9016cbeac3,Direction:request,what=************[other-CAP-PROXY]-为XML请求调用GAMOPERA以调用SIMON,信封:
459{org.apache.synapse.mediators.builtin.LogMediator}
TID:[0][ESB][2014-10-31 11:00:18980]INFO{org.apache.synapse.mediators.builtin.LogMediator}-收件人:http://www.w3.org/2005/08/addressing/anonymous,WSAction:,SOAPAction:,MessageID:urn:uuid:bf5762a3-2324-4fed-8b56-fdc7cdd4cac2,方向:响应,其中=************[other-CAP-PROXY]-出序列的开始,where=*********[other-CAP-PROXY]-GAMOPERA响应…,信封:soap:ServerErrore improvisto occorso durante l'esecuzione del metodo:java.lang.NullPointerException{org.apache.synapse.mediators.builtin.LogMediator}
TID:[0][ESB][2014-10-31 11:00:18980]信息{org.apache.synapse.mediators.builtin.LogMediator}-其中=***************[other-CAP-PROXY]-错误!!!在获取XML时调用GAMOPERA时出错了…,错误是\u CODE=WSO2\u 004{org.apache.synapse.mediators.builtin.LogMediator}
TID:[0][ESB][2014-10-31 11:00:18985]错误{org.apache.synapse.message.processor.impl.forwarder.ForwardingService}-阻止消息处理器[AnotherCapForwardMessageProcessor]的MessageSender向端点{org.apache.synapse.message.processor.impl.forwarder.ForwardingService}发送消息失败
TID:[0][ESB][2014-10-31 11:00:18986]INFO{org.apache.synapse.mediators.builtin.LogMediator}-To:/wso003/services/OperCupPrepareProxy.opercupprepareproxyttpsoap11端点,WSAction:urn:process,SOAPAction:urn:process,MessageID:urn:uuid:4ecfa324c9fb675ab842060829710186-582880576,方向:请求,其中=*******[ANOTHER-CAP-PROCESSOR-FAULT]-开始处理器故障序列…,信封:soap:ServerErrore Improvisto occorso durante l'esecuzione del metodo:java.lang.NullPointerException{org.apache.synapse.mediators.builtin.LogMediator}
TID:[0][ESB][2014-10-31 11:00:18992]信息{org.apache.synapse.message.processor.impl.ScheduledMessageProcessor}-成功停用消息处理器[AnotherCapForwardMessageProcessor]{org.apache.synapse.message.processor.impl.ScheduledMessageProcessor}
我看到消息处理器重试序列中的执行没有交叉,当我关闭代理输出序列时,可能出了问题

有什么建议吗?非常感谢

再见


Cesare

当您将soap错误发送回代理outSequence中的消息处理器时,消息处理器将执行其错误序列:消息的HTTP状态代码必须具有不同于“500”的值。您应该记录它(使用属性$axis2:HTTP\u SC)

当故障序列执行“max.delivery.attempts”次时,消息处理器将被停用。如果希望它无限期地重新传递消息,请将此值设置为-1