Client – BT 7


package nctruong.pack;

import nctruong.pack.*;
import nctruong.pack.DoiTienStub.*;

public class Client{
    public static void main(java.lang.String args[]){
        try{
            DoiTienStub stub = new DoiTienStub(“http://localhost:8080/axis2/services/DoiTien”);
            doGet(stub)    ;    
        } catch (Exception e){
            e.printStackTrace();
            System.out.println(“\n\n\n”);
        }
    }
   
    public static void doGet(DoiTienStub stub){
        try{
            DoiTienEuro euro = new DoiTienEuro();
            euro.setSoTienEuro(50);
            
            DoiTienDo usd = new DoiTienDo();
            usd.setSoTienDo(100);
            
            DoiTienDoResponse res1 = stub.doiTienDo(usd);
            DoiTienEuroResponse res2 = stub.doiTienEuro(euro);
            
            System.out.println(“Doi tien: “);
            System.out.println(“50 EURO = “+res2.get_return()+” vnd”);
            System.out.println(“100 USD = “+res1.get_return()+” vnd”);
        } catch (Exception e){
            e.printStackTrace();
            System.out.println(“\n\n\n”);
        }
    }
}

 

Advertisements

About Pierre Nguyen

Nothing

Posted on April 20, 2012, in Uncategorized. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: