private static String URL = "http://127.0.0.1:8080/axis2/services/AddressBookService";
public static void main(String[] args) {
try {
AddressBookServiceStub stub;
if (args != null && args.length != 0) {
stub = new AddressBookServiceStub(args[0]);
} else {
stub = new AddressBookServiceStub(URL);
}
AddressBookServiceStub.AddEntry addEntry = new AddressBookServiceStub.AddEntry();
AddressBookServiceStub.Entry entry = new AddressBookServiceStub.Entry();
entry.setName("Abby Cadabby");
entry.setStreet("Sesame Street");
entry.setCity("Sesame City");
entry.setState("Sesame State");
entry.setPostalCode("11111");
addEntry.setParam0(entry);
stub.addEntry(addEntry);
AddressBookServiceStub.FindEntry findEntry = new AddressBookServiceStub.FindEntry();
findEntry.setParam0("Abby Cadabby");
AddressBookServiceStub.FindEntryResponse response = stub.findEntry(findEntry);
AddressBookServiceStub.Entry responseEntry = response.get_return();
System.out.println("Name :" + responseEntry.getName());
System.out.println("Street :" + responseEntry.getStreet());
System.out.println("City :" + responseEntry.getCity());