001: /**
002: * ZipCodeResolverSoapStub.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 ZipCodeResolverSoapStub extends
009: org.apache.axis.client.Stub implements
010: docStyle.zipCodeNW.ZipCodeResolverSoap {
011: private java.util.Vector cachedSerClasses = new java.util.Vector();
012: private java.util.Vector cachedSerQNames = new java.util.Vector();
013: private java.util.Vector cachedSerFactories = new java.util.Vector();
014: private java.util.Vector cachedDeserFactories = new java.util.Vector();
015:
016: public ZipCodeResolverSoapStub() throws org.apache.axis.AxisFault {
017: this (null);
018: }
019:
020: public ZipCodeResolverSoapStub(java.net.URL endpointURL,
021: javax.xml.rpc.Service service)
022: throws org.apache.axis.AxisFault {
023: this (service);
024: super .cachedEndpoint = endpointURL;
025: }
026:
027: public ZipCodeResolverSoapStub(javax.xml.rpc.Service service)
028: throws org.apache.axis.AxisFault {
029: if (service == null) {
030: super .service = new org.apache.axis.client.Service();
031: } else {
032: super .service = service;
033: }
034: java.lang.Class cls;
035: javax.xml.namespace.QName qName;
036: java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
037: java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
038: java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
039: java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
040: java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
041: java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
042: java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
043: java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
044: qName = new javax.xml.namespace.QName(
045: "http://webservices.eraserver.net/",
046: ">ShortZipCodeResponse");
047: cachedSerQNames.add(qName);
048: cls = docStyle.zipCodeNW.ShortZipCodeResponse.class;
049: cachedSerClasses.add(cls);
050: cachedSerFactories.add(beansf);
051: cachedDeserFactories.add(beandf);
052:
053: qName = new javax.xml.namespace.QName(
054: "http://webservices.eraserver.net/", ">ShortZipCode");
055: cachedSerQNames.add(qName);
056: cls = docStyle.zipCodeNW.ShortZipCode.class;
057: cachedSerClasses.add(cls);
058: cachedSerFactories.add(beansf);
059: cachedDeserFactories.add(beandf);
060:
061: }
062:
063: private org.apache.axis.client.Call createCall()
064: throws java.rmi.RemoteException {
065: try {
066: org.apache.axis.client.Call _call = (org.apache.axis.client.Call) super .service
067: .createCall();
068: if (super .maintainSessionSet) {
069: _call.setMaintainSession(super .maintainSession);
070: }
071: if (super .cachedUsername != null) {
072: _call.setUsername(super .cachedUsername);
073: }
074: if (super .cachedPassword != null) {
075: _call.setPassword(super .cachedPassword);
076: }
077: if (super .cachedEndpoint != null) {
078: _call.setTargetEndpointAddress(super .cachedEndpoint);
079: }
080: if (super .cachedTimeout != null) {
081: _call.setTimeout(super .cachedTimeout);
082: }
083: if (super .cachedPortName != null) {
084: _call.setPortName(super .cachedPortName);
085: }
086: java.util.Enumeration keys = super .cachedProperties.keys();
087: while (keys.hasMoreElements()) {
088: java.lang.String key = (java.lang.String) keys
089: .nextElement();
090: if (_call.isPropertySupported(key))
091: _call.setProperty(key, super .cachedProperties
092: .get(key));
093: else
094: _call.setScopedProperty(key, super .cachedProperties
095: .get(key));
096: }
097: // All the type mapping information is registered
098: // when the first call is made.
099: // The type mapping information is actually registered in
100: // the TypeMappingRegistry of the service, which
101: // is the reason why registration is only needed for the first call.
102: synchronized (this ) {
103: if (firstCall()) {
104: // must set encoding style before registering serializers
105: _call.setEncodingStyle(null);
106: for (int i = 0; i < cachedSerFactories.size(); ++i) {
107: java.lang.Class cls = (java.lang.Class) cachedSerClasses
108: .get(i);
109: javax.xml.namespace.QName qName = (javax.xml.namespace.QName) cachedSerQNames
110: .get(i);
111: java.lang.Class sf = (java.lang.Class) cachedSerFactories
112: .get(i);
113: java.lang.Class df = (java.lang.Class) cachedDeserFactories
114: .get(i);
115: _call.registerTypeMapping(cls, qName, sf, df,
116: false);
117: }
118: }
119: }
120: return _call;
121: } catch (java.lang.Throwable t) {
122: throw new org.apache.axis.AxisFault(
123: "Failure trying to get the Call object", t);
124: }
125: }
126:
127: public docStyle.zipCodeNW.ShortZipCodeResponse shortZipCode(
128: docStyle.zipCodeNW.ShortZipCode parameters)
129: throws java.rmi.RemoteException {
130: if (super .cachedEndpoint == null) {
131: throw new org.apache.axis.NoEndPointException();
132: }
133: org.apache.axis.client.Call _call = createCall();
134: _call.addParameter(new javax.xml.namespace.QName(
135: "http://webservices.eraserver.net/", "ShortZipCode"),
136: new javax.xml.namespace.QName(
137: "http://webservices.eraserver.net/",
138: ">ShortZipCode"),
139: docStyle.zipCodeNW.ShortZipCode.class,
140: javax.xml.rpc.ParameterMode.IN);
141: _call.setReturnType(new javax.xml.namespace.QName(
142: "http://webservices.eraserver.net/",
143: ">ShortZipCodeResponse"),
144: docStyle.zipCodeNW.ShortZipCodeResponse.class);
145: _call.setUseSOAPAction(true);
146: _call
147: .setSOAPActionURI("http://webservices.eraserver.net/ShortZipCode");
148: _call.setEncodingStyle(null);
149: _call.setScopedProperty(
150: org.apache.axis.client.Call.SEND_TYPE_ATTR,
151: Boolean.FALSE);
152: _call.setScopedProperty(
153: org.apache.axis.AxisEngine.PROP_DOMULTIREFS,
154: Boolean.FALSE);
155: _call.setOperationStyle("document");
156: _call.setOperationName(new javax.xml.namespace.QName(
157: "http://webservices.eraserver.net/", "ShortZipCode"));
158:
159: java.lang.Object _resp = _call
160: .invoke(new java.lang.Object[] { parameters });
161:
162: if (_resp instanceof java.rmi.RemoteException) {
163: throw (java.rmi.RemoteException) _resp;
164: } else {
165: try {
166: return (docStyle.zipCodeNW.ShortZipCodeResponse) _resp;
167: } catch (java.lang.Exception _exception) {
168: return (docStyle.zipCodeNW.ShortZipCodeResponse) org.apache.axis.utils.JavaUtils
169: .convert(
170: _resp,
171: docStyle.zipCodeNW.ShortZipCodeResponse.class);
172: }
173: }
174: }
175:
176: }
|