|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.axis.client.Call
Axis' JAXRPC Dynamic Invocation Interface implementation of the Call interface. This class should be used to actually invoke the Web Service. It can be prefilled by a WSDL document (on the constructor to the Service object) or you can fill in the data yourself.
Properties: NAMESPACE - Namespace URI of RPC Body SEND_TYPE_ATTR - Should we send the XSI type attributes (true/false) TIMEOUT - Timeout used by transport sender in seconds TRANSPORT_NAME - Name of transport handler to use
Field Summary | |
protected java.util.Vector |
attachmentParts
|
static java.lang.String |
NAMESPACE
|
static java.lang.String |
SEND_TYPE_ATTR
|
static java.lang.String |
TIMEOUT
|
static java.lang.String |
TRANSPORT_NAME
|
static java.lang.String |
TRANSPORT_PROPERTY
|
Fields inherited from interface javax.xml.rpc.Call |
PARAM_MODE_IN, PARAM_MODE_INOUT, PARAM_MODE_OUT |
Constructor Summary | |
Call(Service service)
Default constructor - not much else to say. |
|
Call(java.lang.String url)
Build a call from a URL string |
|
Call(java.net.URL url)
Build a call from a URL |
Method Summary | |
void |
addAttachmentPart(java.lang.Object attachment)
This method adds an attachment. |
void |
addDeserializerFactory(QName qName,
java.lang.Class _class,
DeserializerFactory deserFactory)
Map a type for deserialization. |
void |
addHeader(SOAPHeader header)
Add a header which should be inserted into each outgoing message we generate. |
void |
addOption(java.lang.String name,
java.lang.Object value)
Deprecated. replaced with setOption() |
void |
addParameter(java.lang.String paramName,
XMLType paramType,
int parameterMode)
Adds the specified parameter to the list of parameters for the operation associated with this Call object. |
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. |
void |
clearHeaders()
Clear the list of headers which we insert into each message Note: Not part of JAX-RPC specification. |
java.lang.String |
getEncodingStyle()
Returns the encoding style as a URI that should be used for the SOAP message. |
MessageContext |
getMessageContext()
Obtain a reference to our MessageContext. |
java.lang.String |
getOperationName()
Returns the operation name associated with this Call object. |
java.util.Vector |
getOutputParams()
Get the output parameters (if any) from the last invocation. |
XMLType |
getParameterTypeByName(java.lang.String paramName)
Return the XMLType of the parameters with the given name. |
QName |
getPortTypeName()
Returns the fully qualified name of the port for this Call object (if there is one). |
java.lang.Object |
getProperty(java.lang.String name)
Returns the value associated with the named property - or null if not defined/set. |
Message |
getResponseMessage()
Directly get the response message in our MessageContext. |
XMLType |
getReturnType()
Returns the XMLType of the return value of this Call - or null if not set. |
Service |
getService()
Get the Service object associated with this Call object. |
java.net.URL |
getTargetEndpointAddress()
Returns the URL of the target Web Service. |
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 Call with its established MessageContext (perhaps because you called this.setRequestMessage()) Note: Not part of JAX-RPC specification. |
java.lang.Object |
invoke(java.lang.Object[] params)
Invokes the operation associated with this Call object using the passed in parameters as the arguments to the method. |
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 method,
java.lang.Object[] args)
Convenience method to invoke a method with a default (empty) namespace. |
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 |
invokeOneWay(java.lang.Object[] params)
Invokes the operation associated with this Call object using the passed in parameters as the arguments to the method. |
void |
removeAllParameters()
Clears the list of parameters. |
void |
removeProperty(java.lang.String name)
Removes (if set) the named property. |
void |
setEncodingStyle(java.lang.String namespaceURI)
Sets the encoding style to the URL passed in. |
void |
setMaintainSession(boolean yesno)
Determine whether we'd like to track sessions or not. |
void |
setOperation(QName portName,
java.lang.String opName)
|
void |
setOperationName(java.lang.String opName)
Sets the operation name associated with this Call object. |
void |
setOption(java.lang.String name,
java.lang.Object value)
Set engine option. |
void |
setPortTypeName(QName portType)
Sets the port type of this Call object. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Allows you to set a named property to the passed in value. |
void |
setRequestMessage(Message msg)
Directly set the request message in our MessageContext. |
void |
setReturnType(XMLType type)
Sets the return type of the operation associated with this Call object. |
void |
setTargetEndpointAddress(java.net.URL address)
Sets the URL of the target Web Service. |
void |
setTransport(Transport trans)
Set the Transport Note: Not part of JAX-RPC specification. |
static void |
setTransportForProtocol(java.lang.String protocol,
java.lang.Class transportClass)
Register a Transport that should be used for URLs of the specified protocol. |
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 NAMESPACE
public static final java.lang.String SEND_TYPE_ATTR
public static final java.lang.String TIMEOUT
public static final java.lang.String TRANSPORT_NAME
public static final java.lang.String TRANSPORT_PROPERTY
protected java.util.Vector attachmentParts
Constructor Detail |
public Call(Service service)
public Call(java.lang.String url) throws java.net.MalformedURLException, JAXRPCException
url
- the target endpoint URLjava.net.MalformedURLException
- public Call(java.net.URL url) throws JAXRPCException
url
- the target endpoint URLMethod Detail |
public java.lang.String getEncodingStyle()
getEncodingStyle
in interface Call
public void setEncodingStyle(java.lang.String namespaceURI)
setEncodingStyle
in interface Call
namespaceURI
- URI of the encoding to use.public void addParameter(java.lang.String paramName, XMLType paramType, int parameterMode)
addParameter
in interface Call
paramName
- Name that will be used for the parameter in the XMLparamType
- XMLType of the parameterparameterMode
- one of PARAM_MODE_IN, PARAM_MODE_OUT
or PARAM_MODE_INOUTpublic XMLType getParameterTypeByName(java.lang.String paramName)
paramName
- name of the parameter to returnpublic void setReturnType(XMLType type)
setReturnType
in interface Call
type
- XMLType of the return value.public XMLType getReturnType()
public void removeAllParameters()
removeAllParameters
in interface Call
public java.lang.String getOperationName()
getOperationName
in interface Call
public void setOperationName(java.lang.String opName)
setOperationName
in interface Call
opName
- Name of the operation.public void setOperation(QName portName, java.lang.String opName) throws JAXRPCException
public QName getPortTypeName()
getPortTypeName
in interface Call
public void setPortTypeName(QName portType)
setPortTypeName
in interface Call
portType
- Fully qualified name of the portTypepublic void setTargetEndpointAddress(java.net.URL address)
setTargetEndpointAddress
in interface Call
address
- URL of the target Web Servicepublic java.net.URL getTargetEndpointAddress()
getTargetEndpointAddress
in interface Call
public void setProperty(java.lang.String name, java.lang.Object value)
setProperty
in interface Call
name
- Name of the propertyvalue
- Value of the propertypublic java.lang.Object getProperty(java.lang.String name)
getProperty
in interface Call
public void removeProperty(java.lang.String name)
removeProperty
in interface Call
name
- name of the property to removepublic java.lang.Object invoke(java.lang.Object[] params) throws java.rmi.RemoteException
invoke
in interface Call
params
- Array of parameters to invoke the Web Service withRemoteException
- if there's an errorpublic void invokeOneWay(java.lang.Object[] params) throws JAXRPCException
invokeOneWay
in interface Call
params
- Array of parameters to invoke the Web Service withJAXRPCException
- is there's an errorpublic SOAPEnvelope invoke(SOAPEnvelope env) throws java.rmi.RemoteException
env
- a SOAPEnvelope to send.AxisFault
- public static void setTransportForProtocol(java.lang.String protocol, java.lang.Class transportClass)
protocol
- the URL protocol (i.e. "tcp" for "tcp://" urls)transportClass
- the class of a Transport type 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 trans)
transport
- the Transport object we'll use to set up
MessageContext properties.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 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 addHeader(SOAPHeader header)
header
- a SOAPHeader to be inserted into messagespublic void clearHeaders()
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 deserFactory)
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 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(java.lang.String method, java.lang.Object[] args) throws AxisFault
method
- 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 setOption(java.lang.String name, java.lang.Object value)
public void addOption(java.lang.String name, java.lang.Object value)
public void invoke() throws AxisFault
AxisFault
- public java.util.Vector getOutputParams()
public Service getService()
public void addAttachmentPart(java.lang.Object attachment)
java.lang.RuntimeException
- if there is no support for attachments.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |