Announcements
The Google Cloud Community will be in read-only from July 16 - July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Capture Raise fault message in message logging policy

Hi,

I am capturing error cases and raising a fault based on specific conditions. I also want to log the raise fault message in message logging policy

Raise Fault

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RaiseFault async="false" continueOnError="false" enabled="true" name="RaiseFault">
    <DisplayName>RaiseFault</DisplayName>
    <Properties/>
    <FaultResponse>
        <Set>
            <Headers>
                <Header name="Content-Type">application/xml</Header>
            </Headers>
            <Payload contentType="application/xml" variablePrefix="%" variableSuffix="#">
                <env:Envelope
                    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
                    <env:Header/>
                    <env:Body>
                        <env:Fault
                            xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                            <faultcode>%fault_code#</faultcode>
                            <faultstring>%fault_string#</faultstring>
                        </env:Fault>
                    </env:Body>
                </env:Envelope>
            </Payload>
            <StatusCode>500</StatusCode>
        </Set>
    </FaultResponse>
    <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</RaiseFault>

How can I log the above fault message raised by RaiseFault policy in the message logs ?

Thanks

0 2 548
2 REPLIES 2