You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Hodchenkov, Paul" <pa...@oxagile.com> on 2011/06/07 08:38:01 UTC

RE: Fault Reason message in custom exception when using axis2 ADB stub

Hi Folks,
Is there any way to access fault:reason element in my case?

From: Hodchenkov, Paul
Sent: Tuesday, May 31, 2011 10:52 AM
To: 'java-user@axis.apache.org'
Subject: Fault Reason message in custom exception when using axis2 ADB stub

Hi Folks
I can not access fault reason text when catching a custom exception from service:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
    <soapenv:Body>
        <soapenv:Fault>
            <soapenv:Code>
                <soapenv:Value>soapenv:Receiver</soapenv:Value>
            </soapenv:Code>
            <soapenv:Reason>
                <soapenv:Text xml:lang="en-US">Unknown argument value for argument</soapenv:Text>
            </soapenv:Reason>
            <soapenv:Detail>
                <MySuperFault xmlns="http://test.com"/>
            </soapenv:Detail>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>

MySuperFaultException.getMessage returns MySuperFault instead of 'Unknown argument value for argument' and there is no method similar to AxisFault.getReason. Any ideas?
Thanks