addAttachmentPart
public void addAttachmentPart(Object attachment)
This method adds an attachment.
Note: Not part of JAX-RPC specification.
attachment
- the Object
to attach
addFault
public void addFault(QName qname,
Class cls,
QName xmlType,
boolean isComplex)
Add a fault for this operation.
Note: Not part of JAX-RPC specificaion.
qname
- qname of the faultcls
- class of the faultxmlType
- XML type of the faultisComplex
- true if xmlType is a complex type, false otherwise
addHeader
public void addHeader(SOAPHeaderElement header)
Add a header which should be inserted into each outgoing message
we generate.
Note: Not part of JAX-RPC specification.
header
- a SOAPHeaderElement to be inserted into messages
addParameter
public void addParameter(String paramName,
QName xmlType,
Class javaType,
ParameterMode parameterMode)
Adds a parameter type and mode for a specific operation. Note that the
client code is not required to call any addParameter and setReturnType
methods before calling the invoke method. A Call implementation class
can determine the parameter types by using the Java reflection and
configured type mapping registry.
- addParameter in interface Call
paramName
- - Name of the parameterxmlType
- - XML datatype of the parameterjavaType
- - The Java class of the parameterparameterMode
- - Mode of the parameter-whether IN, OUT or INOUT
addParameter
public void addParameter(String paramName,
QName xmlType,
ParameterMode parameterMode)
Adds the specified parameter to the list of parameters for the
operation associated with this Call object.
- addParameter in interface Call
paramName
- Name that will be used for the parameter in the XMLxmlType
- XMLType of the parameterparameterMode
- one of IN, OUT or INOUT
addParameter
public void addParameter(QName paramName,
QName xmlType,
Class javaType,
ParameterMode parameterMode)
Adds the specified parameter to the list of parameters for the
operation associated with this Call object.
Note: Not part of JAX-RPC specification.
paramName
- Name that will be used for the parameter in the XMLxmlType
- XMLType of the parameterjavaType
- The Java class of the parameterparameterMode
- one of IN, OUT or INOUT
addParameter
public void addParameter(QName paramName,
QName xmlType,
ParameterMode parameterMode)
Adds the specified parameter to the list of parameters for the
operation associated with this Call object.
Note: Not part of JAX-RPC specification.
paramName
- Name that will be used for the parameter in the XMLxmlType
- XMLType of the parameterparameterMode
- one of IN, OUT or INOUT
addParameterAsHeader
public void addParameterAsHeader(QName paramName,
QName xmlType,
Class javaType,
ParameterMode parameterMode,
ParameterMode headerMode)
Adds a parameter type as a soap:header.
paramName
- - Name of the parameterxmlType
- - XML datatype of the parameterjavaType
- - The Java class of the parameterparameterMode
- - Mode of the parameter-whether IN, OUT or INOUTheaderMode
- - Mode of the header. Even if this is an INOUT
parameter, it need not be in the header in both
directions.
addParameterAsHeader
public void addParameterAsHeader(QName paramName,
QName xmlType,
ParameterMode parameterMode,
ParameterMode headerMode)
Adds a parameter type as a soap:header.
paramName
- - Name of the parameterxmlType
- - XML datatype of the parameterparameterMode
- - Mode of the parameter-whether IN, OUT or INOUTheaderMode
- - Mode of the header. Even if this is an INOUT
parameter, it need not be in the header in both
directions.
addTransportPackage
public static void addTransportPackage(String packageName)
Add a package to the system protocol handler search path. This
enables users to create their own URLStreamHandler classes, and thus
allow custom protocols to be used in Axis (typically on the client
command line).
For instance, if you add "samples.transport" to the packages property,
and have a class samples.transport.tcp.Handler, the system will be able
to parse URLs of the form "tcp://host:port..."
Note: Not part of JAX-RPC specification.
packageName
- the package in which to search for protocol names.
clearHeaders
public void clearHeaders()
Clear the list of headers which we insert into each message
Note: Not part of JAX-RPC specification.
clearOperation
public void clearOperation()
getEncodingStyle
public String getEncodingStyle()
Returns the encoding style as a URI that should be used for the SOAP
message.
- String URI of the encoding style to use
getMaintainSession
public boolean getMaintainSession()
Get the value of maintainSession flag.
- true if session is maintained, false otherwise
getMessageContext
public MessageContext getMessageContext()
Obtain a reference to our MessageContext.
Note: Not part of JAX-RPC specification.
getOperationName
public QName getOperationName()
Returns the operation name associated with this Call object.
- getOperationName in interface Call
- String Name of the operation or null if not set.
getOperationStyle
public Style getOperationStyle()
Get the operation style.
- the
Style
of the operation
getOperationUse
public Use getOperationUse()
Get the operation use.
getOutputParams
public Map getOutputParams()
Get the output parameters (if any) from the last invocation.
This allows named access - if you need sequential access, use
getOutputValues().
- getOutputParams in interface Call
- a Map containing the output parameter values, indexed by QName
getOutputValues
public List getOutputValues()
Returns a List values for the output parameters of the last
invoked operation.
- getOutputValues in interface Call
- Values for the output parameters. An empty List is
returned if there are no output values.
getParameterTypeByName
public QName getParameterTypeByName(String paramName)
Return the QName of the type of the parameters with the given name.
- getParameterTypeByName in interface Call
paramName
- name of the parameter to return
- XMLType XMLType of paramName, or null if not found.
getParameterTypeByQName
public QName getParameterTypeByQName(QName paramQName)
Return the QName of the type of the parameters with the given name.
Note: Not part of JAX-RPC specification.
paramQName
- QName of the parameter to return
- XMLType XMLType of paramQName, or null if not found.
getPassword
public String getPassword()
Get the password.
- a plain-text copy of the password
getPortName
public QName getPortName()
Returns the fully qualified name of the port for this Call object
(if there is one).
- QName Fully qualified name of the port (or null if not set)
getPortTypeName
public QName getPortTypeName()
Returns the fully qualified name of the port type for this Call object
(if there is one).
- getPortTypeName in interface Call
- QName Fully qualified name of the port type
getProperty
public Object getProperty(String name)
Returns the value associated with the named property.
- getProperty in interface Call
name
- the name of the property
- Object value of the property or null if the property is not set
getPropertyNames
public Iterator getPropertyNames()
Gets the names of configurable properties supported by
this Call
object.
- getPropertyNames in interface Call
- Iterator for the property names
getResponseMessage
public Message getResponseMessage()
Directly get the response message in our MessageContext.
Shortcut for having to go thru the msgContext
Note: Not part of JAX-RPC specification.
- the response Message object in the msgContext
getReturnType
public QName getReturnType()
Returns the QName of the type of the return value of this Call - or null
if not set.
Note: Not part of JAX-RPC specification.
- getReturnType in interface Call
- the XMLType specified for this Call (or null).
getSOAPActionURI
public String getSOAPActionURI()
Get the soapAction URI.
- the curretn SOAP action URI
getService
public Service getService()
Get the Service object associated with this Call object.
Note: Not part of JAX-RPC specification.
- Service the Service object this Call object is associated with
getStreaming
public boolean getStreaming()
getTargetEndpointAddress
public String getTargetEndpointAddress()
Returns the URL of the target Web Service.
- getTargetEndpointAddress in interface Call
- URL URL of the target Web Service
getTimeout
public Integer getTimeout()
getTransportForProtocol
public Transport getTransportForProtocol(String protocol)
Get the Transport registered for the given protocol.
Note: Not part of JAX-RPC specification.
protocol
- a protocol such as "http" or "local" which may
have a Transport object associated with it.
- the Transport registered for this protocol, or null if none.
getUsername
public String getUsername()
Get the user name.
initialize
public static void initialize()
Set up the default transport URL mappings.
This must be called BEFORE doing non-standard URL parsing (i.e. if you
want the system to accept a "local:" URL). This is why the Options class
calls it before parsing the command-line URL argument.
Note: Not part of JAX-RPC specification.
invoke
public void invoke()
throws AxisFault
Invoke this Call with its established MessageContext
(perhaps because you called this.setRequestMessage())
Note: Not part of JAX-RPC specification.
invoke
public Object invoke(Object[] params)
throws RemoteException
Invokes the operation associated with this Call object using the
passed in parameters as the arguments to the method.
For Messaging (ie. non-RPC) the params argument should be an array
of SOAPBodyElements. All of them need to be SOAPBodyElements,
if any of them are not this method will default back to RPC. In the
Messaging case the return value will be a vector of SOAPBodyElements.
- invoke in interface Call
params
- Array of parameters to invoke the Web Service with
- Object Return value of the operation/method - or null
invoke
public Object invoke(String method,
Object[] args)
throws AxisFault
Convenience method to invoke a method with a default (empty)
namespace. Calls invoke() above.
Note: Not part of JAX-RPC specification.
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 "arg".
- a deserialized Java Object containing the return value
invoke
public Object invoke(String namespace,
String method,
Object[] args)
throws AxisFault
Invoke an RPC service with a method name and arguments.
This will call the service, serializing all the arguments, and
then deserialize the return value.
Note: Not part of JAX-RPC specification.
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 "arg".
- a deserialized Java Object containing the return value
invoke
public Object invoke(QName operationName,
Object[] params)
throws RemoteException
Invokes a specific operation using a synchronous request-response interaction mode. The invoke method takes
as parameters the object values corresponding to these defined parameter types. Implementation of the invoke
method must check whether the passed parameter values correspond to the number, order and types of parameters
specified in the corresponding operation specification.
- invoke in interface Call
operationName
- - Name of the operation to invokeparams
- - Parameters for this invocation
- the value returned from the other end.
invoke
public SOAPEnvelope invoke(Message msg)
throws AxisFault
Invoke the service with a custom Message.
This method simplifies invoke(SOAPEnvelope).
Note: Not part of JAX-RPC specification.
invoke
public Object invoke(RPCElement body)
throws AxisFault
Invoke an RPC service with a pre-constructed RPCElement.
Note: Not part of JAX-RPC specification.
body
- an RPCElement containing all the information about
this call.
- a deserialized Java Object containing the return value
invoke
public SOAPEnvelope invoke(SOAPEnvelope env)
throws AxisFault
Invoke the service with a custom SOAPEnvelope.
Note: Not part of JAX-RPC specification.
env
- a SOAPEnvelope to send
invokeOneWay
public void invokeOneWay(Object[] params)
Invokes the operation associated with this Call object using the passed
in parameters as the arguments to the method. This will return
immediately rather than waiting for the server to complete its
processing.
NOTE: the return immediately part isn't implemented yet
- invokeOneWay in interface Call
params
- Array of parameters to invoke the Web Service with
isParameterAndReturnSpecRequired
public boolean isParameterAndReturnSpecRequired(QName operationName)
Is the caller required to provide the parameter and return type
specification?
If true, then
addParameter and setReturnType MUST be called to provide the meta data.
If false, then
addParameter and setReturnType SHOULD NOT be called because the
Call object already has the meta data describing the
parameters and return type. If addParameter is called, the specified
parameter is added to the end of the list of parameters.
- isParameterAndReturnSpecRequired in interface Call
isPropertySupported
public boolean isPropertySupported(String name)
registerTypeMapping
public void registerTypeMapping(Class javaType,
QName xmlType,
Class sfClass,
Class dfClass)
register this type matting
javaType
- xmlType
- sfClass
- dfClass
-
registerTypeMapping
public void registerTypeMapping(Class javaType,
QName xmlType,
Class sfClass,
Class dfClass,
boolean force)
register a type. This only takes place if either the serializer or
deserializer factory could be created.
javaType
- java type to handlexmlType
- XML mappingsfClass
- class of serializer factorydfClass
- class of deserializer factoryforce
-
registerTypeMapping
public void registerTypeMapping(Class javaType,
QName xmlType,
SerializerFactory sf,
DeserializerFactory df)
Register type mapping information for serialization/deserialization
Note: Not part of JAX-RPC specification.
javaType
- is the Java class of the data type.xmlType
- the xsi:type QName of the associated XML type.
registerTypeMapping
public void registerTypeMapping(Class javaType,
QName xmlType,
SerializerFactory sf,
DeserializerFactory df,
boolean force)
Register type mapping information for serialization/deserialization
Note: Not part of JAX-RPC specification.
javaType
- is the Java class of the data type.xmlType
- the xsi:type QName of the associated XML type.force
- Indicates whether to add the information if already registered.
removeAllParameters
public void removeAllParameters()
Clears the list of parameters.
- removeAllParameters in interface Call
removeProperty
public void removeProperty(String name)
Removes (if set) the named property.
- removeProperty in interface Call
name
- name of the property to remove
setClientHandlers
public void setClientHandlers(Handler reqHandler,
Handler respHandler)
Sets the client-side request and response Handlers. This is handy
for programatically setting up client-side work without deploying
via WSDD or the EngineConfiguration mechanism.
setEncodingStyle
public void setEncodingStyle(String namespaceURI)
Sets the encoding style to the URL passed in.
namespaceURI
- URI of the encoding to use.
setMaintainSession
public void setMaintainSession(boolean yesno)
Determine whether we'd like to track sessions or not. This
overrides the default setting from the service.
This just passes through the value into the MessageContext.
Note: Not part of JAX-RPC specification.
yesno
- true if session state is desired, false if not.
setOperation
public void setOperation(String opName)
Prefill as much info from the WSDL as it can.
Right now it's SOAPAction, operation qname, parameter types
and return type of the Web Service.
This methods considers that port name and target endpoint address have
already been set. This is useful when you want to use the same Call
instance for several calls on the same Port
Note: Not part of JAX-RPC specification.
opName
- Operation(method) that's going to be invoked
setOperation
public void setOperation(QName portName,
String opName)
prefill as much info from the WSDL as it can.
Right now it's target URL, SOAPAction, Parameter types,
and return type of the Web Service.
If wsdl is not present, this function set port name and operation name
and does not modify target endpoint address.
Note: Not part of JAX-RPC specification.
portName
- PortName in the WSDL doc to search foropName
- Operation(method) that's going to be invoked
setOperation
public void setOperation(QName portName,
QName opName)
prefill as much info from the WSDL as it can.
Right now it's target URL, SOAPAction, Parameter types,
and return type of the Web Service.
If wsdl is not present, this function set port name and operation name
and does not modify target endpoint address.
Note: Not part of JAX-RPC specification.
portName
- PortName in the WSDL doc to search foropName
- Operation(method) that's going to be invoked
setOperation
public void setOperation(OperationDesc operation)
Hand a complete OperationDesc to the Call, and note that this was
done so that others don't try to mess with it by calling addParameter,
setReturnType, etc.
operation
- the OperationDesc to associate with this call.
setOperationName
public void setOperationName(String opName)
This is a convenience method. If the user doesn't care about the QName
of the operation, the user can call this method, which converts a String
operation name to a QName.
setOperationName
public void setOperationName(QName opName)
Sets the operation name associated with this Call object. This will
not check the WSDL (if there is WSDL) to make sure that it's a valid
operation name.
- setOperationName in interface Call
opName
- Name of the operation.
setOperationStyle
public void setOperationStyle(String operationStyle)
Set the operation style: "document", "rpc"
operationStyle
- string designating style
setOperationStyle
public void setOperationStyle(Style operationStyle)
Set the operation style
setOperationUse
public void setOperationUse(String operationUse)
Set the operation use: "literal", "encoded"
operationUse
- string designating use
setOperationUse
public void setOperationUse(Use operationUse)
Set the operation use
setOption
public void setOption(String name,
Object value)
Set engine option.
Note: Not part of JAX-RPC specification.
setPassword
public void setPassword(String password)
Set the password.
password
- plain-text copy of the password
setPortName
public void setPortName(QName portName)
Sets the port name of this Call object. This call will not set
any additional fields, nor will it do any checking to verify that
this port name is actually defined in the WSDL - for now anyway.
portName
- Fully qualified name of the port
setPortTypeName
public void setPortTypeName(QName portType)
Sets the port type name of this Call object. This call will not set
any additional fields, nor will it do any checking to verify that
this port type is actually defined in the WSDL - for now anyway.
- setPortTypeName in interface Call
portType
- Fully qualified name of the portType
setProperty
public void setProperty(String name,
Object value)
Allows you to set a named property to the passed in value.
There are a few known properties (like username, password, etc)
that are variables in Call. The rest of the properties are
stored in a Hashtable. These common properties should be
accessed via the accessors for speed/type safety, but they may
still be obtained via this method. It's up to one of the
Handlers (or the Axis engine itself) to go looking for
one of them.
There are various well defined properties defined in the
JAX-RPC specification and declared in the Call and Stub classes.
It is not possible to set any other properties beginning in java. or
javax. that are not in the specification.
- setProperty in interface Call
name
- Name of the propertyvalue
- Value of the property
setRequestMessage
public void setRequestMessage(Message msg)
Directly set the request message in our MessageContext.
This allows custom message creation.
Note: Not part of JAX-RPC specification.
msg
- the new request message.
setReturnClass
public void setReturnClass(Class cls)
Sets the desired return Java Class. This is a convenience method
which will cause the Call to automatically convert return values
into a desired class if possible. For instance, we return object
arrays by default now for SOAP arrays - you could specify:
setReturnClass(Vector.class)
and you'd get a Vector back from invoke() instead of having to do
the conversion yourself.
Note: Not part of JAX-RPC specification. To be JAX-RPC compliant,
use setReturnType(QName, Class).
cls
- the desired return class.
setReturnQName
public void setReturnQName(QName qname)
Set the QName of the return element
NOT part of JAX-RPC
setReturnType
public void setReturnType(QName type)
Sets the return type of the operation associated with this Call object.
- setReturnType in interface Call
type
- QName of the return value type.
setReturnType
public void setReturnType(QName xmlType,
Class javaType)
Sets the return type for a specific operation.
- setReturnType in interface Call
xmlType
- - QName of the data type of the return valuejavaType
- - Java class of the return value
setReturnTypeAsHeader
public void setReturnTypeAsHeader(QName xmlType)
Set the return type as a header
setReturnTypeAsHeader
public void setReturnTypeAsHeader(QName xmlType,
Class javaType)
Set the return type as a header
setSOAPActionURI
public void setSOAPActionURI(String SOAPActionURI)
Set the soapAction URI.
SOAPActionURI
- the new SOAP action URI
setSOAPService
public void setSOAPService(SOAPService service)
Set the service so that it defers missing property gets to the
Call. So when client-side Handlers get at the MessageContext,
the property scoping will be MC -> SOAPService -> Call
setSOAPVersion
public void setSOAPVersion(SOAPConstants soapConstants)
Allow the user to set the default SOAP version. For SOAP 1.2, pass
SOAPConstants.SOAP12_CONSTANTS.
soapConstants
- the SOAPConstants object representing the correct
version
setStreaming
public void setStreaming(boolean useStreaming)
setTargetEndpointAddress
public void setTargetEndpointAddress(String address)
Sets the endpoint address of the target service port. This address must
correspond to the transport specified in the binding for this Call
instance.
- setTargetEndpointAddress in interface Call
address
- - Endpoint address of the target service port; specified
as URI
setTargetEndpointAddress
public void setTargetEndpointAddress(URL address)
Sets the URL of the target Web Service.
Note: Not part of JAX-RPC specification.
address
- URL of the target Web Service
setTimeout
public void setTimeout(Integer timeout)
setTransport
public void setTransport(Transport trans)
Set the Transport
Note: Not part of JAX-RPC specification.
trans
- the Transport object we'll use to set up
MessageContext properties.
setTransportForProtocol
public static void setTransportForProtocol(String protocol,
Class transportClass)
Register a Transport that should be used for URLs of the specified
protocol.
Note: Not part of JAX-RPC specification.
protocol
- the URL protocol (i.e. "tcp" for "tcp://" urls)transportClass
- the class of a Transport type which will be used
for matching URLs.
setUseSOAPAction
public void setUseSOAPAction(boolean useSOAPAction)
Flag to indicate if soapAction should be used.
useSOAPAction
- true if the soapAction header is to be used to
help find the method to invoke, false otherwise
setUsername
public void setUsername(String username)
Set the username.
username
- the new user name
useSOAPAction
public boolean useSOAPAction()
Discover if soapAction is being used.
- true if it is, false otherwise