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 mai00bil <ma...@studserv.uni-leipzig.de> on 2003/06/12 14:30:29 UTC

faultCode in Axisfault

Hallo,
I have a question with Axisfaults.
I generated my own Fault as a subclass from AxisFault and set the faultCode,
but when I want to get the faultCode on the client-side I only get the
default faultCode Server.generalException. The correct faultString I get.

Thanks
Michael

listing:
public class InvalidProductNumberFault extends org.apache.axis.AxisFault {

    /** Creates a new instance of InvalidProductNumberFault */
    public InvalidProductNumberFault() {
    }

    /** Creates a new instance of InvalidProductNumberFault
     * @param reason description of reason
     * @param prodNr invalid product number
     */
    public InvalidProductNumberFault(String reason, int prodNr) {
        this.setFaultCode(new
javax.xml.namespace.QName("Coop_WF.Services.SellerServices", "invalid
product nummer was given"));
        this.setFaultString(new Integer(prodNr).toString());
    }
}


Re: faultCode in Axisfault

Posted by "Mr. Document Service" <mr...@yahoo.com>.
Does AXIS 1.1 AxisFault class support a generalized SOAP Fault
mechanism?

mai00bil <ma...@studserv.uni-leipzig.de> wrote:
Hallo,
I have a question with Axisfaults.
I generated my own Fault as a subclass from AxisFault and set the faultCode,
but when I want to get the faultCode on the client-side I only get the
default faultCode Server.generalException. The correct faultString I get.

Thanks
Michael

listing:
public class InvalidProductNumberFault extends org.apache.axis.AxisFault {

/** Creates a new instance of InvalidProductNumberFault */
public InvalidProductNumberFault() {
}

/** Creates a new instance of InvalidProductNumberFault
* @param reason description of reason
* @param prodNr invalid product number
*/
public InvalidProductNumberFault(String reason, int prodNr) {
this.setFaultCode(new
javax.xml.namespace.QName("Coop_WF.Services.SellerServices", "invalid
product nummer was given"));
this.setFaultString(new Integer(prodNr).toString());
}
}


---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).