|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.axis.client.ServiceClient
Allows an Axis service to be invoked from the client side. Contains message and session state which may be reused across multiple invocations on the same ServiceClient.
Field Summary | |
static java.lang.String |
TRANSPORT_PROPERTY
Static stuff |
Constructor Summary | |
ServiceClient()
Basic, no-argument constructor. |
|
ServiceClient(AxisEngine engine)
Construct a ServiceClient with just an AxisEngine. |
|
ServiceClient(java.lang.String endpointURL)
Construct a ServiceClient with a given endpoint URL |
|
ServiceClient(java.lang.String endpointURL,
AxisEngine engine)
Construct a ServiceClient with a given endpoint URL & engine |
|
ServiceClient(Transport transport)
Construct a ServiceClient with the given Transport. |
|
ServiceClient(Transport transport,
AxisEngine engine)
Construct a ServiceClient with the given Transport & engine. |
Method Summary | |
void |
addDeserializerFactory(QName qName,
java.lang.Class _class,
DeserializerFactory deserializerFactory)
Map a type for deserialization. |
void |
addOption(java.lang.String name,
java.lang.Object value)
Set engine option. |
void |
addSerializer(java.lang.Class _class,
QName qName,
Serializer serializer)
Map a type for serialization. |
static void |
addTransportPackage(java.lang.String packageName)
Add a package to the system protocol handler search path. |
java.lang.Object |
get(java.lang.String name)
Get a property from our MessageContext. |
MessageContext |
getMessageContext()
Obtain a reference to our MessageContext. |
Message |
getResponseMessage()
Directly get the response message in our MessageContext. |
int |
getTimeout()
Get timeout from our MessageContext. |
Transport |
getTransportForProtocol(java.lang.String protocol)
Get the Transport registered for the given protocol. |
static void |
initialize()
Set up the default transport URL mappings. |
void |
invoke()
Invoke this ServiceClient with its established MessageContext (perhaps because you called this.setRequestMessage()) |
java.lang.Object |
invoke(RPCElement body)
Invoke an RPC service with a pre-constructed RPCElement. |
SOAPEnvelope |
invoke(SOAPEnvelope env)
Invoke the service with a custom SOAPEnvelope. |
java.lang.Object |
invoke(java.lang.String namespace,
java.lang.String method,
java.lang.Object[] args)
Invoke an RPC service with a method name and arguments. |
void |
set(java.lang.String name,
java.lang.Object value)
Set property in our MessageContext. |
void |
setMaintainSession(boolean yesno)
Determine whether we'd like to track sessions or not. |
void |
setRequestMessage(Message msg)
Directly set the request message in our MessageContext. |
void |
setServiceDescription(ServiceDescription serviceDesc)
Set the ServiceDescription associated with this ServiceClient. |
void |
setTimeout(int value)
Set timeout in our MessageContext. |
void |
setTransport(Transport transport)
Set the Transport for this ServiceClient. |
static void |
setTransportForProtocol(java.lang.String protocol,
Transport transport)
Register a Transport that should be used for URLs of the specified protocol. |
void |
setTransportName(java.lang.String name)
Set the name of the transport chain to use. |
void |
setURL(java.lang.String endpointURL)
Set the URL (and the transport state). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String TRANSPORT_PROPERTY
Constructor Detail |
public ServiceClient()
public ServiceClient(AxisEngine engine)
public ServiceClient(java.lang.String endpointURL)
endpointURL
- a string containing the transport endpoint for this
service.public ServiceClient(java.lang.String endpointURL, AxisEngine engine)
public ServiceClient(Transport transport)
transport
- a pre-constructed Transport object which will be used
to set up the MessageContext appropriately for each
requestpublic ServiceClient(Transport transport, AxisEngine engine)
Method Detail |
public static void setTransportForProtocol(java.lang.String protocol, Transport transport)
protocol
- the URL protocol (i.e. "tcp" for "tcp://" urls)transport
- a Transport object which will be used for matching
URLs.public static void initialize()
public static void addTransportPackage(java.lang.String packageName)
packageName
- the package in which to search for protocol names.public void setTransport(Transport transport)
transport
- the Transport object we'll use to set up
MessageContext properties.public void setURL(java.lang.String endpointURL)
public void setTransportName(java.lang.String name)
public Transport getTransportForProtocol(java.lang.String protocol)
protocol
- a protocol such as "http" or "local" which may
have a Transport object associated with it.public void set(java.lang.String name, java.lang.Object value)
name
- the property name to set.value
- the value of the property.public java.lang.Object get(java.lang.String name)
name
- the property name to retrieve.public void setTimeout(int value)
value
- the maximum amount of time, in millisecondspublic int getTimeout()
public void setRequestMessage(Message msg)
msg
- the new request message.public Message getResponseMessage()
public void setMaintainSession(boolean yesno)
yesno
- true if session state is desired, false if not.public MessageContext getMessageContext()
public void setServiceDescription(ServiceDescription serviceDesc)
serviceDesc
- a ServiceDescription.public void addSerializer(java.lang.Class _class, QName qName, Serializer serializer)
_class
- the Java class of the data type.qName
- the xsi:type QName of the associated XML type.serializer
- a Serializer which will be used to write the XML.public void addDeserializerFactory(QName qName, java.lang.Class _class, DeserializerFactory deserializerFactory)
qName
- the xsi:type QName of an XML Schema type._class
- the class of the associated Java data type.deserializerFactory
- a factory which can create deserializer
instances for this type.public SOAPEnvelope invoke(SOAPEnvelope env) throws AxisFault
env
- a SOAPEnvelope to send.AxisFault
- public java.lang.Object invoke(java.lang.String namespace, java.lang.String method, java.lang.Object[] args) throws AxisFault
namespace
- the desired namespace URI of the method elementmethod
- the method nameargs
- an array of Objects representing the arguments to the
invoked method. If any of these objects are RPCParams,
Axis will use the embedded name of the RPCParam as the
name of the parameter. Otherwise, we will serialize
each argument as an XML element called "argAxisFault
- public java.lang.Object invoke(RPCElement body) throws AxisFault
body
- an RPCElement containing all the information about
this call.AxisFault
- public void addOption(java.lang.String name, java.lang.Object value)
public void invoke() throws AxisFault
AxisFault
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |