You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by am...@apache.org on 2011/02/20 07:26:55 UTC
svn commit: r1072510 - in
/axis/axis2/java/core/trunk/modules/samples/faulthandling:
client/src/example/BankClient.java
service/src/example/BankServiceSkeleton.java
Author: amilas
Date: Sun Feb 20 06:26:55 2011
New Revision: 1072510
URL: http://svn.apache.org/viewvc?rev=1072510&view=rev
Log:
fixing the fault handling sample
Modified:
axis/axis2/java/core/trunk/modules/samples/faulthandling/client/src/example/BankClient.java
axis/axis2/java/core/trunk/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java
Modified: axis/axis2/java/core/trunk/modules/samples/faulthandling/client/src/example/BankClient.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/samples/faulthandling/client/src/example/BankClient.java?rev=1072510&r1=1072509&r2=1072510&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/samples/faulthandling/client/src/example/BankClient.java (original)
+++ axis/axis2/java/core/trunk/modules/samples/faulthandling/client/src/example/BankClient.java Sun Feb 20 06:26:55 2011
@@ -51,10 +51,10 @@ public final class BankClient {
final WithdrawResponse withdrawResponse = bankService.withdraw(withdrawRequest);
System.out.println("Balance = " + withdrawResponse.getBalance());
- } catch (AccountNotExistFaultMessage e) {
+ } catch (AccountNotExistException e) {
final AccountNotExistFault fault = e.getFaultMessage();
System.out.println("Account#" + fault.getAccount() + " does not exist");
- } catch (InsufficientFundFaultMessage e) {
+ } catch (InsufficientFundException e) {
final InsufficientFundFault fault = e.getFaultMessage();
System.out.println("Account#" + fault.getAccount() + " has balance of " + fault.getBalance() + ". It cannot support withdrawal of " + fault.getRequestedFund());
} catch (RemoteException e) {
Modified: axis/axis2/java/core/trunk/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java?rev=1072510&r1=1072509&r2=1072510&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java (original)
+++ axis/axis2/java/core/trunk/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java Sun Feb 20 06:26:55 2011
@@ -35,12 +35,12 @@
*/
public example.WithdrawResponse withdraw(example.Withdraw param0)
- throws InsufficientFundFaultMessage,AccountNotExistFaultMessage{
+ throws InsufficientFundException,AccountNotExistException{
final String account = param0.getAccount();
if (account.equals("13")) {
final AccountNotExistFault fault = new AccountNotExistFault();
fault.setAccount(account);
- AccountNotExistFaultMessage messageException = new AccountNotExistFaultMessage("Account does not exist!");
+ AccountNotExistException messageException = new AccountNotExistException("Account does not exist!");
messageException.setFaultMessage(fault);
throw messageException;
}
@@ -51,7 +51,7 @@
fault.setAccount(account);
fault.setBalance(1000);
fault.setRequestedFund(amount);
- InsufficientFundFaultMessage messageException = new InsufficientFundFaultMessage("Insufficient funds");
+ InsufficientFundException messageException = new InsufficientFundException("Insufficient funds");
messageException.setFaultMessage(fault);
throw messageException;
}