1 7 8 package org.alfresco.example.webservice.authentication; 9 10 public class AuthenticationServiceSoapBindingStub extends org.apache.axis.client.Stub implements org.alfresco.example.webservice.authentication.AuthenticationServiceSoapPort { 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 _initOperationDesc1(); 21 } 22 23 private static void _initOperationDesc1(){ 24 org.apache.axis.description.OperationDesc oper; 25 org.apache.axis.description.ParameterDesc param; 26 oper = new org.apache.axis.description.OperationDesc(); 27 oper.setName("authenticate"); 28 param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName ("http://www.alfresco.org/ws/service/authentication/1.0", "username"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName ("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String .class, false, false); 29 oper.addParameter(param); 30 param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName ("http://www.alfresco.org/ws/service/authentication/1.0", "password"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName ("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String .class, false, false); 31 oper.addParameter(param); 32 oper.setReturnType(new javax.xml.namespace.QName ("http://www.alfresco.org/ws/service/authentication/1.0", "AuthenticationResult")); 33 oper.setReturnClass(org.alfresco.example.webservice.authentication.AuthenticationResult.class); 34 oper.setReturnQName(new javax.xml.namespace.QName ("http://www.alfresco.org/ws/service/authentication/1.0", "authenticateReturn")); 35 oper.setStyle(org.apache.axis.constants.Style.WRAPPED); 36 oper.setUse(org.apache.axis.constants.Use.LITERAL); 37 oper.addFault(new org.apache.axis.description.FaultDesc( 38 new javax.xml.namespace.QName ("http://www.alfresco.org/ws/service/authentication/1.0", "AuthenticationFault"), 39 "org.alfresco.example.webservice.authentication.AuthenticationFault", 40 new javax.xml.namespace.QName ("http://www.alfresco.org/ws/service/authentication/1.0", "AuthenticationFault"), 41 true 42 )); 43 _operations[0] = oper; 44 45 } 46 47 public AuthenticationServiceSoapBindingStub() throws org.apache.axis.AxisFault { 48 this(null); 49 } 50 51 public AuthenticationServiceSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 52 this(service); 53 super.cachedEndpoint = endpointURL; 54 } 55 56 public AuthenticationServiceSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 57 if (service == null) { 58 super.service = new org.apache.axis.client.Service(); 59 } else { 60 super.service = service; 61 } 62 ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2"); 63 java.lang.Class cls; 64 javax.xml.namespace.QName qName; 65 javax.xml.namespace.QName qName2; 66 java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class; 67 java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class; 68 java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; 69 java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class; 70 java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class; 71 java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class; 72 java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class; 73 java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; 74 java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class; 75 java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class; 76 qName = new javax.xml.namespace.QName ("http://www.alfresco.org/ws/service/authentication/1.0", "AuthenticationFault"); 77 cachedSerQNames.add(qName); 78 cls = org.alfresco.example.webservice.authentication.AuthenticationFault.class; 79 cachedSerClasses.add(cls); 80 cachedSerFactories.add(beansf); 81 cachedDeserFactories.add(beandf); 82 83 qName = new javax.xml.namespace.QName ("http://www.alfresco.org/ws/service/authentication/1.0", "AuthenticationResult"); 84 cachedSerQNames.add(qName); 85 cls = org.alfresco.example.webservice.authentication.AuthenticationResult.class; 86 cachedSerClasses.add(cls); 87 cachedSerFactories.add(beansf); 88 cachedDeserFactories.add(beandf); 89 90 } 91 92 protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { 93 try { 94 org.apache.axis.client.Call _call = super._createCall(); 95 if (super.maintainSessionSet) { 96 _call.setMaintainSession(super.maintainSession); 97 } 98 if (super.cachedUsername != null) { 99 _call.setUsername(super.cachedUsername); 100 } 101 if (super.cachedPassword != null) { 102 _call.setPassword(super.cachedPassword); 103 } 104 if (super.cachedEndpoint != null) { 105 _call.setTargetEndpointAddress(super.cachedEndpoint); 106 } 107 if (super.cachedTimeout != null) { 108 _call.setTimeout(super.cachedTimeout); 109 } 110 if (super.cachedPortName != null) { 111 _call.setPortName(super.cachedPortName); 112 } 113 java.util.Enumeration keys = super.cachedProperties.keys(); 114 while (keys.hasMoreElements()) { 115 java.lang.String key = (java.lang.String ) keys.nextElement(); 116 _call.setProperty(key, super.cachedProperties.get(key)); 117 } 118 synchronized (this) { 124 if (firstCall()) { 125 _call.setEncodingStyle(null); 127 for (int i = 0; i < cachedSerFactories.size(); ++i) { 128 java.lang.Class cls = (java.lang.Class ) cachedSerClasses.get(i); 129 javax.xml.namespace.QName qName = 130 (javax.xml.namespace.QName ) cachedSerQNames.get(i); 131 java.lang.Object x = cachedSerFactories.get(i); 132 if (x instanceof Class ) { 133 java.lang.Class sf = (java.lang.Class ) 134 cachedSerFactories.get(i); 135 java.lang.Class df = (java.lang.Class ) 136 cachedDeserFactories.get(i); 137 _call.registerTypeMapping(cls, qName, sf, df, false); 138 } 139 else if (x instanceof javax.xml.rpc.encoding.SerializerFactory ) { 140 org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory) 141 cachedSerFactories.get(i); 142 org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory) 143 cachedDeserFactories.get(i); 144 _call.registerTypeMapping(cls, qName, sf, df, false); 145 } 146 } 147 } 148 } 149 return _call; 150 } 151 catch (java.lang.Throwable _t) { 152 throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t); 153 } 154 } 155 156 public org.alfresco.example.webservice.authentication.AuthenticationResult authenticate(java.lang.String username, java.lang.String password) throws java.rmi.RemoteException , org.alfresco.example.webservice.authentication.AuthenticationFault { 157 if (super.cachedEndpoint == null) { 158 throw new org.apache.axis.NoEndPointException(); 159 } 160 org.apache.axis.client.Call _call = createCall(); 161 _call.setOperation(_operations[0]); 162 _call.setUseSOAPAction(true); 163 _call.setSOAPActionURI("http://www.alfresco.org/ws/service/authentication/1.0/authenticate"); 164 _call.setEncodingStyle(null); 165 _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); 166 _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); 167 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 168 _call.setOperationName(new javax.xml.namespace.QName ("http://www.alfresco.org/ws/service/authentication/1.0", "authenticate")); 169 170 setRequestHeaders(_call); 171 setAttachments(_call); 172 try { java.lang.Object _resp = _call.invoke(new java.lang.Object [] {username, password}); 173 174 if (_resp instanceof java.rmi.RemoteException ) { 175 throw (java.rmi.RemoteException )_resp; 176 } 177 else { 178 extractAttachments(_call); 179 try { 180 return (org.alfresco.example.webservice.authentication.AuthenticationResult) _resp; 181 } catch (java.lang.Exception _exception) { 182 return (org.alfresco.example.webservice.authentication.AuthenticationResult) org.apache.axis.utils.JavaUtils.convert(_resp, org.alfresco.example.webservice.authentication.AuthenticationResult.class); 183 } 184 } 185 } catch (org.apache.axis.AxisFault axisFaultException) { 186 if (axisFaultException.detail != null) { 187 if (axisFaultException.detail instanceof java.rmi.RemoteException ) { 188 throw (java.rmi.RemoteException ) axisFaultException.detail; 189 } 190 if (axisFaultException.detail instanceof org.alfresco.example.webservice.authentication.AuthenticationFault) { 191 throw (org.alfresco.example.webservice.authentication.AuthenticationFault) axisFaultException.detail; 192 } 193 } 194 throw axisFaultException; 195 } 196 } 197 198 } 199 | Popular Tags |