KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > docStyle > zipCodeNW > ZipCodeResolverLocator


1 /**
2  * ZipCodeResolverLocator.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis WSDL2Java emitter.
6  */

7
8 package docStyle.zipCodeNW;
9
10 public class ZipCodeResolverLocator extends org.apache.axis.client.Service implements docStyle.zipCodeNW.ZipCodeResolver {
11
12     /**
13      * Given a valid street address, city, and state, this service returns
14      * the proper ZIP code, ZIP code+4, or USPS corrected address. NOTE:
15      * This service is meant for non-commercial, personal use only.
16      */

17
18     // Use to get a proxy class for ZipCodeResolverSoap
19
private final java.lang.String JavaDoc ZipCodeResolverSoap_address = "http://webservices.eraserver.net/zipcoderesolver/zipcoderesolver.asmx";
20 // private final java.lang.String ZipCodeResolverSoap_address = "http://localhost:8080/soap/servlet/rpcrouter";
21

22     public java.lang.String JavaDoc getZipCodeResolverSoapAddress() {
23         return ZipCodeResolverSoap_address;
24     }
25
26     // The WSDD service name defaults to the port name.
27
private java.lang.String JavaDoc ZipCodeResolverSoapWSDDServiceName = "ZipCodeResolverSoap";
28
29     public java.lang.String JavaDoc getZipCodeResolverSoapWSDDServiceName() {
30         return ZipCodeResolverSoapWSDDServiceName;
31     }
32
33     public void setZipCodeResolverSoapWSDDServiceName(java.lang.String JavaDoc name) {
34         ZipCodeResolverSoapWSDDServiceName = name;
35     }
36
37     public docStyle.zipCodeNW.ZipCodeResolverSoap getZipCodeResolverSoap() throws javax.xml.rpc.ServiceException JavaDoc {
38        java.net.URL JavaDoc endpoint;
39         try {
40             endpoint = new java.net.URL JavaDoc(ZipCodeResolverSoap_address);
41         }
42         catch (java.net.MalformedURLException JavaDoc e) {
43             return null; // unlikely as URL was validated in WSDL2Java
44
}
45         return getZipCodeResolverSoap(endpoint);
46     }
47
48     public docStyle.zipCodeNW.ZipCodeResolverSoap getZipCodeResolverSoap(java.net.URL JavaDoc portAddress) throws javax.xml.rpc.ServiceException JavaDoc {
49         try {
50             docStyle.zipCodeNW.ZipCodeResolverSoapStub _stub = new docStyle.zipCodeNW.ZipCodeResolverSoapStub(portAddress, this);
51             _stub.setPortName(getZipCodeResolverSoapWSDDServiceName());
52             return _stub;
53         }
54         catch (org.apache.axis.AxisFault e) {
55             return null;
56         }
57     }
58
59     /**
60      * For the given interface, get the stub implementation.
61      * If this service has no port for the given interface,
62      * then ServiceException is thrown.
63      */

64     public java.rmi.Remote JavaDoc getPort(Class JavaDoc serviceEndpointInterface) throws javax.xml.rpc.ServiceException JavaDoc {
65         try {
66             if (docStyle.zipCodeNW.ZipCodeResolverSoap.class.isAssignableFrom(serviceEndpointInterface)) {
67                 docStyle.zipCodeNW.ZipCodeResolverSoapStub _stub = new docStyle.zipCodeNW.ZipCodeResolverSoapStub(new java.net.URL JavaDoc(ZipCodeResolverSoap_address), this);
68                 _stub.setPortName(getZipCodeResolverSoapWSDDServiceName());
69                 return _stub;
70             }
71         }
72         catch (java.lang.Throwable JavaDoc t) {
73             throw new javax.xml.rpc.ServiceException JavaDoc(t);
74         }
75         throw new javax.xml.rpc.ServiceException JavaDoc("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
76     }
77
78     /**
79      * For the given interface, get the stub implementation.
80      * If this service has no port for the given interface,
81      * then ServiceException is thrown.
82      */

83     public java.rmi.Remote JavaDoc getPort(javax.xml.namespace.QName JavaDoc portName, Class JavaDoc serviceEndpointInterface) throws javax.xml.rpc.ServiceException JavaDoc {
84         java.rmi.Remote JavaDoc _stub = getPort(serviceEndpointInterface);
85         ((org.apache.axis.client.Stub) _stub).setPortName(portName);
86         return _stub;
87     }
88
89     public javax.xml.namespace.QName JavaDoc getServiceName() {
90         return new javax.xml.namespace.QName JavaDoc("http://webservices.eraserver.net/", "ZipCodeResolver");
91     }
92
93     private java.util.HashSet JavaDoc ports = null;
94
95     public java.util.Iterator JavaDoc getPorts() {
96         if (ports == null) {
97             ports = new java.util.HashSet JavaDoc();
98             ports.add(new javax.xml.namespace.QName JavaDoc("ZipCodeResolverSoap"));
99         }
100         return ports.iterator();
101     }
102
103 }
104
Popular Tags