Advertisement
simeonvarbanov

Untitled

Nov 24th, 2012
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.83 KB | None | 0 0
  1. import stub.*;
  2. import stub.WSCustomerStub.GetBalanceResponse;
  3. import stub.WSCustomerStub.MoveAmountResponse;
  4.  
  5. public class ClientWS  {
  6.  
  7.     public static void main(String args[]) throws Exception {
  8.         System.out.println("ClientWS called ...");
  9.         WSCustomerStub stub = new WSCustomerStub(
  10.                 "http://localhost:8080/axis2/services/WSCustomer");
  11.         stub.WSCustomerStub.GetBalance b = new stub.WSCustomerStub.GetBalance();
  12.         b.setAccountId(1);
  13.         stub.WSCustomerStub.MoveAmount move = new stub.WSCustomerStub.MoveAmount();
  14.         move.setFromId(0);
  15.         move.setToId(2);
  16.         move.setAmount(10);
  17.        
  18.         MoveAmountResponse r2 = stub.moveAmount(move);
  19.         GetBalanceResponse r = stub.getBalance(b);
  20.  
  21.         double balance = r.get_return();
  22.         System.out.println("The balance of account with id " + b.getAccountId()
  23.                 + " is equal to: " + balance);
  24.         System.out.println(r2);
  25.  
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement