synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (SYNAPSE-498) Make it easier to detect fault messages when mediating them
Date Tue, 13 Jan 2009 18:26:02 GMT

     [ https://issues.apache.org/jira/browse/SYNAPSE-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Asankha C. Perera resolved SYNAPSE-498.
---------------------------------------

    Resolution: Fixed

The XPath extension function get-property() is now extended to indicate if the message (ie
the transport, message formatter, or message payload) indicates a fault message

To detect SOAP 1.1 / 1.2, POX, and other (e.g. Hessian) faults etc, one can just write:

                <filter xpath="get-property('FAULT')">
                    <!-- fault logic here -->
                    <log level="custom">
                        <property name="MSG" value="SOAP Fault"/>
                    </log>
                </filter>

This also eliminates the need to write a long XPath expression to detect SOAP 1.1/1.2 faults:

<filter xpath="/soap11:Envelope/soap11:Body/soap11:Fault or /soap12:Envelope/soap12:Body/soap12:Fault"

                    xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" 
                    xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
                

> Make it easier to detect fault messages when mediating them
> -----------------------------------------------------------
>
>                 Key: SYNAPSE-498
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-498
>             Project: Synapse
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2
>            Reporter: Asankha C. Perera
>            Assignee: Asankha C. Perera
>            Priority: Minor
>             Fix For: 1.3
>
>
> It should be easy to find if a message being mediated upon is an error or a fault. Currently
for SOAP interactions, one may have to write a filter as shown below to detect a SOAP 1.1
and/or 1.2 fault
> <filter xpath="/soap11:Envelope/soap11:Body/soap11:Fault or /soap12:Envelope/soap12:Body/soap12:Fault"
>                     xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"
>                     xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
> It should also be possible for someone to check for POX and other types of faults, which
maybe indicated by the transport and/or other (possibly within the payload of a binary message)
information as well. e.g. HTTP response code for POX, custom binary indication for Hessian
> One possible way of implementing this is using the get-property() function, and allowing
someone to detect any known fault messages with say a "get-property('FAULT')" call - which
could check for SOAP 1.1/1.2, HTTP non-2xx, and Hessian faults etc. For HTTP one could also
check the status code via the already available HTTP_SC property on the Axis2 message context
level.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message