hello,
I have 2 questions : 1. how could Client get the faultDetail and
the exceptionName,
I have tryed with following code:
.................
try{
String ret= (String)call.invoke(new Object[]{......});
System.out.println("token " +ret );
} catch (RemoteException e) {
if (e instanceof AxisFault){
AxisFault af= (AxisFault)e;
System.out.println(">>>FaultCode :"+af.dumpToString());
Element [] fe=af.getFaultDetails();
for (int i =0; i<fe.length; i++){
System.out.println(" >>>"+fe[i] );
}
}
}
......
I got :
>>>FaultCode :AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString:
faultActor:
faultNode:
faultDetail:
{http://registry.modelbus.modelware.org}fault:null
{http://xml.apache.org/axis/}exceptionName:org.modelware.modelbus.registry.AlreadyRegistered
{http://xml.apache.org/axis/}stackTrace:
at
org.modelware.modelbus.registry.ModelwareRegistrySoapBindingImpl.registerTool(ModelwareRegistrySoapBindingImpl.java:817)
at
org.modelware.modelbus.registry.ModelwareRegistrySoapBindingSkeleton.registerTool(ModelwareRegistrySoapBindingSkeleton.java:160)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
......
{http://xml.apache.org/axis/}hostname:YLY
>>>[ns1:fault: null]
>>>[ns2:*exceptionName: null]*
>>>[ns3:stackTrace: null]
>>>[ns4:hostname: _null]
but I cann`t got the
exceptionName(org.modelware.modelbus.registry.AlreadyRegistered inplace
of null)???
*2. I have defined an Exception--InvalidTool as following, how could
Client get the text of an InvalidTool Exeption? it doesn`t seem to be
encoded in response Soap messenge, although server have already defined
the text of the InvalidTool Exeption .*
public class InvalidTool extends org.apache.axis.AxisFault implements
java.io.Serializable {
private java.lang.String *text*;
public InvalidTool() {
}
public InvalidTool(java.lang.String text) {
this.text = text;
}
thanks for help
Yang