RE: Accessing faultstring in Axis2 client

Martin Gainty <[email protected]>
Newsgroups gmane.text.xml.axis.user
Message-ID <[email protected]>
   AxisFault.java

/**
     * Dump the fault info to the log at debug level.
     */
    public void dump() {
        log.debug(dumpToString());
    }

    /**
     * turn the fault and details into a string, with XML escaping.
     * subclassers: for security (cross-site-scripting) reasons,
     * escape everything that could contain caller-supplied data.
     * @return stringified fault details
     */
    public String dumpToString()


> Date: Wed, 4 Jun 2014 06:18:42 -0700
> From: [email protected]
> Subject: Accessing faultstring in Axis2 client
> To: [email protected]
> 
> I have a simple question - how do I access the SOAP faultcode and faultstring in an Axis2 client?
> 
> The client code calls the web service operation and returns the response or throws an exception:
>  
> try {
> stub.getPublication(pub, auth);
> }
> catch (WebServiceException wse) {
> wse.printStackTrace();
> }
>  
> I need to get the text in the <faultstring> element.  How do I do that?
>  
> Many thanks.
> J
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.