Tuesday, February 3, 2015

Route Failure Message Fragment v2

This method of locating the routing error message is noticeably faster, which is not only nicer for the client but helps overall performance by releasing the connection back to the pool that much sooner.  This improvement has also been built with support for multi  and dynamic routing by locating the last routing failure message instead of the first and returning feedback status when the request did not reach the back-end.

<?xml version="1.0" encoding="UTF-8"?>
<wsp:Policy xmlns:L7p="http://www.layer7tech.com/ws/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy">
    <wsp:All wsp:Usage="Required">
        <wsp:All L7p:Enabled="false" wsp:Usage="Required">
            <L7p:SetVariable>
                <L7p:Base64Expression stringValue="JHthdWRpdC5kZXRhaWxzLmxhc3QubWVzc2FnZUlkfQ=="/>
                <L7p:VariableToSet stringValue="fault.code"/>
            </L7p:SetVariable>
            <L7p:SetVariable>
                <L7p:Base64Expression stringValue="JHthdWRpdC5kZXRhaWxzLmxhc3QucGFyYW1zWzFdfQ=="/>
                <L7p:VariableToSet stringValue="failure.messageText"/>
            </L7p:SetVariable>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="audit.details.last... will contain the event information from the routing assertion only if"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="this fragment is run right after the routing failure without any 'add audit details' in between"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="which is why they must be run first"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="this will be broken if debug is enabled because of the additional messages generated"/>
            </L7p:CommentAssertion>
            <L7p:assertionComment>
                <L7p:Properties mapValue="included">
                    <L7p:entry>
                        <L7p:key stringValue="RIGHT.COMMENT"/>
                        <L7p:value stringValue="// fastest method, slightly fragile"/>
                    </L7p:entry>
                </L7p:Properties>
            </L7p:assertionComment>
        </wsp:All>
        <L7p:AuditDetailAssertion>
            <L7p:Detail stringValue="Policy Fragment: Fault.RouteFailure.SOAP"/>
        </L7p:AuditDetailAssertion>
        <wsp:All wsp:Usage="Required">
            <L7p:SetVariable>
                <L7p:Base64Expression stringValue="VW5hYmxlIHRvIGxvY2F0ZSBlcnJvciBkZXRhaWxzLg=="/>
                <L7p:VariableToSet stringValue="failure.messageText"/>
            </L7p:SetVariable>
            <L7p:SetVariable>
                <L7p:Base64Expression stringValue="PGF1ZGl0Pg=="/>
                <L7p:VariableToSet stringValue="audits"/>
            </L7p:SetVariable>
            <L7p:ForEachLoop L7p:Usage="Required"
                loopVariable="audit.details" variablePrefix="this">
                <L7p:SetVariable>
                    <L7p:Base64Expression stringValue="JHthdWRpdHN9DQogICAgPGRldGFpbCBtZXNzYWdlSUQ9IiR7dGhpcy5jdXJyZW50Lm1lc3NhZ2VJZH0iPiR7dGhpcy5jdXJyZW50LnBhcmFtc1sxXX08L2RldGFpbD4="/>
                    <L7p:VariableToSet stringValue="audits"/>
                </L7p:SetVariable>
            </L7p:ForEachLoop>
            <L7p:SetVariable>
                <L7p:Base64Expression stringValue="JHthdWRpdHN9DQo8L2F1ZGl0Pg=="/>
                <L7p:ContentType stringValue="text/xml; charset=utf-8"/>
                <L7p:DataType variableDataType="message"/>
                <L7p:VariableToSet stringValue="audits"/>
            </L7p:SetVariable>
            <L7p:ResponseXpathAssertion>
                <L7p:VariablePrefix stringValue="detail"/>
                <L7p:XmlMsgSrc stringValue="audits"/>
                <L7p:XpathExpression xpathExpressionValue="included">
                    <L7p:Expression stringValue="/audit/detail[@messageID=4038 or @messageID=4039 or @messageID=4042][last()]"/>
                    <L7p:Namespaces mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="s"/>
                            <L7p:value stringValue="http://schemas.xmlsoap.org/soap/envelope/"/>
                        </L7p:entry>
                    </L7p:Namespaces>
                    <L7p:XpathVersion xpathVersion="XPATH_1_0"/>
                </L7p:XpathExpression>
            </L7p:ResponseXpathAssertion>
            <L7p:SetVariable>
                <L7p:Base64Expression stringValue="JHtkZXRhaWwucmVzdWx0fQ=="/>
                <L7p:VariableToSet stringValue="failure.messageText"/>
            </L7p:SetVariable>
            <L7p:ResponseXpathAssertion>
                <L7p:VariablePrefix stringValue="detail"/>
                <L7p:XmlMsgSrc stringValue="audits"/>
                <L7p:XpathExpression xpathExpressionValue="included">
                    <L7p:Expression stringValue="/audit/detail[@messageID=4038 or @messageID=4039 or @messageID=4042][last()]/@messageID"/>
                    <L7p:Namespaces mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="s"/>
                            <L7p:value stringValue="http://schemas.xmlsoap.org/soap/envelope/"/>
                        </L7p:entry>
                    </L7p:Namespaces>
                    <L7p:XpathVersion xpathVersion="XPATH_1_0"/>
                </L7p:XpathExpression>
            </L7p:ResponseXpathAssertion>
            <L7p:SetVariable>
                <L7p:Base64Expression stringValue="JHtkZXRhaWwucmVzdWx0fQ=="/>
                <L7p:VariableToSet stringValue="fault.code"/>
            </L7p:SetVariable>
            <L7p:assertionComment>
                <L7p:Properties mapValue="included">
                    <L7p:entry>
                        <L7p:key stringValue="RIGHT.COMMENT"/>
                        <L7p:value stringValue="// significantly faster than before and equaly stable"/>
                    </L7p:entry>
                </L7p:Properties>
            </L7p:assertionComment>
        </wsp:All>
        <wsp:All wsp:Usage="Required">
            <L7p:AuditDetailAssertion>
                <L7p:Detail stringValueReference="inline"><![CDATA[Routing Status: ${routingStatus};
Response Content Type: ${response.contentType}]]></L7p:Detail>
            </L7p:AuditDetailAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="http://www.iana.org/assignments/http-status-codes/http-status-codes.xml"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="meaningful failure modes for route assertion (fault.code)"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:AssertionComment assertionComment="included">
                    <L7p:Properties mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="RIGHT.COMMENT"/>
                            <L7p:value stringValue="// &quot;feedback.current.status&quot; = -1"/>
                        </L7p:entry>
                    </L7p:Properties>
                </L7p:AssertionComment>
                <L7p:Comment stringValue="1: failure occured before request was send to the backend"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="2: request was routed but no response was recieved"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="3: bad response from the backend"/>
            </L7p:CommentAssertion>
            <L7p:assertionComment>
                <L7p:Properties mapValue="included">
                    <L7p:entry>
                        <L7p:key stringValue="RIGHT.COMMENT"/>
                        <L7p:value stringValue="//Informational"/>
                    </L7p:entry>
                </L7p:Properties>
            </L7p:assertionComment>
        </wsp:All>
        <wsp:All wsp:Usage="Required">
            <L7p:SetVariable>
                <L7p:Base64Expression stringValue="NTAw"/>
                <L7p:VariableToSet stringValue="fault.status"/>
            </L7p:SetVariable>
            <L7p:SetVariable>
                <L7p:Base64Expression stringValue="VW5kZWZpbmVkIGVycm9yIG9jY3VyZWQu"/>
                <L7p:VariableToSet stringValue="fault.string"/>
            </L7p:SetVariable>
            <L7p:SetVariable>
                <L7p:Base64Expression stringValue="UGxlYXNlIGNhbGwgdGhlIGhlbHAgZGVzayBmb3IgYXNzaXN0YW5jZS4="/>
                <L7p:VariableToSet stringValue="fault.detail"/>
            </L7p:SetVariable>
            <L7p:assertionComment>
                <L7p:Properties mapValue="included">
                    <L7p:entry>
                        <L7p:key stringValue="RIGHT.COMMENT"/>
                        <L7p:value stringValue="//default values"/>
                    </L7p:entry>
                </L7p:Properties>
            </L7p:assertionComment>
        </wsp:All>
        <wsp:OneOrMore wsp:Usage="Required">
            <wsp:All wsp:Usage="Required">
                <L7p:ComparisonAssertion>
                    <L7p:CaseSensitive booleanValue="false"/>
                    <L7p:Expression1 stringValue="${this.current.messageId}"/>
                    <L7p:Operator operatorNull="null"/>
                    <L7p:Predicates predicates="included">
                        <L7p:item dataType="included">
                            <L7p:Type variableDataType="string"/>
                        </L7p:item>
                        <L7p:item binary="included">
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:RightValue stringValue="4038"/>
                        </L7p:item>
                    </L7p:Predicates>
                </L7p:ComparisonAssertion>
                <L7p:assertionComment>
                    <L7p:Properties mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="RIGHT.COMMENT"/>
                            <L7p:value stringValue="//event 4038: bad http code response from backend"/>
                        </L7p:entry>
                    </L7p:Properties>
                </L7p:assertionComment>
            </wsp:All>
            <wsp:All wsp:Usage="Required">
                <L7p:ComparisonAssertion>
                    <L7p:CaseSensitive booleanValue="false"/>
                    <L7p:Expression1 stringValue="${this.current.messageId}"/>
                    <L7p:Operator operatorNull="null"/>
                    <L7p:Predicates predicates="included">
                        <L7p:item dataType="included">
                            <L7p:Type variableDataType="string"/>
                        </L7p:item>
                        <L7p:item binary="included">
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:RightValue stringValue="4041"/>
                        </L7p:item>
                    </L7p:Predicates>
                </L7p:ComparisonAssertion>
                <L7p:SetVariable>
                    <L7p:Base64Expression stringValue="LTE="/>
                    <L7p:DataType variableDataType="int"/>
                    <L7p:VariableToSet stringValue="feedback.current.status"/>
                </L7p:SetVariable>
                <L7p:assertionComment>
                    <L7p:Properties mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="RIGHT.COMMENT"/>
                            <L7p:value stringValue="//event 4041: timeout"/>
                        </L7p:entry>
                    </L7p:Properties>
                </L7p:assertionComment>
            </wsp:All>
            <wsp:All wsp:Usage="Required">
                <L7p:ComparisonAssertion>
                    <L7p:CaseSensitive booleanValue="false"/>
                    <L7p:Expression1 stringValue="${this.current.messageId}"/>
                    <L7p:Operator operatorNull="null"/>
                    <L7p:Predicates predicates="included">
                        <L7p:item dataType="included">
                            <L7p:Type variableDataType="string"/>
                        </L7p:item>
                        <L7p:item binary="included">
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:RightValue stringValue="4042"/>
                        </L7p:item>
                    </L7p:Predicates>
                </L7p:ComparisonAssertion>
                <L7p:Split>
                    <L7p:InputVariable stringValue="failure.messageText"/>
                    <L7p:OutputVariable stringValue="failure.messageText"/>
                    <L7p:SplitPattern stringValue=":"/>
                    <L7p:SplitPatternRegEx booleanValue="false"/>
                </L7p:Split>
                <wsp:OneOrMore wsp:Usage="Required">
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue="Received fatal alert: unexpected_message"/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="Received fatal alert: unexpected_message"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:SetVariable>
                            <L7p:Base64Expression stringValue="LTE="/>
                            <L7p:DataType variableDataType="int"/>
                            <L7p:VariableToSet stringValue="feedback.current.status"/>
                        </L7p:SetVariable>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//Cannot establish trust with backend server."/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue="java.security.cert.CertificateException: Certificate path validation and/or revocation checking failed. Caused by: Certificate path validation and/or revocation checking failed"/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="Certificate path validation and/or revocation checking failed"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:SetVariable>
                            <L7p:Base64Expression stringValue="LTE="/>
                            <L7p:DataType variableDataType="int"/>
                            <L7p:VariableToSet stringValue="feedback.current.status"/>
                        </L7p:SetVariable>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//Certificate path validation and/or revocation checking failed"/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue="Unable to obtain HTTP response from https://your.server.com/service/endpoint.asmx: Host name does not match certificate 'your.server.com'."/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="Host name does not match certificate"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:SetVariable>
                            <L7p:Base64Expression stringValue="LTE="/>
                            <L7p:DataType variableDataType="int"/>
                            <L7p:VariableToSet stringValue="feedback.current.status"/>
                        </L7p:SetVariable>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//Host name does not match certificate"/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue="Unable to login using gateway configured account."/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="unsupported_certificate"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:SetVariable>
                            <L7p:Base64Expression stringValue="LTE="/>
                            <L7p:DataType variableDataType="int"/>
                            <L7p:VariableToSet stringValue="feedback.current.status"/>
                        </L7p:SetVariable>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//Received fatal alert,  unsupported_certificate"/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue="Received close_notify during handshake"/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="close_notify"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:SetVariable>
                            <L7p:Base64Expression stringValue="LTE="/>
                            <L7p:DataType variableDataType="int"/>
                            <L7p:VariableToSet stringValue="feedback.current.status"/>
                        </L7p:SetVariable>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//Received close_notify during handshake"/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue=" Timeout when connecting to host 'your.server.com'. Caused by"/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="Timeout when connecting to host"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:SetVariable>
                            <L7p:Base64Expression stringValue="LTE="/>
                            <L7p:DataType variableDataType="int"/>
                            <L7p:VariableToSet stringValue="feedback.current.status"/>
                        </L7p:SetVariable>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//Timeout when connecting to host"/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue=" The host did not accept the connection within timeout of 1 ms. Caused by"/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="The host did not accept the connection"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:SetVariable>
                            <L7p:Base64Expression stringValue="LTE="/>
                            <L7p:DataType variableDataType="int"/>
                            <L7p:VariableToSet stringValue="feedback.current.status"/>
                        </L7p:SetVariable>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//The host did not accept the connection"/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue=" Unknown host"/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="Unknown host"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:SetVariable>
                            <L7p:Base64Expression stringValue="LTE="/>
                            <L7p:DataType variableDataType="int"/>
                            <L7p:VariableToSet stringValue="feedback.current.status"/>
                        </L7p:SetVariable>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//Unknown host"/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue="Multipart stream ended before a terminating boundary was encountered"/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="Multipart stream ended before a terminating boundary was encountered"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//Multipart stream ended before a terminating boundary was encountered"/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue="Unable to read stream: the specified maximum data size limit would be exceeded"/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="Unable to read stream"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//the specified maximum data size limit would be exceeded"/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue="Unable to obtain HTTP response from https://your.server.com:443/service/endpoint: Read timed out"/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="Read timed out"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//Read timed out"/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue=" Connection reset"/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="Connection reset"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//Connection reset"/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue=" The server your.server.com failed to respond with a valid HTTP response"/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="failed to respond with a valid HTTP response"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//failed to respond with a valid HTTP response"/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <wsp:All wsp:Usage="Required">
                        <L7p:CommentAssertion>
                            <L7p:AssertionComment assertionComment="included">
                                <L7p:Properties mapValue="included">
                                    <L7p:entry>
                                    <L7p:key stringValue="LEFT.COMMENT"/>
                                    <L7p:value stringValue="/*split on : [3]*/"/>
                                    </L7p:entry>
                                </L7p:Properties>
                            </L7p:AssertionComment>
                            <L7p:Comment stringValue="Connection refused"/>
                        </L7p:CommentAssertion>
                        <L7p:ComparisonAssertion>
                            <L7p:CaseSensitive booleanValue="false"/>
                            <L7p:Expression1 stringValue="${failure.messageText}"/>
                            <L7p:MultivaluedComparison multivaluedComparison="ANY"/>
                            <L7p:Operator operatorNull="null"/>
                            <L7p:Predicates predicates="included">
                                <L7p:item dataType="included">
                                    <L7p:Type variableDataType="string"/>
                                </L7p:item>
                                <L7p:item binary="included">
                                    <L7p:Operator operator="CONTAINS"/>
                                    <L7p:RightValue stringValue="Connection refused"/>
                                </L7p:item>
                            </L7p:Predicates>
                        </L7p:ComparisonAssertion>
                        <L7p:SetVariable>
                            <L7p:Base64Expression stringValue="LTE="/>
                            <L7p:DataType variableDataType="int"/>
                            <L7p:VariableToSet stringValue="feedback.current.status"/>
                        </L7p:SetVariable>
                        <L7p:assertionComment>
                            <L7p:Properties mapValue="included">
                                <L7p:entry>
                                    <L7p:key stringValue="RIGHT.COMMENT"/>
                                    <L7p:value stringValue="//Connection refused"/>
                                </L7p:entry>
                            </L7p:Properties>
                        </L7p:assertionComment>
                    </wsp:All>
                    <L7p:TrueAssertion/>
                </wsp:OneOrMore>
                <L7p:assertionComment>
                    <L7p:Properties mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="RIGHT.COMMENT"/>
                            <L7p:value stringValue="//event 4042"/>
                        </L7p:entry>
                    </L7p:Properties>
                </L7p:assertionComment>
            </wsp:All>
            <L7p:TrueAssertion/>
            <L7p:assertionComment>
                <L7p:Properties mapValue="included">
                    <L7p:entry>
                        <L7p:key stringValue="RIGHT.COMMENT"/>
                        <L7p:value stringValue="// triage event and parse message"/>
                    </L7p:entry>
                </L7p:Properties>
            </L7p:assertionComment>
        </wsp:OneOrMore>
        <L7p:CustomizeErrorResponse>
            <L7p:Content stringValueReference="inline"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <soapenv:Fault>
            <faultcode>soapenv:Server</faultcode>
            <faultstring>${fault.string}</faultstring>
            <faultactor>${request.url}</faultactor>
            <detail>
                <datetime>${request.time}</datetime>
                <errorcode>${fault.code}${fault.status}${fault.char}</errorcode>
                <message>${fault.detail}</message>
        </detail>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>]]></L7p:Content>
            <L7p:ContentType stringValue="text/xml;charset=utf-8"/>
            <L7p:ExtraHeaders nameValuePairArray="included"/>
            <L7p:HttpStatus stringValue="${fault.status}"/>
        </L7p:CustomizeErrorResponse>
        <wsp:All wsp:Usage="Required">
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="failure.messageText: error description for logging and optionally for notifications"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="fault.detail: english readable message for client"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="fault.string: short description for client"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="fault.code: custom event code meaningful only to Layer7 admin team"/>
            </L7p:CommentAssertion>
            <L7p:CommentAssertion>
                <L7p:Comment stringValue="fault.status: HTTP code to send to client"/>
            </L7p:CommentAssertion>
            <L7p:AuditDetailAssertion>
                <L7p:AssertionComment assertionComment="included">
                    <L7p:Properties mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="RIGHT.COMMENT"/>
                            <L7p:value stringValue="//audit"/>
                        </L7p:entry>
                    </L7p:Properties>
                </L7p:AssertionComment>
                <L7p:Detail stringValueReference="inline"><![CDATA[Routing latency: ${httpRouting.latency};
Route Falure: ${failure.messageText};
Route error ${fault.code} found;]]></L7p:Detail>
                <L7p:Level stringValue="WARNING"/>
            </L7p:AuditDetailAssertion>
            <L7p:assertionComment>
                <L7p:Properties mapValue="included">
                    <L7p:entry>
                        <L7p:key stringValue="RIGHT.COMMENT"/>
                        <L7p:value stringValue="//informational"/>
                    </L7p:entry>
                </L7p:Properties>
            </L7p:assertionComment>
        </wsp:All>
        <wsp:OneOrMore wsp:Usage="Required">
            <wsp:All L7p:Enabled="false" wsp:Usage="Required">
                <L7p:ExportVariables>
                    <L7p:AssertionComment assertionComment="included">
                        <L7p:Properties mapValue="included">
                            <L7p:entry>
                                <L7p:key stringValue="RIGHT.COMMENT"/>
                                <L7p:value stringValue="// return feedback status"/>
                            </L7p:entry>
                        </L7p:Properties>
                    </L7p:AssertionComment>
                    <L7p:ExportedVars stringArrayValue="included">
                        <L7p:item stringValue="failure.messageText"/>
                        <L7p:item stringValue="feedback.current.status"/>
                    </L7p:ExportedVars>
                </L7p:ExportVariables>
                <L7p:assertionComment>
                    <L7p:Properties mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="RIGHT.COMMENT"/>
                            <L7p:value stringValue="// dynamic routing support"/>
                        </L7p:entry>
                    </L7p:Properties>
                </L7p:assertionComment>
            </wsp:All>
            <wsp:All wsp:Usage="Required">
                <L7p:ExportVariables>
                    <L7p:AssertionComment assertionComment="included">
                        <L7p:Properties mapValue="included">
                            <L7p:entry>
                                <L7p:key stringValue="RIGHT.COMMENT"/>
                                <L7p:value stringValue="//for use with alerting"/>
                            </L7p:entry>
                        </L7p:Properties>
                    </L7p:AssertionComment>
                    <L7p:ExportedVars stringArrayValue="included">
                        <L7p:item stringValue="failure.messageText"/>
                    </L7p:ExportedVars>
                </L7p:ExportVariables>
                <L7p:FalseAssertion>
                    <L7p:AssertionComment assertionComment="included">
                        <L7p:Properties mapValue="included">
                            <L7p:entry>
                                <L7p:key stringValue="RIGHT.COMMENT"/>
                                <L7p:value stringValue="//stop causes error response to be sent to client"/>
                            </L7p:entry>
                        </L7p:Properties>
                    </L7p:AssertionComment>
                </L7p:FalseAssertion>
                <L7p:assertionComment>
                    <L7p:Properties mapValue="included">
                        <L7p:entry>
                            <L7p:key stringValue="RIGHT.COMMENT"/>
                            <L7p:value stringValue="// standard STOP"/>
                        </L7p:entry>
                    </L7p:Properties>
                </L7p:assertionComment>
            </wsp:All>
            <L7p:assertionComment>
                <L7p:Properties mapValue="included">
                    <L7p:entry>
                        <L7p:key stringValue="RIGHT.COMMENT"/>
                        <L7p:value stringValue="// one or the other, do not enable both (both is effectively dynamic support - no STOP)"/>
                    </L7p:entry>
                </L7p:Properties>
            </L7p:assertionComment>
        </wsp:OneOrMore>
    </wsp:All>
</wsp:Policy>

No comments:

Post a Comment