axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Constantino Alarc?n Mery" <inukis...@gmail.com>
Subject Checked Exception - User Exception with Axis
Date Tue, 04 Jul 2006 19:09:51 GMT

Hello (my english is bad, sorry)

I need publish a class with axis. This class is:


public class MessageDelegate {
	public String getMessage() throws MessageFault {
		throw new MessageFault(99,"Mule error");
	}
}



The MessageFault exception is:



public class MessageFault {
	private int errorCode;
	private String errorDescr;
	public int getErrorCode() {
		return errorCode;
	}
	public String getErrorDescr() {
		return errorDescr;
	}
	public MessageFault(int errorCode, String errorDescr){
		this.errorCode = errorCode;
		this.errorDescr = errorDescr;
	}
}



I wish catch MessageFault exception in the client code:



public static void main(String args[]) {

	try {
		MessageDelegateService service = new MessageDelegateServiceLocator();
		MessageDelegate proxy = service.getMessageDelegate(...);
		System.out.println(proxy.getMessage());
	} catch (AxisFault af) {
		... ??
	}
}



I can not catch a exception. I dont know how do. 

Who can help me? I have not finding nothing about this axis exception
handler (URL, Article, ...)

-- 
View this message in context: http://www.nabble.com/Checked-Exception---User-Exception-with-Axis-tf1891417.html#a5171982
Sent from the Axis - User forum at Nabble.com.

Mime
View raw message