axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Logan <david.lo...@veritas.com>
Subject Extending AxisFault breaks the faultCode
Date Fri, 14 Feb 2003 14:17:08 GMT
If I throw an AxisFault in my service everything works fine. 

If I create a subclass of AxisFault the "faultcode" is always =
http://schemas.xmlsoap.org/soap/envelope/>}Server.generalException
Why isnt the faultcode = "MyService:MY_FAULT_CODE" when caught on the
client?
I am running axis v1.1rc1

Thanks 
----------------------------------------------------------------------------
----
For example...

public class MyService {

  public void throwMyAxisFault() throws MyAxisFault {
    throw new AxisFault("MyService:MY_FAULT_CODE", "this is my message");
  }
}

public class MyAxisFault extends AxisFault {

  public MyAxisFault(String faultCode, String message) {
    super(faultCode, message, null, null);    
  }

}

In the client... 

public void testMyService() {
  
  try {
    myServiceLocator.getMyService().throwMyAxisFault();
  }
  catch (MyAxisFault maf) {
    System.out.println("faultCode=" + maf.getFaultCode());
    System.out.println("faultString=" + maf.getFaultString());
  }

}


Mime
View raw message