org.apache.axis.client
public class Call extends Object implements Call
Standard properties defined by in JAX-RPC's javax..xml.rpc.Call interface: USERNAME_PROPERTY - User name for authentication PASSWORD_PROPERTY - Password for authentication SESSION_PROPERTY - Participate in a session with the endpoint? OPERATION_STYLE_PROPERTY - "rpc" or "document" SOAPACTION_USE_PROPERTY - Should SOAPAction be used? SOAPACTION_URI_PROPERTY - If SOAPAction is used, this is that action ENCODING_STYLE_PROPERTY - Default is SOAP 1.1: "http://schemas.xmlsoap.org/soap/encoding/" AXIS properties: SEND_TYPE_ATTR - Should we send the XSI type attributes (true/false) TIMEOUT - Timeout used by transport sender in milliseconds TRANSPORT_NAME - Name of transport handler to use ATTACHMENT_ENCAPSULATION_FORMAT- Send attachments as MIME the default, or DIME. CHARACTER_SET_ENCODING - Character set encoding to use for request
Field Summary | |
---|---|
static String | ATTACHMENT_ENCAPSULATION_FORMAT
Property for setting attachment format.
|
static String | ATTACHMENT_ENCAPSULATION_FORMAT_DIME
Property value for setting attachment format as DIME. |
static String | ATTACHMENT_ENCAPSULATION_FORMAT_MIME
Property value for setting attachment format as MIME. |
protected Vector | attachmentParts
these are our attachments |
static String | CHARACTER_SET_ENCODING
This is the character set encoding to use for the message
|
static String | CHECK_MUST_UNDERSTAND
If this property is true, code will enforce must understand check on both
the request and the response paths. |
static String | CONNECTION_TIMEOUT_PROPERTY
Timeout property: should be accompanies by an integer |
protected static Log | entLog |
static String | FAULT_ON_NO_RESPONSE
If this property is true, the code will throw a fault if there is no
response message from the server. |
static String | JAXRPC_PORTTYPE_NAME |
static String | JAXRPC_SERVICE |
protected static Log | log |
protected static String | ONE_WAY
Internal property to indicate a one way call.
|
static String | SEND_TYPE_ATTR |
static String | STREAMING_PROPERTY
Streaming property: should be accompanied by an boolean
(i.e. |
static String | TRANSPORT_NAME
This is the name of a property to set the transport of the message
|
static String | TRANSPORT_PROPERTY
This is not the name of a property that can be set with
setProperty, despite its name. |
static String | WSDL_PORT_NAME
this is a property set in the message context when the invocation
process begins, for the benefit of handlers |
static String | WSDL_SERVICE
this is a property set in the message context when the invocation
process begins, for the benefit of handlers |
Constructor Summary | |
---|---|
Call(Service service)
Default constructor - not much else to say.
| |
Call(String url)
Build a call from a URL string.
| |
Call(URL url)
Build a call from a URL.
|
Method Summary | |
---|---|
void | addAttachmentPart(Object attachment)
This method adds an attachment.
|
void | addFault(QName qname, Class cls, QName xmlType, boolean isComplex)
Add a fault for this operation.
|
void | addHeader(SOAPHeaderElement header)
Add a header which should be inserted into each outgoing message
we generate.
|
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.
|
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.
|
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.
|
void | addParameter(String paramName, QName xmlType, Class javaType, ParameterMode parameterMode)
Adds a parameter type and mode for a specific operation. |
void | addParameterAsHeader(QName paramName, QName xmlType, ParameterMode parameterMode, ParameterMode headerMode)
Adds a parameter type as a soap:header.
|
void | addParameterAsHeader(QName paramName, QName xmlType, Class javaType, ParameterMode parameterMode, ParameterMode headerMode)
Adds a parameter type as a soap:header. |
static void | addTransportPackage(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. |
void | clearOperation() |
String | getEncodingStyle()
Returns the encoding style as a URI that should be used for the SOAP
message.
|
boolean | getMaintainSession()
Get the value of maintainSession flag.
|
MessageContext | getMessageContext()
Obtain a reference to our MessageContext.
|
OperationDesc | getOperation() |
QName | getOperationName()
Returns the operation name associated with this Call object.
|
Style | getOperationStyle()
Get the operation style.
|
Use | getOperationUse()
Get the operation use.
|
Map | getOutputParams()
Get the output parameters (if any) from the last invocation.
|
List | getOutputValues()
Returns a List values for the output parameters of the last
invoked operation.
|
QName | getParameterTypeByName(String paramName)
Return the QName of the type of the parameters with the given name.
|
QName | getParameterTypeByQName(QName paramQName)
Return the QName of the type of the parameters with the given name.
|
String | getPassword()
Get the password.
|
QName | getPortName()
Returns the fully qualified name of the port for this Call object
(if there is one).
|
QName | getPortTypeName()
Returns the fully qualified name of the port type for this Call object
(if there is one).
|
Object | getProperty(String name)
Returns the value associated with the named property.
|
Iterator | getPropertyNames() |
Message | getResponseMessage()
Directly get the response message in our MessageContext.
|
QName | getReturnType()
Returns the QName of the type of the return value of this Call - or null
if not set.
|
Service | getService()
Get the Service object associated with this Call object.
|
String | getSOAPActionURI()
Get the soapAction URI.
|
boolean | getStreaming() |
String | getTargetEndpointAddress()
Returns the URL of the target Web Service.
|
Integer | getTimeout() |
Transport | getTransportForProtocol(String protocol) Get the Transport registered for the given protocol.
|
TypeMapping | getTypeMapping() |
String | getUsername()
Get the user name.
|
static void | initialize()
Set up the default transport URL mappings.
|
Object | invoke(QName operationName, Object[] params)
Invokes a specific operation using a synchronous request-response interaction mode. |
Object | invoke(Object[] params)
Invokes the operation associated with this Call object using the
passed in parameters as the arguments to the method.
|
SOAPEnvelope | invoke(Message msg)
Invoke the service with a custom Message.
|
SOAPEnvelope | invoke(SOAPEnvelope env)
Invoke the service with a custom SOAPEnvelope.
|
Object | invoke(String namespace, String method, Object[] args) Invoke an RPC service with a method name and arguments.
|
Object | invoke(String method, Object[] args) Convenience method to invoke a method with a default (empty)
namespace. |
Object | invoke(RPCElement body) Invoke an RPC service with a pre-constructed RPCElement.
|
void | invoke()
Invoke this Call with its established MessageContext
(perhaps because you called this.setRequestMessage())
Note: Not part of JAX-RPC specification.
|
void | invokeOneWay(Object[] params)
Invokes the operation associated with this Call object using the passed
in parameters as the arguments to the method. |
boolean | isParameterAndReturnSpecRequired(QName operationName)
Is the caller required to provide the parameter and return type
specification?
|
boolean | isPropertySupported(String name) |
void | registerTypeMapping(Class javaType, QName xmlType, SerializerFactory sf, DeserializerFactory df)
Register type mapping information for serialization/deserialization
Note: Not part of JAX-RPC specification.
|
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.
|
void | registerTypeMapping(Class javaType, QName xmlType, Class sfClass, Class dfClass)
register this type matting |
void | registerTypeMapping(Class javaType, QName xmlType, Class sfClass, Class dfClass, boolean force)
register a type. |
void | removeAllParameters()
Clears the list of parameters. |
void | removeProperty(String name)
Removes (if set) the named property.
|
void | setClientHandlers(Handler reqHandler, Handler respHandler)
Sets the client-side request and response Handlers. |
void | setEncodingStyle(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(String opName)
Prefill as much info from the WSDL as it can.
|
void | setOperation(QName portName, String opName)
prefill as much info from the WSDL as it can.
|
void | setOperation(QName portName, QName opName)
prefill as much info from the WSDL as it can.
|
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.
|
void | setOperationName(QName opName)
Sets the operation name associated with this Call object. |
void | setOperationName(String opName)
This is a convenience method. |
void | setOperationStyle(String operationStyle)
Set the operation style: "document", "rpc" |
void | setOperationStyle(Style operationStyle)
Set the operation style
|
void | setOperationUse(String operationUse)
Set the operation use: "literal", "encoded" |
void | setOperationUse(Use operationUse)
Set the operation use |
void | setOption(String name, Object value)
Set engine option.
|
void | setPassword(String password)
Set the password.
|
void | setPortName(QName portName)
Sets the port name of this Call object. |
void | setPortTypeName(QName portType)
Sets the port type name of this Call object. |
void | setProperty(String name, 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 | setReturnClass(Class cls)
Sets the desired return Java Class. |
void | setReturnQName(QName qname)
Set the QName of the return element
NOT part of JAX-RPC |
void | setReturnType(QName type)
Sets the return type of the operation associated with this Call object.
|
void | setReturnType(QName xmlType, Class javaType)
Sets the return type for a specific operation.
|
void | setReturnTypeAsHeader(QName xmlType)
Set the return type as a header |
void | setReturnTypeAsHeader(QName xmlType, Class javaType)
Set the return type as a header |
void | setSOAPActionURI(String SOAPActionURI)
Set the soapAction URI.
|
void | setSOAPService(SOAPService service)
Set the service so that it defers missing property gets to the
Call. |
void | setSOAPVersion(SOAPConstants soapConstants)
Allow the user to set the default SOAP version. |
void | setStreaming(boolean useStreaming) |
void | setTargetEndpointAddress(String address)
Sets the endpoint address of the target service port. |
void | setTargetEndpointAddress(URL address)
Sets the URL of the target Web Service.
|
void | setTimeout(Integer timeout) |
void | setTransport(Transport trans)
Set the Transport
Note: Not part of JAX-RPC specification.
|
static void | setTransportForProtocol(String protocol, Class transportClass) Register a Transport that should be used for URLs of the specified
protocol.
|
void | setUsername(String username)
Set the username.
|
void | setUseSOAPAction(boolean useSOAPAction)
Flag to indicate if soapAction should be used.
|
boolean | useSOAPAction()
Discover if soapAction is being used.
|
See Also: Call ATTACHMENT_ENCAPSULATION_FORMAT_DIME ATTACHMENT_ENCAPSULATION_FORMAT_MIME
See Also: Call
See Also: Call
Deprecated: use WSDL_PORT_NAME instead.
Deprecated: use WSDL_SERVICE instead.
See Also: Call
See Also: Call
Parameters: service the Service
this Call
will
work with
Parameters: url the target endpoint URL
Throws: MalformedURLException
Parameters: url the target endpoint URL
Note: Not part of JAX-RPC specification.
Parameters: attachment the Object
to attach
Throws: RuntimeException if there is no support for attachments
Note: Not part of JAX-RPC specificaion.
Parameters: qname qname of the fault cls class of the fault xmlType XML type of the fault isComplex true if xmlType is a complex type, false otherwise
Parameters: header a SOAPHeaderElement to be inserted into messages
Parameters: paramName Name that will be used for the parameter in the XML xmlType XMLType of the parameter parameterMode one of IN, OUT or INOUT
Parameters: paramName Name that will be used for the parameter in the XML xmlType XMLType of the parameter javaType The Java class of the parameter parameterMode one of IN, OUT or INOUT
Parameters: paramName Name that will be used for the parameter in the XML xmlType XMLType of the parameter parameterMode one of IN, OUT or INOUT
Parameters: paramName - Name of the parameter xmlType - XML datatype of the parameter javaType - The Java class of the parameter parameterMode - Mode of the parameter-whether IN, OUT or INOUT
Throws: JAXRPCException - if isParameterAndReturnSpecRequired returns false, then addParameter MAY throw JAXRPCException....actually Axis allows modification in such cases
Parameters: paramName - Name of the parameter xmlType - XML datatype of the parameter parameterMode - Mode of the parameter-whether IN, OUT or INOUT headerMode - Mode of the header. Even if this is an INOUT parameter, it need not be in the header in both directions.
Throws: JAXRPCException - if isParameterAndReturnSpecRequired returns false, then addParameter MAY throw JAXRPCException....actually Axis allows modification in such cases
Parameters: paramName - Name of the parameter xmlType - XML datatype of the parameter javaType - The Java class of the parameter parameterMode - Mode of the parameter-whether IN, OUT or INOUT headerMode - Mode of the header. Even if this is an INOUT parameter, it need not be in the header in both directions.
Throws: JAXRPCException - if isParameterAndReturnSpecRequired returns false, then addParameter MAY throw JAXRPCException....actually Axis allows modification in such cases
Parameters: packageName the package in which to search for protocol names.
Returns: String URI of the encoding style to use
Returns: true if session is maintained, false otherwise
Returns: the MessageContext.
Returns: String Name of the operation or null if not set.
Returns: the Style
of the operation
Returns: the Use
of the operation
Returns: a Map containing the output parameter values, indexed by QName
Returns: Values for the output parameters. An empty List is returned if there are no output values.
Throws: JAXRPCException - If this method is invoked for a one-way operation or is invoked before any invoke method has been called.
Parameters: paramName name of the parameter to return
Returns: XMLType XMLType of paramName, or null if not found.
Parameters: paramQName QName of the parameter to return
Returns: XMLType XMLType of paramQName, or null if not found.
Returns: a plain-text copy of the password
Returns: QName Fully qualified name of the port (or null if not set)
Returns: QName Fully qualified name of the port type
Parameters: name the name of the property
Returns: Object value of the property or null if the property is not set
Throws: JAXRPCException if the requested property is not a supported property
Returns: the response Message object in the msgContext
Returns: the XMLType specified for this Call (or null).
Returns: Service the Service object this Call object is associated with
Returns: the curretn SOAP action URI
Returns: URL URL of the target Web Service
Parameters: protocol a protocol such as "http" or "local" which may have a Transport object associated with it.
Returns: the Transport registered for this protocol, or null if none.
Returns: the user name
Parameters: operationName - Name of the operation to invoke params - Parameters for this invocation
Returns: the value returned from the other end.
Throws: java.rmi.RemoteException - if there is any error in the remote method invocation or if the Call object is not configured properly.
Parameters: params Array of parameters to invoke the Web Service with
Returns: Object Return value of the operation/method - or null
Throws: java.rmi.RemoteException if there's an error
Note: Not part of JAX-RPC specification.
Parameters: msg a Message to send
Throws: AxisFault if there is any failure
Note: Not part of JAX-RPC specification.
Parameters: env a SOAPEnvelope to send
Throws: AxisFault if there is any failure
Parameters: namespace the desired namespace URI of the method element method the method name args 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
Returns: a deserialized Java Object containing the return value
Throws: AxisFault
Parameters: method the method name args 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
Returns: a deserialized Java Object containing the return value
Throws: AxisFault
Parameters: body an RPCElement containing all the information about this call.
Returns: a deserialized Java Object containing the return value
Throws: AxisFault
Throws: AxisFault
Parameters: params Array of parameters to invoke the Web Service with
Throws: JAXRPCException is there's an error
Parameters: javaType is the Java class of the data type. xmlType the xsi:type QName of the associated XML type. sf/df are the factories (or the Class objects of the factory).
Parameters: javaType is the Java class of the data type. xmlType the xsi:type QName of the associated XML type. sf/df are the factories (or the Class objects of the factory). force Indicates whether to add the information if already registered.
Parameters: javaType xmlType sfClass dfClass
Parameters: javaType java type to handle xmlType XML mapping sfClass class of serializer factory dfClass class of deserializer factory force
Throws: JAXRPCException - if isParameterAndReturnSpecRequired returns false, then removeAllParameters MAY throw JAXRPCException...Axis allows modification to the Call object without throwing an exception.
Parameters: name name of the property to remove
Parameters: namespaceURI URI of the encoding to use.
Parameters: yesno true if session state is desired, false if not.
Parameters: opName Operation(method) that's going to be invoked
Throws: JAXRPCException
Parameters: portName PortName in the WSDL doc to search for opName Operation(method) that's going to be invoked
Parameters: portName PortName in the WSDL doc to search for opName Operation(method) that's going to be invoked
Parameters: operation the OperationDesc to associate with this call.
Parameters: opName Name of the operation.
Parameters: operationStyle string designating style
Parameters: operationStyle
Parameters: operationUse string designating use
Parameters: operationUse
Parameters: password plain-text copy of the password
Parameters: portName Fully qualified name of the port
Parameters: portType Fully qualified name of the portType
Parameters: name Name of the property value Value of the property
See Also: Stub
There are other properties implemented in this class above and
beyond those of the JAX-RPC spec
Specifically, ATTACHMENT_ENCAPSULATION_FORMAT, CONNECTION_TIMEOUT_PROPERTY,
and TRANSPORT_NAME.
It is intended that all future Axis-specific properties will begin
with axis. or apache. To ensure integration with future versions Axis,
use different prefixes for your own properties.
Axis developers: keep this in sync with propertyNames below
ATTACHMENT_ENCAPSULATION_FORMAT TRANSPORT_NAME CONNECTION_TIMEOUT_PROPERTY
Parameters: msg the new request message.
Throws: RuntimeException containing the text of an AxisFault, if any AxisFault was thrown
Parameters: cls the desired return class.
Parameters: type QName of the return value type.
Parameters: xmlType - QName of the data type of the return value javaType - Java class of the return value
Throws: JAXRPCException - if isParameterAndReturnSpecRequired returns false, then setReturnType MAY throw JAXRPCException...Axis allows modification without throwing the exception.
Parameters: SOAPActionURI the new SOAP action URI
Parameters: soapConstants the SOAPConstants object representing the correct version
Parameters: address - Endpoint address of the target service port; specified as URI
Parameters: address URL of the target Web Service
Parameters: trans the Transport object we'll use to set up MessageContext properties.
Parameters: protocol the URL protocol (i.e. "tcp" for "tcp://" urls) transportClass the class of a Transport type which will be used for matching URLs.
Parameters: username the new user name
Parameters: useSOAPAction true if the soapAction header is to be used to help find the method to invoke, false otherwise
Returns: true if it is, false otherwise