1 7 8 package phoneList.business.axis; 9 10 public class PhoneListServiceLocator extends org.apache.axis.client.Service implements phoneList.business.axis.PhoneListService { 11 12 private java.lang.String PhoneBook_address = "http://localhost:9000/phoneBook/PhoneBook"; 14 15 public java.lang.String getPhoneBookAddress() { 16 return PhoneBook_address; 17 } 18 19 private java.lang.String PhoneBookWSDDServiceName = "PhoneBook"; 21 22 public java.lang.String getPhoneBookWSDDServiceName() { 23 return PhoneBookWSDDServiceName; 24 } 25 26 public void setPhoneBookWSDDServiceName(java.lang.String name) { 27 PhoneBookWSDDServiceName = name; 28 } 29 30 public phoneList.business.axis.PhoneList getPhoneBook() throws javax.xml.rpc.ServiceException { 31 java.net.URL endpoint; 32 try { 33 endpoint = new java.net.URL (PhoneBook_address); 34 } 35 catch (java.net.MalformedURLException e) { 36 throw new javax.xml.rpc.ServiceException (e); 37 } 38 return getPhoneBook(endpoint); 39 } 40 41 public phoneList.business.axis.PhoneList getPhoneBook(java.net.URL portAddress) throws javax.xml.rpc.ServiceException { 42 try { 43 phoneList.business.axis.PhoneBookSoapBindingStub _stub = new phoneList.business.axis.PhoneBookSoapBindingStub(portAddress, this); 44 _stub.setPortName(getPhoneBookWSDDServiceName()); 45 return _stub; 46 } 47 catch (org.apache.axis.AxisFault e) { 48 return null; 49 } 50 } 51 52 public void setPhoneBookEndpointAddress(java.lang.String address) { 53 PhoneBook_address = address; 54 } 55 56 61 public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { 62 try { 63 if (phoneList.business.axis.PhoneList.class.isAssignableFrom(serviceEndpointInterface)) { 64 phoneList.business.axis.PhoneBookSoapBindingStub _stub = new phoneList.business.axis.PhoneBookSoapBindingStub(new java.net.URL (PhoneBook_address), this); 65 _stub.setPortName(getPhoneBookWSDDServiceName()); 66 return _stub; 67 } 68 } 69 catch (java.lang.Throwable t) { 70 throw new javax.xml.rpc.ServiceException (t); 71 } 72 throw new javax.xml.rpc.ServiceException ("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName())); 73 } 74 75 80 public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { 81 if (portName == null) { 82 return getPort(serviceEndpointInterface); 83 } 84 String inputPortName = portName.getLocalPart(); 85 if ("PhoneBook".equals(inputPortName)) { 86 return getPhoneBook(); 87 } 88 else { 89 java.rmi.Remote _stub = getPort(serviceEndpointInterface); 90 ((org.apache.axis.client.Stub) _stub).setPortName(portName); 91 return _stub; 92 } 93 } 94 95 public javax.xml.namespace.QName getServiceName() { 96 return new javax.xml.namespace.QName ("urn:phoneBook", "PhoneListService"); 97 } 98 99 private java.util.HashSet ports = null; 100 101 public java.util.Iterator getPorts() { 102 if (ports == null) { 103 ports = new java.util.HashSet (); 104 ports.add(new javax.xml.namespace.QName ("PhoneBook")); 105 } 106 return ports.iterator(); 107 } 108 109 112 public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { 113 if ("PhoneBook".equals(portName)) { 114 setPhoneBookEndpointAddress(address); 115 } 116 else { throw new javax.xml.rpc.ServiceException (" Cannot set Endpoint Address for Unknown Port" + portName); 118 } 119 } 120 121 124 public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException { 125 setEndpointAddress(portName.getLocalPart(), address); 126 } 127 128 } 129 | Popular Tags |