Hi,

I have a registered onError sequence.

In version 4.8.1 SOAP envelop is available in onError sequence while in 4.9.0 
it is not.

in order to access SOAP message content in 4.9.0 after error (in onError 
sequence) I always have to copy it to some temp variable initially. it is very 
inconvenient.

could it be a bug or is it a new "feature" of 4.9.0?


this is my fault sequence. if i remove enrich mediator envelope comes empty 
from the sequence with an error. Without enrich mediator message contains empty 
soap envelope. It can be seen in the output of the log mediator and in the 
message stored in RabbitMQ backend. Actually, it is onError sequence of 
XXXXNotifySendSequence sequence (I added them both for the reference). in case 
of failure I store the message in an external queue, then using sampling 
message I processor read messages from queue and to process them again. the 
idea is taken from - 
http://charith.wickramaarachchi.org/2012/05/another-message-redelivery-pattern-with.html

<?xml version="1.0" encoding="UTF-8"?>
<sequence name="XXXXNotifyErrorSequence" trace="disable" 
xmlns="http://ws.apache.org/ns/synapse";<http://ws.apache.org/ns/synapse>>
    <log level="full">
                    <property name="mssg" expression="get-property('mssg')"/>
                    <property name="retry_count" 
expression="get-property('retry_count')"/>
                </log>
  <filter 
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";<http://www.w3.org/2003/05/soap-envelope>
 xpath="get-property('mssg')">
    <then>
      <enrich>
        <source clone="true" property="mssg" type="property"/>
        <target type="envelope"/>
      </enrich>
      <property name="mssg" action="remove"/>
    </then>
    <else/>
  </filter>



  <filter 
xmlns:ns="http://org.apache.synapse/xsd";<http://org.apache.synapse/xsd> 
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";<http://www.w3.org/2003/05/soap-envelope>
 xmlns:ns3="http://org.apache.synapse/xsd";<http://org.apache.synapse/xsd> 
xpath="get-property('retry_count')">
        <then>
            <property name="retry_count" 
expression="number(get-property('retry_count'))+1" scope="default" 
type="STRING"/>
            <filter xpath="get-property('retry_count') > 5">
                <then>
                    <log>
                        <property name="Dropping--Count" 
expression="get-property('retry_count')"/>
                    </log>
                    <drop/>
                </then>
                <else>
                    <sequence key="XXXXNotifySendSequence"/>
                </else>
            </filter>
        </then>
        <else>
            <property name="retry_count" value="1" scope="default" 
type="STRING"/>
            <clone continueParent="true">
                <target>
                    <sequence>
                        <makefault version="soap11">
                            <code 
xmlns:soap11Env="http://schemas.xmlsoap.org/soap/envelope/";<http://schemas.xmlsoap.org/soap/envelope/>
 value="soap11Env:VersionMismatch"/>
                            <reason expression="get-property('ERROR_MESSAGE')"/>
                        </makefault>
                        <send/>
                    </sequence>
                </target>
            </clone>
        </else>
    </filter>

    <clone>
        <target>
            <sequence>
                <log level="custom">
                    <property name="STORE" value="store the message"/>
                </log>
                <store messageStore="XXXXRabbitMQNative"/>
            </sequence>
        </target>
    </clone>

</sequence>


this is the sequence calling onError sequence. I emulate http timeout in 
HTTPEndpoint to trigger onError sequence invocation


<?xml version="1.0" encoding="UTF-8"?>
<sequence name="XXXXNotifySendSequence"
  onError="XXXXNotifyErrorSequence" trace="disable" 
xmlns="http://ws.apache.org/ns/synapse";<http://ws.apache.org/ns/synapse>>
  <log level="full">
    <property name="XXXX" value="request start"/>
  </log>
  <enrich>
    <source clone="true" type="envelope"/>
    <target property="mssg" type="property"/>
  </enrich>
  <property name="DISABLE_CHUNKING" scope="axis2" type="STRING" value="true"/>
  <call>
    <endpoint key="HTTPEndpoint"/>
  </call>
  <log level="full">
    <property name="XXXX" value="request end"/>
  </log>
</sequence>



Nariman.

_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to