View Javadoc

1   /***
2    * SamplePortTypeSoapBindingStub.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis WSDL2Java emitter.
6    */
7   
8   package org.astrogrid.security.sample;
9   
10  public class SamplePortTypeSoapBindingStub extends org.apache.axis.client.Stub implements org.astrogrid.security.sample.SamplePortType {
11      private java.util.Vector cachedSerClasses = new java.util.Vector();
12      private java.util.Vector cachedSerQNames = new java.util.Vector();
13      private java.util.Vector cachedSerFactories = new java.util.Vector();
14      private java.util.Vector cachedDeserFactories = new java.util.Vector();
15  
16      static org.apache.axis.description.OperationDesc [] _operations;
17  
18      static {
19          _operations = new org.apache.axis.description.OperationDesc[1];
20          org.apache.axis.description.OperationDesc oper;
21          oper = new org.apache.axis.description.OperationDesc();
22          oper.setName("whoAmI");
23          oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
24          oper.setReturnClass(java.lang.String.class);
25          oper.setReturnQName(new javax.xml.namespace.QName("", "whoAmIReturn"));
26          oper.setStyle(org.apache.axis.enum.Style.RPC);
27          oper.setUse(org.apache.axis.enum.Use.ENCODED);
28          _operations[0] = oper;
29  
30      }
31  
32      public SamplePortTypeSoapBindingStub() throws org.apache.axis.AxisFault {
33           this(null);
34      }
35  
36      public SamplePortTypeSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
37           this(service);
38           super.cachedEndpoint = endpointURL;
39      }
40  
41      public SamplePortTypeSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
42          if (service == null) {
43              super.service = new org.apache.axis.client.Service();
44          } else {
45              super.service = service;
46          }
47      }
48  
49      private org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
50          try {
51              org.apache.axis.client.Call _call =
52                      (org.apache.axis.client.Call) super.service.createCall();
53              if (super.maintainSessionSet) {
54                  _call.setMaintainSession(super.maintainSession);
55              }
56              if (super.cachedUsername != null) {
57                  _call.setUsername(super.cachedUsername);
58              }
59              if (super.cachedPassword != null) {
60                  _call.setPassword(super.cachedPassword);
61              }
62              if (super.cachedEndpoint != null) {
63                  _call.setTargetEndpointAddress(super.cachedEndpoint);
64              }
65              if (super.cachedTimeout != null) {
66                  _call.setTimeout(super.cachedTimeout);
67              }
68              if (super.cachedPortName != null) {
69                  _call.setPortName(super.cachedPortName);
70              }
71              java.util.Enumeration keys = super.cachedProperties.keys();
72              while (keys.hasMoreElements()) {
73                  java.lang.String key = (java.lang.String) keys.nextElement();
74                  _call.setProperty(key, super.cachedProperties.get(key));
75              }
76              return _call;
77          }
78          catch (java.lang.Throwable t) {
79              throw new org.apache.axis.AxisFault("Failure trying to get the Call object", t);
80          }
81      }
82  
83      public java.lang.String whoAmI() throws java.rmi.RemoteException {
84          if (super.cachedEndpoint == null) {
85              throw new org.apache.axis.NoEndPointException();
86          }
87          org.apache.axis.client.Call _call = createCall();
88          _call.setOperation(_operations[0]);
89          _call.setUseSOAPAction(true);
90          _call.setSOAPActionURI("");
91          _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
92          _call.setOperationName(new javax.xml.namespace.QName("http://sample.security.astrogrid.org", "whoAmI"));
93  
94          setRequestHeaders(_call);
95          setAttachments(_call);
96          java.lang.Object _resp = _call.invoke(new java.lang.Object[] {});
97  
98          if (_resp instanceof java.rmi.RemoteException) {
99              throw (java.rmi.RemoteException)_resp;
100         }
101         else {
102             extractAttachments(_call);
103             try {
104                 return (java.lang.String) _resp;
105             } catch (java.lang.Exception _exception) {
106                 return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);
107             }
108         }
109     }
110 
111 }