001: /**
002: * ZipCodeResolverLocator.java
003: *
004: * This file was auto-generated from WSDL
005: * by the Apache Axis WSDL2Java emitter.
006: */package docStyle.zipCodeNW;
007:
008: public class ZipCodeResolverLocator extends
009: org.apache.axis.client.Service implements
010: docStyle.zipCodeNW.ZipCodeResolver {
011:
012: /**
013: * Given a valid street address, city, and state, this service returns
014: * the proper ZIP code, ZIP code+4, or USPS corrected address. NOTE:
015: * This service is meant for non-commercial, personal use only.
016: */
017:
018: // Use to get a proxy class for ZipCodeResolverSoap
019: private final java.lang.String ZipCodeResolverSoap_address = "http://webservices.eraserver.net/zipcoderesolver/zipcoderesolver.asmx";
020:
021: // private final java.lang.String ZipCodeResolverSoap_address = "http://localhost:8080/soap/servlet/rpcrouter";
022:
023: public java.lang.String getZipCodeResolverSoapAddress() {
024: return ZipCodeResolverSoap_address;
025: }
026:
027: // The WSDD service name defaults to the port name.
028: private java.lang.String ZipCodeResolverSoapWSDDServiceName = "ZipCodeResolverSoap";
029:
030: public java.lang.String getZipCodeResolverSoapWSDDServiceName() {
031: return ZipCodeResolverSoapWSDDServiceName;
032: }
033:
034: public void setZipCodeResolverSoapWSDDServiceName(
035: java.lang.String name) {
036: ZipCodeResolverSoapWSDDServiceName = name;
037: }
038:
039: public docStyle.zipCodeNW.ZipCodeResolverSoap getZipCodeResolverSoap()
040: throws javax.xml.rpc.ServiceException {
041: java.net.URL endpoint;
042: try {
043: endpoint = new java.net.URL(ZipCodeResolverSoap_address);
044: } catch (java.net.MalformedURLException e) {
045: return null; // unlikely as URL was validated in WSDL2Java
046: }
047: return getZipCodeResolverSoap(endpoint);
048: }
049:
050: public docStyle.zipCodeNW.ZipCodeResolverSoap getZipCodeResolverSoap(
051: java.net.URL portAddress)
052: throws javax.xml.rpc.ServiceException {
053: try {
054: docStyle.zipCodeNW.ZipCodeResolverSoapStub _stub = new docStyle.zipCodeNW.ZipCodeResolverSoapStub(
055: portAddress, this );
056: _stub.setPortName(getZipCodeResolverSoapWSDDServiceName());
057: return _stub;
058: } catch (org.apache.axis.AxisFault e) {
059: return null;
060: }
061: }
062:
063: /**
064: * For the given interface, get the stub implementation.
065: * If this service has no port for the given interface,
066: * then ServiceException is thrown.
067: */
068: public java.rmi.Remote getPort(Class serviceEndpointInterface)
069: throws javax.xml.rpc.ServiceException {
070: try {
071: if (docStyle.zipCodeNW.ZipCodeResolverSoap.class
072: .isAssignableFrom(serviceEndpointInterface)) {
073: docStyle.zipCodeNW.ZipCodeResolverSoapStub _stub = new docStyle.zipCodeNW.ZipCodeResolverSoapStub(
074: new java.net.URL(ZipCodeResolverSoap_address),
075: this );
076: _stub
077: .setPortName(getZipCodeResolverSoapWSDDServiceName());
078: return _stub;
079: }
080: } catch (java.lang.Throwable t) {
081: throw new javax.xml.rpc.ServiceException(t);
082: }
083: throw new javax.xml.rpc.ServiceException(
084: "There is no stub implementation for the interface: "
085: + (serviceEndpointInterface == null ? "null"
086: : serviceEndpointInterface.getName()));
087: }
088:
089: /**
090: * For the given interface, get the stub implementation.
091: * If this service has no port for the given interface,
092: * then ServiceException is thrown.
093: */
094: public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
095: Class serviceEndpointInterface)
096: throws javax.xml.rpc.ServiceException {
097: java.rmi.Remote _stub = getPort(serviceEndpointInterface);
098: ((org.apache.axis.client.Stub) _stub).setPortName(portName);
099: return _stub;
100: }
101:
102: public javax.xml.namespace.QName getServiceName() {
103: return new javax.xml.namespace.QName(
104: "http://webservices.eraserver.net/", "ZipCodeResolver");
105: }
106:
107: private java.util.HashSet ports = null;
108:
109: public java.util.Iterator getPorts() {
110: if (ports == null) {
111: ports = new java.util.HashSet();
112: ports.add(new javax.xml.namespace.QName(
113: "ZipCodeResolverSoap"));
114: }
115: return ports.iterator();
116: }
117:
118: }
|