RpcParamsBindingStubpublic class RpcParamsBindingStub extends org.apache.axis.client.Stub implements RpcParamsTestRpcParamsBindingStub.java
This file was auto-generated from WSDL
by the Apache Axis WSDL2Java emitter. |
Fields Summary |
---|
private Vector | cachedSerClasses | private Vector | cachedSerQNames | private Vector | cachedSerFactories | private Vector | cachedDeserFactories |
Constructors Summary |
---|
public RpcParamsBindingStub()
this(null);
| public RpcParamsBindingStub(URL endpointURL, javax.xml.rpc.Service service)
this(service);
super.cachedEndpoint = endpointURL;
| public RpcParamsBindingStub(javax.xml.rpc.Service service)
if (service == null) {
super.service = new org.apache.axis.client.Service();
} else {
super.service = service;
}
Class cls;
QName qName;
Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
qName = new QName("urn:rpcParams.wsdl.test", "EchoStruct");
cachedSerQNames.add(qName);
cls = EchoStruct.class;
cachedSerClasses.add(cls);
cachedSerFactories.add(beansf);
cachedDeserFactories.add(beandf);
|
Methods Summary |
---|
private org.apache.axis.client.Call | createCall()
try {
org.apache.axis.client.Call _call =
(org.apache.axis.client.Call) super.service.createCall();
if (super.maintainSessionSet) {
_call.setMaintainSession(super.maintainSession);
}
if (super.cachedUsername != null) {
_call.setUsername(super.cachedUsername);
}
if (super.cachedPassword != null) {
_call.setPassword(super.cachedPassword);
}
if (super.cachedEndpoint != null) {
_call.setTargetEndpointAddress(super.cachedEndpoint);
}
if (super.cachedTimeout != null) {
_call.setTimeout(super.cachedTimeout);
}
if (super.cachedPortName != null) {
_call.setPortName(super.cachedPortName);
}
Enumeration keys = super.cachedProperties.keys();
while (keys.hasMoreElements()) {
String key = (String) keys.nextElement();
_call.setProperty(key, super.cachedProperties.get(key));
}
// All the type mapping information is registered
// when the first call is made.
// The type mapping information is actually registered in
// the TypeMappingRegistry of the service, which
// is the reason why registration is only needed for the first call.
synchronized (this) {
if (firstCall()) {
// must set encoding style before registering serializers
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
for (int i = 0; i < cachedSerFactories.size(); ++i) {
Class cls = (Class) cachedSerClasses.get(i);
QName qName =
(QName) cachedSerQNames.get(i);
Class sf = (Class)
cachedSerFactories.get(i);
Class df = (Class)
cachedDeserFactories.get(i);
_call.registerTypeMapping(cls, qName, sf, df, false);
}
}
}
return _call;
}
catch (Throwable t) {
throw new org.apache.axis.AxisFault("Failure trying to get the Call object", t);
}
| public EchoStruct | echo(java.lang.String first, java.lang.String second)Send the given request to the server, ommitting any null parameters.
EchoStruct result;
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
// create the operation... omit any null parameters
OperationDesc operation = new OperationDesc();
operation.setName("echo");
if (first != null)
operation.addParameter(new QName("", "first"), new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, ParameterDesc.IN, false, false);
if (second != null)
operation.addParameter(new QName("", "second"), new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, ParameterDesc.IN, false, false);
operation.setReturnType(new QName("urn:rpcParams.wsdl.test", "EchoStruct"));
operation.setReturnClass(EchoStruct.class);
operation.setReturnQName(new QName("", "echoReturn"));
operation.setStyle(org.apache.axis.constants.Style.RPC);
operation.setUse(org.apache.axis.constants.Use.ENCODED);
org.apache.axis.client.Call _call = createCall();
_call.setOperation(operation);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new QName("urn:rpcParams.wsdl.test", "echo"));
setRequestHeaders(_call);
setAttachments(_call);
// add the params we're actually going to send, again ommitting nulls
List params = new ArrayList(2);
if (first != null)
params.add(first);
if (second != null)
params.add(second);
Object _resp = _call.invoke(params.toArray());
if (_resp instanceof RemoteException) {
throw (RemoteException)_resp;
}
else {
getResponseHeaders(_call);
extractAttachments(_call);
try {
result = (EchoStruct) _resp;
} catch (Exception _exception) {
result = (EchoStruct) org.apache.axis.utils.JavaUtils.convert(_resp, EchoStruct.class);
}
}
return result;
| public EchoStruct | echoReverse(java.lang.String first, java.lang.String second)The same as echo, but reverse the order of parameters we send.
EchoStruct result;
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
// create the operation... omit any null parameters
OperationDesc operation = new OperationDesc();
operation.setName("echo");
if (second != null)
operation.addParameter(new QName("", "second"), new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, ParameterDesc.IN, false, false);
if (first != null)
operation.addParameter(new QName("", "first"), new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, ParameterDesc.IN, false, false);
operation.setReturnType(new QName("urn:rpcParams.wsdl.test", "EchoStruct"));
operation.setReturnClass(EchoStruct.class);
operation.setReturnQName(new QName("", "echoReturn"));
operation.setStyle(org.apache.axis.constants.Style.RPC);
operation.setUse(org.apache.axis.constants.Use.ENCODED);
org.apache.axis.client.Call _call = createCall();
_call.setOperation(operation);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new QName("urn:rpcParams.wsdl.test", "echo"));
setRequestHeaders(_call);
setAttachments(_call);
// add the params we're actually going to send, again ommitting nulls
List params = new ArrayList(2);
if (second != null)
params.add(second);
if (first != null)
params.add(first);
Object _resp = _call.invoke(params.toArray());
if (_resp instanceof RemoteException) {
throw (RemoteException)_resp;
}
else {
getResponseHeaders(_call);
extractAttachments(_call);
try {
result = (EchoStruct) _resp;
} catch (Exception _exception) {
result = (EchoStruct) org.apache.axis.utils.JavaUtils.convert(_resp, EchoStruct.class);
}
}
return result;
|
|