|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.axis2.client.ServiceClient
Client access to a service. Each instance of this class is associated with a
particular AxisService, and the methods
support operations using that service. Options instances are used to
configure various aspects of the service access.
| Field Summary | |
static javax.xml.namespace.QName |
ANON_OUT_IN_OP
Operation name used for an anonymous in-out operation (meaning we sent a message and receive a response, equivalent to a WSDL In-Out operation). |
static javax.xml.namespace.QName |
ANON_OUT_ONLY_OP
Operation name used for an anonymous out-only operation (meaning we send a message with no response allowed from the service, equivalent to a WSDL In-Only operation). |
static javax.xml.namespace.QName |
ANON_ROBUST_OUT_ONLY_OP
Operation name used for an anonymous robust-out-only operation (meaning we send a message, with the only possible response a fault, equivalent to a WSDL Robust-In-Only operation). |
static java.lang.String |
ANON_SERVICE
Base name used for a service created without an existing configuration. |
| Constructor Summary | |
ServiceClient()
Create a service client by assuming an anonymous service and any other necessary information. |
|
ServiceClient(ConfigurationContext configContext,
AxisService axisService)
Create a service client configured to work with a specific AxisService. |
|
ServiceClient(ConfigurationContext configContext,
javax.wsdl.Definition wsdl4jDefinition,
javax.xml.namespace.QName wsdlServiceName,
java.lang.String portName)
This is WSDL4J based constructor to configure the Service Client/ We are going to make this policy aware |
|
ServiceClient(ConfigurationContext configContext,
java.net.URL wsdlURL,
javax.xml.namespace.QName wsdlServiceName,
java.lang.String portName)
Create a service client for WSDL service identified by the QName of the wsdl:service element in a WSDL document. |
|
| Method Summary | |
void |
addHeader(org.apache.axiom.om.OMElement header)
Add an arbitrary XML element as a header to be sent with outgoing messages. |
void |
addHeader(org.apache.axiom.soap.SOAPHeaderBlock header)
Add SOAP Header to be sent with outgoing messages. |
void |
addHeadersToEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope)
Add all configured headers to a SOAP envelope. |
void |
addStringHeader(javax.xml.namespace.QName headerName,
java.lang.String headerText)
Add a simple header consisting of some text (and a header name; duh) to be sent with interactions. |
void |
cleanup()
Clean up configuration created with this client. |
OperationClient |
createClient(javax.xml.namespace.QName operationQName)
Create an operation client with the appropriate message exchange pattern (MEP). |
void |
disengageModule(javax.xml.namespace.QName moduleName)
Disengage a module for this service client |
void |
disengageModule(java.lang.String moduleName)
Disengage a module for this service client |
void |
engageModule(javax.xml.namespace.QName moduleName)
Engage a module for this service client. |
void |
engageModule(java.lang.String moduleName)
Engage a module for this service client. |
protected void |
finalize()
|
void |
fireAndForget(org.apache.axiom.om.OMElement elem)
Directly invoke an anonymous operation with an In-Only MEP. |
void |
fireAndForget(javax.xml.namespace.QName operation,
org.apache.axiom.om.OMElement elem)
Directly invoke a named operation with an In-Only MEP. |
AxisService |
getAxisService()
Return the AxisService this is a client for. |
OperationContext |
getLastOperationContext()
Gets the last OperationContext |
EndpointReference |
getMyEPR(java.lang.String transport)
Get the endpoint reference for this client using a particular transport. |
Options |
getOptions()
Get the basic client configuration from this service interaction. |
Options |
getOverrideOptions()
Get the client configuration used to override the normal options set by an operation client. |
ServiceContext |
getServiceContext()
Get the service context. |
EndpointReference |
getTargetEPR()
Get the endpoint reference for the service. |
void |
removeHeaders()
Remove all headers for outgoing message. |
org.apache.axiom.om.OMElement |
sendReceive(org.apache.axiom.om.OMElement elem)
Directly invoke an anonymous operation with an In-Out MEP. |
org.apache.axiom.om.OMElement |
sendReceive(javax.xml.namespace.QName operationQName,
org.apache.axiom.om.OMElement xmlPayload)
Directly invoke a named operationQName with an In-Out MEP. |
void |
sendReceiveNonBlocking(org.apache.axiom.om.OMElement elem,
Callback callback)
Directly invoke an anonymous operation with an In-Out MEP without waiting for a response. |
void |
sendReceiveNonBlocking(javax.xml.namespace.QName operation,
org.apache.axiom.om.OMElement elem,
Callback callback)
Directly invoke a named operation with an In-Out MEP without waiting for a response. |
void |
sendRobust(org.apache.axiom.om.OMElement elem)
Directly invoke an anonymous operation with a Robust In-Only MEP. |
void |
sendRobust(javax.xml.namespace.QName operation,
org.apache.axiom.om.OMElement elem)
Directly invoke a named operation with a Robust In-Only MEP. |
void |
setAxisService(AxisService axisService)
Configure the ServiceClient to interact with the Web service described by the specified AxisService object. |
void |
setCachingOperationContext(boolean cachingOpContext)
Sets whether or not to cache the last OperationContext |
void |
setOptions(Options options)
Set the basic client configuration related to this service interaction. |
void |
setOverrideOptions(Options overrideOptions)
Set a client configuration to override the normal options used by an operation client. |
void |
setTargetEPR(EndpointReference targetEpr)
Set the endpoint reference for the service. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String ANON_SERVICE
public static final javax.xml.namespace.QName ANON_OUT_ONLY_OP
public static final javax.xml.namespace.QName ANON_ROBUST_OUT_ONLY_OP
public static final javax.xml.namespace.QName ANON_OUT_IN_OP
| Constructor Detail |
public ServiceClient(ConfigurationContext configContext,
AxisService axisService)
throws AxisFault
configContext - The configuration context under which this service lives (may
be null, in which case a new local one will be created)axisService - The service for which this is the client (may be
null, in which case an anonymous service will be created)
AxisFault - if something goes wrong while creating a config context (if
needed)
public ServiceClient(ConfigurationContext configContext,
javax.wsdl.Definition wsdl4jDefinition,
javax.xml.namespace.QName wsdlServiceName,
java.lang.String portName)
throws AxisFault
configContext - wsdl4jDefinition - wsdlServiceName - portName -
AxisFault
public ServiceClient(ConfigurationContext configContext,
java.net.URL wsdlURL,
javax.xml.namespace.QName wsdlServiceName,
java.lang.String portName)
throws AxisFault
configContext - The configuration context under which this service lives (may
be null, in which case a new local one will be created) *wsdlURL - The URL of the WSDL document to readwsdlServiceName - The QName of the WSDL service in the WSDL document to create a
client forportName - The name of the WSDL 1.1 port to create a client for. May be
null (if WSDL 2.0 is used or if only one port is there). .
AxisFault - if something goes wrong while creating a config context (if
needed)
public ServiceClient()
throws AxisFault
AxisFault| Method Detail |
public AxisService getAxisService()
public void setOptions(Options options)
options - (non-null)public Options getOptions()
public void setOverrideOptions(Options overrideOptions)
overrideOptions - public Options getOverrideOptions()
public void engageModule(javax.xml.namespace.QName moduleName)
throws AxisFault
moduleName - name of the module to engage
AxisFault - if something goes wrong
public void engageModule(java.lang.String moduleName)
throws AxisFault
moduleName - name of the module to engage
AxisFault - if something goes wrongpublic void disengageModule(javax.xml.namespace.QName moduleName)
moduleName - public void disengageModule(java.lang.String moduleName)
moduleName - public void addHeader(org.apache.axiom.om.OMElement header)
header - header to be sent (non-null)public void addHeader(org.apache.axiom.soap.SOAPHeaderBlock header)
header - header to be sent (non-null)public void removeHeaders()
public void addStringHeader(javax.xml.namespace.QName headerName,
java.lang.String headerText)
throws AxisFault
headerName - headerText -
AxisFault
public void sendRobust(org.apache.axiom.om.OMElement elem)
throws AxisFault
elem - XML to send
AxisFault - if something goes wrong while sending, or if a fault is
received in response (per the Robust In-Only MEP).createClient(QName)
public void sendRobust(javax.xml.namespace.QName operation,
org.apache.axiom.om.OMElement elem)
throws AxisFault
operation - name of operation to be invoked (non-null)elem - XML to send
AxisFault - if something goes wrong while sending it or if a fault is
received in response (per the Robust In-Only MEP).createClient(QName)
public void fireAndForget(org.apache.axiom.om.OMElement elem)
throws AxisFault
elem - XML to send
AxisFault - ff something goes wrong trying to send the XMLcreateClient(QName)
public void fireAndForget(javax.xml.namespace.QName operation,
org.apache.axiom.om.OMElement elem)
throws AxisFault
operation - name of operation to be invoked (non-null)elem - XML to send
AxisFault - if something goes wrong trying to send the XMLcreateClient(QName)
public org.apache.axiom.om.OMElement sendReceive(org.apache.axiom.om.OMElement elem)
throws AxisFault
elem -
AxisFaultcreateClient(QName)
public org.apache.axiom.om.OMElement sendReceive(javax.xml.namespace.QName operationQName,
org.apache.axiom.om.OMElement xmlPayload)
throws AxisFault
operationQName - name of operationQName to be invoked (non-null)xmlPayload -
AxisFault
public void sendReceiveNonBlocking(org.apache.axiom.om.OMElement elem,
Callback callback)
throws AxisFault
elem - callback -
AxisFaultcreateClient(QName)
public void sendReceiveNonBlocking(javax.xml.namespace.QName operation,
org.apache.axiom.om.OMElement elem,
Callback callback)
throws AxisFault
operation - name of operation to be invoked (non-null)elem - callback -
AxisFaultcreateClient(QName)
public OperationClient createClient(javax.xml.namespace.QName operationQName)
throws AxisFault
operationQName - qualified name of operation (local name is operation
name, namespace URI is just the empty string)
AxisFault - if the operation is not foundpublic void addHeadersToEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope)
envelope -
public EndpointReference getMyEPR(java.lang.String transport)
throws AxisFault
transport - transport name (non-null)
AxisFaultpublic EndpointReference getTargetEPR()
public void setTargetEPR(EndpointReference targetEpr)
targetEpr - public OperationContext getLastOperationContext()
public void setCachingOperationContext(boolean cachingOpContext)
public ServiceContext getServiceContext()
protected void finalize()
throws java.lang.Throwable
java.lang.Throwable
public void cleanup()
throws AxisFault
AxisFault
public void setAxisService(AxisService axisService)
throws AxisFault
axisService - the AxisService that represents the new Web service.
AxisFault - if an error occurs while configuring the ServiceClient.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||