Author: veithen
Date: Fri Aug 12 21:46:25 2011
New Revision: 1157265

URL: http://svn.apache.org/viewvc?rev=1157265&view=rev
Log:
AXIS2-4533 / AXIS2-5034:
* Reverted r1072510; the faulthandling sample was actually broken by the change 
in AXIS2-4533.
* Included the faulthandling sample in the build test executed by the 
distribution module, so that we can prevent regression.  

Modified:
    axis/axis2/java/core/trunk/modules/distribution/pom.xml
    
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/distribution/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/distribution/pom.xml?rev=1157265&r1=1157264&r2=1157265&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/distribution/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/distribution/pom.xml Fri Aug 12 21:46:25 
2011
@@ -352,6 +352,9 @@
                                 <!-- Test of the mtom sample -->
                                 <ant 
dir="${project.build.directory}/axis2-${project.version}/samples/mtom" 
target="generate.service"/>
                                 <ant 
dir="${project.build.directory}/axis2-${project.version}/samples/mtom" 
target="generate.client"/>
+                                
+                                <!-- Test of the faulthandling sample -->
+                                <ant 
dir="${project.build.directory}/axis2-${project.version}/samples/faulthandling" 
target="generate.service"/>
                             </tasks>
                         </configuration>
                     </execution>

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=1157265&r1=1157264&r2=1157265&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
 Fri Aug 12 21:46:25 2011
@@ -51,10 +51,10 @@ public final class BankClient {
             final WithdrawResponse withdrawResponse = 
bankService.withdraw(withdrawRequest);
             System.out.println("Balance = " + withdrawResponse.getBalance());
             
-        } catch (AccountNotExistException e) {
+        } catch (AccountNotExistFaultMessage e) {
             final AccountNotExistFault fault = e.getFaultMessage();
             System.out.println("Account#" + fault.getAccount() + " does not 
exist");
-        } catch (InsufficientFundException e) {
+        } catch (InsufficientFundFaultMessage 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=1157265&r1=1157264&r2=1157265&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
 Fri Aug 12 21:46:25 2011
@@ -35,12 +35,12 @@
 
          */
         public  example.WithdrawResponse withdraw(example.Withdraw param0)
-           throws InsufficientFundException,AccountNotExistException{
+           throws InsufficientFundFaultMessage,AccountNotExistFaultMessage{
                 final String account = param0.getAccount();
         if (account.equals("13")) {
             final AccountNotExistFault fault = new AccountNotExistFault();
             fault.setAccount(account);
-            AccountNotExistException messageException = new 
AccountNotExistException("Account does not exist!");
+            AccountNotExistFaultMessage messageException = new 
AccountNotExistFaultMessage("Account does not exist!");
             messageException.setFaultMessage(fault);
             throw messageException;
         }
@@ -51,7 +51,7 @@
             fault.setAccount(account);
             fault.setBalance(1000);
             fault.setRequestedFund(amount);
-            InsufficientFundException messageException = new 
InsufficientFundException("Insufficient funds");
+            InsufficientFundFaultMessage messageException = new 
InsufficientFundFaultMessage("Insufficient funds");
             messageException.setFaultMessage(fault);
             throw messageException;
         }


Reply via email to