KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > docStyle > zipCodeNW > ZipCodeResolverSoapStub


1 /**
2  * ZipCodeResolverSoapStub.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 ZipCodeResolverSoapStub extends org.apache.axis.client.Stub implements docStyle.zipCodeNW.ZipCodeResolverSoap {
11     private java.util.Vector JavaDoc cachedSerClasses = new java.util.Vector JavaDoc();
12     private java.util.Vector JavaDoc cachedSerQNames = new java.util.Vector JavaDoc();
13     private java.util.Vector JavaDoc cachedSerFactories = new java.util.Vector JavaDoc();
14     private java.util.Vector JavaDoc cachedDeserFactories = new java.util.Vector JavaDoc();
15
16     public ZipCodeResolverSoapStub() throws org.apache.axis.AxisFault {
17          this(null);
18     }
19
20     public ZipCodeResolverSoapStub(java.net.URL JavaDoc endpointURL, javax.xml.rpc.Service JavaDoc service) throws org.apache.axis.AxisFault {
21          this(service);
22          super.cachedEndpoint = endpointURL;
23     }
24
25     public ZipCodeResolverSoapStub(javax.xml.rpc.Service JavaDoc service) throws org.apache.axis.AxisFault {
26         if (service == null) {
27             super.service = new org.apache.axis.client.Service();
28         } else {
29             super.service = service;
30         }
31             java.lang.Class JavaDoc cls;
32             javax.xml.namespace.QName JavaDoc qName;
33             java.lang.Class JavaDoc beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
34             java.lang.Class JavaDoc beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
35             java.lang.Class JavaDoc enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
36             java.lang.Class JavaDoc enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
37             java.lang.Class JavaDoc arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
38             java.lang.Class JavaDoc arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
39             java.lang.Class JavaDoc simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
40             java.lang.Class JavaDoc simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
41             qName = new javax.xml.namespace.QName JavaDoc("http://webservices.eraserver.net/", ">ShortZipCodeResponse");
42             cachedSerQNames.add(qName);
43             cls = docStyle.zipCodeNW.ShortZipCodeResponse.class;
44             cachedSerClasses.add(cls);
45             cachedSerFactories.add(beansf);
46             cachedDeserFactories.add(beandf);
47
48             qName = new javax.xml.namespace.QName JavaDoc("http://webservices.eraserver.net/", ">ShortZipCode");
49             cachedSerQNames.add(qName);
50             cls = docStyle.zipCodeNW.ShortZipCode.class;
51             cachedSerClasses.add(cls);
52             cachedSerFactories.add(beansf);
53             cachedDeserFactories.add(beandf);
54
55     }
56
57     private org.apache.axis.client.Call createCall() throws java.rmi.RemoteException JavaDoc {
58         try {
59             org.apache.axis.client.Call _call =
60                     (org.apache.axis.client.Call) super.service.createCall();
61             if (super.maintainSessionSet) {
62                 _call.setMaintainSession(super.maintainSession);
63             }
64             if (super.cachedUsername != null) {
65                 _call.setUsername(super.cachedUsername);
66             }
67             if (super.cachedPassword != null) {
68                 _call.setPassword(super.cachedPassword);
69             }
70             if (super.cachedEndpoint != null) {
71                 _call.setTargetEndpointAddress(super.cachedEndpoint);
72             }
73             if (super.cachedTimeout != null) {
74                 _call.setTimeout(super.cachedTimeout);
75             }
76             if (super.cachedPortName != null) {
77                 _call.setPortName(super.cachedPortName);
78             }
79             java.util.Enumeration JavaDoc keys = super.cachedProperties.keys();
80             while (keys.hasMoreElements()) {
81                 java.lang.String JavaDoc key = (java.lang.String JavaDoc) keys.nextElement();
82                 if(_call.isPropertySupported(key))
83                     _call.setProperty(key, super.cachedProperties.get(key));
84                 else
85                     _call.setScopedProperty(key, super.cachedProperties.get(key));
86             }
87             // All the type mapping information is registered
88
// when the first call is made.
89
// The type mapping information is actually registered in
90
// the TypeMappingRegistry of the service, which
91
// is the reason why registration is only needed for the first call.
92
synchronized (this) {
93                 if (firstCall()) {
94                     // must set encoding style before registering serializers
95
_call.setEncodingStyle(null);
96                     for (int i = 0; i < cachedSerFactories.size(); ++i) {
97                         java.lang.Class JavaDoc cls = (java.lang.Class JavaDoc) cachedSerClasses.get(i);
98                         javax.xml.namespace.QName JavaDoc qName =
99                                 (javax.xml.namespace.QName JavaDoc) cachedSerQNames.get(i);
100                         java.lang.Class JavaDoc sf = (java.lang.Class JavaDoc)
101                                  cachedSerFactories.get(i);
102                         java.lang.Class JavaDoc df = (java.lang.Class JavaDoc)
103                                  cachedDeserFactories.get(i);
104                         _call.registerTypeMapping(cls, qName, sf, df, false);
105                     }
106                 }
107             }
108             return _call;
109         }
110         catch (java.lang.Throwable JavaDoc t) {
111             throw new org.apache.axis.AxisFault("Failure trying to get the Call object", t);
112         }
113     }
114
115     public docStyle.zipCodeNW.ShortZipCodeResponse shortZipCode(docStyle.zipCodeNW.ShortZipCode parameters) throws java.rmi.RemoteException JavaDoc {
116         if (super.cachedEndpoint == null) {
117             throw new org.apache.axis.NoEndPointException();
118         }
119         org.apache.axis.client.Call _call = createCall();
120         _call.addParameter(new javax.xml.namespace.QName JavaDoc("http://webservices.eraserver.net/", "ShortZipCode"), new javax.xml.namespace.QName JavaDoc("http://webservices.eraserver.net/", ">ShortZipCode"), docStyle.zipCodeNW.ShortZipCode.class, javax.xml.rpc.ParameterMode.IN);
121         _call.setReturnType(new javax.xml.namespace.QName JavaDoc("http://webservices.eraserver.net/", ">ShortZipCodeResponse"), docStyle.zipCodeNW.ShortZipCodeResponse.class);
122         _call.setUseSOAPAction(true);
123         _call.setSOAPActionURI("http://webservices.eraserver.net/ShortZipCode");
124         _call.setEncodingStyle(null);
125         _call.setScopedProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
126         _call.setScopedProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
127         _call.setOperationStyle("document");
128         _call.setOperationName(new javax.xml.namespace.QName JavaDoc("http://webservices.eraserver.net/", "ShortZipCode"));
129
130         java.lang.Object JavaDoc _resp = _call.invoke(new java.lang.Object JavaDoc[] {parameters});
131
132         if (_resp instanceof java.rmi.RemoteException JavaDoc) {
133             throw (java.rmi.RemoteException JavaDoc)_resp;
134         }
135         else {
136             try {
137                 return (docStyle.zipCodeNW.ShortZipCodeResponse) _resp;
138             } catch (java.lang.Exception JavaDoc _exception) {
139                 return (docStyle.zipCodeNW.ShortZipCodeResponse) org.apache.axis.utils.JavaUtils.convert(_resp, docStyle.zipCodeNW.ShortZipCodeResponse.class);
140             }
141         }
142     }
143
144 }
145
Popular Tags