package sample.soapwithattachments.client;

import sample.soapwithattachments.client.SWASampleServiceStub.UploadFile;
import sample.soapwithattachments.client.SWASampleServiceStub.UploadFileResponse;

public class SWAClient {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try{
            SWASampleServiceStub stub =
                new SWASampleServiceStub
                ("http://localhost:7030/axis2/services/SWASampleService");

            upload(stub);
            
        } catch(Exception e){
            e.printStackTrace();
            System.out.println("\n\n\n");
        }
	}
	
	public static void upload (SWASampleServiceStub stub){
        try{
        	UploadFile param0 = new UploadFile();
        	
        	param0.setName("Bill Shakespeare");
        	param0.setAttchmentID("");
        	
        	//where can I attach the file???
        	
        	UploadFileResponse resp = stub.uploadFile(param0);
        	
        	System.out.println("result= " + resp.get_return());
            
            
        } catch(Exception e){
            e.printStackTrace();
            System.out.println("\n\n\n");
        }
    }

}
