WSDL Tutorials - Herong's Tutorial Examples - Version 2.03, by Dr. Herong Yang
org.apache.axis2.rpc.client.RPCServiceClient Class
This section describes the org.apache.axis2.rpc.client.RPCServiceClient class that represents an RPC based Web service client. The invokeBlocking() method can be used to invoke an RPC method based operation without using OMElement objects.
To make invoking an RPC method based Web service easier, Axis2 extends the org.apache.axis2.client.ServiceClient class to a sub class, org.apache.axis2.rpc.client.RPCServiceClient, to offer additional methods for client programming.
1. Creating an RPC method based service client object from an existing WSDL document with this constructor method:
RPCServiceClient client = new RPCServiceClient(null, wsdlURL, serviceQName, portName) // "null" indicates a default ConfigurationContext object to be used // "wsdlURL" specifies a WSDL document using a new URL(wsdlUrlString) // "serviceQName" specifies a service within the WSDL document // using a new QName(tns,serviceName) // "tns" specifies the target namespace of the Web service // "portName" specifies a port within the service using the port name
2. Invoking an RPC method based operation and receiving return values as an OMElement with this invokeBlocking() method:
response = invokeBlocking(operationQName, args) // "operationQName" specifies an operation within the service // using a new QName(tns,operationName) // "tns" specifies the target namespace of the Web service // "args" specifies input parameters as an Object[]. // "response" receives the SOAP Body element in the response message // as an org.apache.axiom.om.OMElement object
3. Invoking an RPC method based operation and receiving return values as an Object[] with this invokeBlocking() method:
returnValues = invokeBlocking(operationQName, args) // "operationQName" specifies an operation within the service // using a new QName(tns,operationName) // "tns" specifies the target namespace of the Web service // "args" specifies input parameters as an Object[]. // "returnValues" receives return values as an Object[].
For other RPCServiceClient methods, see Axis documentation.
Last update: 2009.
Table of Contents
WSDL 2.0 Document Structure and Syntax
WSDL Version 2.0 Part 2: Adjuncts
WSDL 2.0 Document Examples with SOAP Binding
WSDL 20 Programming APIs and Testing Tools
WSDL 1.1 Document Structure and Syntax
WSDL 1.1 Binding Extension for SOAP 1.1
soapUI 3.0.1 - Web Service Testing Tool
WSDL 1.1 and SOAP 1.1 Examples - Document and RPC Styles
PHP SOAP Extension in PHP 5.3.1
Using WSDL in Perl with SOAP::Lite 0.710
►Using WSDL Document in Java with Axis2 1.4.1
Downloading and Installing Axis2/Java 1.4.1
org.apache.axis2.client.ServiceClient Class
Creating Service Client with WSDL Document
org.apache.axis2.client.Options - Operation Client Options
sendReceive() Method - Invoking a Named Operation
Turning Off the Chunked HTTP Flag
Axis2RegistrationClient.java - document/literal Style
Axis2GetSpeechClient.java - document/literal Style
►org.apache.axis2.rpc.client.RPCServiceClient Class
Axis2GetExchangeRateClient.java - rpc/encoded Style
SocketRequestResponseServer.java - Socket Server Testing Program
Capturing the HTTP Request from an Axis2 Client Program
Using WSDL2Java to Generate Web Service Stub Classes
WSDL 1.1 Binding Extension for SOAP 1.2
WSDL 1.1 and SOAP 1.2 Examples - Document and RPC Styles