1 package samples.jaxrpc.address; 2 3 import javax.xml.namespace.QName ; 4 import javax.xml.rpc.Service ; 5 import javax.xml.rpc.ServiceFactory ; 6 import java.net.URL ; 7 8 public class AddressClient { 9 public static void main(String [] args) throws Exception { 10 URL urlWsdl = new URL ("http://localhost:8080/axis/services/Address?wsdl"); 11 String nameSpaceUri = "http://address.jaxrpc.samples"; 12 String serviceName = "AddressServiceService"; 13 String portName = "Address"; 14 15 ServiceFactory serviceFactory = ServiceFactory.newInstance(); 16 Service service = serviceFactory.createService(urlWsdl, new 17 QName (nameSpaceUri, serviceName)); 18 AddressService myProxy = (AddressService) service.getPort(new 19 QName (nameSpaceUri, portName), AddressService.class); 20 AddressBean addressBean = new AddressBean(); 21 addressBean.setStreet("55, rue des Lilas"); 22 System.out.println(myProxy.updateAddress(addressBean, 75005)); 23 } 24 } | Popular Tags |