Java Doc for ServiceClient.java in  » Web-Services-AXIS2 » kernal » org » apache » axis2 » client » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Services AXIS2 » kernal » org.apache.axis2.client 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.axis2.client.ServiceClient

All known Subclasses:   org.apache.axis2.dataretrieval.client.MexClient,
ServiceClient
public class ServiceClient (Code)
Client access to a service. Each instance of this class is associated with a particular org.apache.axis2.description.AxisService , and the methods support operations using that service. Options instances are used to configure various aspects of the service access.


Field Summary
final public static  QNameANON_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).
final public static  QNameANON_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).
final public static  QNameANON_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).
final public static  StringANON_SERVICE
     Base name used for a service created without an existing configuration.
final protected static  Loglog
    

Constructor Summary
public  ServiceClient(ConfigurationContext configContext, AxisService axisService)
     Create a service client configured to work with a specific AxisService. If this service is already in the world that's handed in (in the form of a ConfigurationContext) then I will happily work in it.
public  ServiceClient(ConfigurationContext configContext, Definition wsdl4jDefinition, QName wsdlServiceName, String portName)
    
public  ServiceClient(ConfigurationContext configContext, URL wsdlURL, QName wsdlServiceName, String portName)
     Create a service client for WSDL service identified by the QName of the wsdl:service element in a WSDL document.
Parameters:
  configContext - The configuration context under which this service lives (maybe null, in which case a new local one will be created) *
Parameters:
  wsdlURL - The URL of the WSDL document to read
Parameters:
  wsdlServiceName - The QName of the WSDL service in the WSDL document to create aclient for
Parameters:
  portName - The name of the WSDL 1.1 port to create a client for.
public  ServiceClient()
     Create a service client by assuming an anonymous service and any other necessary information.

Method Summary
public  voidaddHeader(OMElement header)
     Add an arbitrary XML element as a header to be sent with outgoing messages.
public  voidaddHeader(SOAPHeaderBlock header)
     Add SOAP Header to be sent with outgoing messages.
public  voidaddHeadersToEnvelope(SOAPEnvelope envelope)
     Add all configured headers to a SOAP envelope.
public  voidaddStringHeader(QName headerName, String headerText)
     Add a simple header containing some text to be sent with interactions.
public  voidcleanup()
     Clean up configuration created with this client.
public  voidcleanupTransport()
    
public  OperationClientcreateClient(QName operationQName)
     Create an operation client with the appropriate message exchange pattern (MEP).
public  voiddisengageModule(QName moduleName)
    
public  voiddisengageModule(String moduleName)
    
public  voidengageModule(QName moduleName)
     Engage a module for this service client.
public  voidengageModule(String moduleName)
     Engage a module for this service client.
protected  voidfinalize()
    
public  voidfireAndForget(OMElement elem)
     Directly invoke an anonymous operation with an In-Only MEP.
public  voidfireAndForget(QName operation, OMElement elem)
     Directly invoke a named operation with an In-Only MEP.
public  AxisConfigurationgetAxisConfiguration()
     Returns the AxisConfiguration associated with the client.
public  AxisServicegetAxisService()
     Return the AxisService this is a client for.
public  OperationContextgetLastOperationContext()
    
public  EndpointReferencegetMyEPR(String transport)
     Get the endpoint reference for this client using a particular transport.
public  OptionsgetOptions()
     Get the basic client configuration from this service interaction.
public  OptionsgetOverrideOptions()
     Get the client configuration used to override the normal options set by an operation client.
public  ServiceContextgetServiceContext()
     Get the service context.
public  EndpointReferencegetTargetEPR()
     Get the endpoint reference for the service.
public  voidremoveHeaders()
     Remove all headers for outgoing message.
public  OMElementsendReceive(OMElement elem)
     Directly invoke an anonymous operation with an In-Out MEP.
public  OMElementsendReceive(QName operationQName, OMElement xmlPayload)
     Directly invoke a named operationQName with an In-Out MEP.
public  voidsendReceiveNonBlocking(OMElement elem, Callback callback)
     Directly invoke an anonymous operation with an In-Out MEP without waiting for a response.
public  voidsendReceiveNonBlocking(OMElement elem, AxisCallback callback)
     Directly invoke an anonymous operation with an In-Out MEP without waiting for a response.
public  voidsendReceiveNonBlocking(QName operation, OMElement elem, Callback callback)
     Directly invoke a named operation with an In-Out MEP without waiting for a response.
public  voidsendReceiveNonBlocking(QName operation, OMElement elem, AxisCallback callback)
     Directly invoke a named operation with an In-Out MEP without waiting for a response.
public  voidsendRobust(OMElement elem)
     Directly invoke an anonymous operation with a Robust In-Only MEP.
public  voidsendRobust(QName operation, OMElement elem)
     Directly invoke a named operation with a Robust In-Only MEP.
public  voidsetAxisService(AxisService axisService)
     Configure the ServiceClient to interact with the Web service described by the specified AxisService object.
public  voidsetCachingOperationContext(boolean cachingOpContext)
    
public  voidsetOptions(Options options)
     Set the basic client configuration related to this service interaction.
public  voidsetOverrideOptions(Options overrideOptions)
     Set a client configuration to override the normal options used by an operation client.
public  voidsetTargetEPR(EndpointReference targetEpr)
     Set the endpoint reference for the service.

Field Detail
ANON_OUT_IN_OP
final public static QName ANON_OUT_IN_OP(Code)
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).



ANON_OUT_ONLY_OP
final public static QName ANON_OUT_ONLY_OP(Code)
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).



ANON_ROBUST_OUT_ONLY_OP
final public static QName ANON_ROBUST_OUT_ONLY_OP(Code)
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).



ANON_SERVICE
final public static String ANON_SERVICE(Code)
Base name used for a service created without an existing configuration.



log
final protected static Log log(Code)




Constructor Detail
ServiceClient
public ServiceClient(ConfigurationContext configContext, AxisService axisService) throws AxisFault(Code)
Create a service client configured to work with a specific AxisService. If this service is already in the world that's handed in (in the form of a ConfigurationContext) then I will happily work in it. If not I will create a small little virtual world and live there.
Parameters:
  configContext - The configuration context under which this service lives (maybe null, in which case a new local one will be created)
Parameters:
  axisService - The service for which this is the client (may benull, in which case an anonymous service will be created)
throws:
  AxisFault - if something goes wrong while creating a config context (ifneeded)



ServiceClient
public ServiceClient(ConfigurationContext configContext, Definition wsdl4jDefinition, QName wsdlServiceName, String portName) throws AxisFault(Code)
This is WSDL4J based constructor to configure the Service Client/ TODO: make this policy aware
Parameters:
  configContext - active ConfigurationContext
Parameters:
  wsdl4jDefinition - the WSDL we're going to be using to configure ourselves
Parameters:
  wsdlServiceName - QName of the WSDL service we'd like to access
Parameters:
  portName - name of the WSDL port we'd like to access
throws:
  AxisFault - in case of error



ServiceClient
public ServiceClient(ConfigurationContext configContext, URL wsdlURL, QName wsdlServiceName, String portName) throws AxisFault(Code)
Create a service client for WSDL service identified by the QName of the wsdl:service element in a WSDL document.
Parameters:
  configContext - The configuration context under which this service lives (maybe null, in which case a new local one will be created) *
Parameters:
  wsdlURL - The URL of the WSDL document to read
Parameters:
  wsdlServiceName - The QName of the WSDL service in the WSDL document to create aclient for
Parameters:
  portName - The name of the WSDL 1.1 port to create a client for. May benull (if WSDL 2.0 is used or if only one port is there). .
throws:
  AxisFault - if something goes wrong while creating a config context (ifneeded)



ServiceClient
public ServiceClient() throws AxisFault(Code)
Create a service client by assuming an anonymous service and any other necessary information.
throws:
  AxisFault - in case of error




Method Detail
addHeader
public void addHeader(OMElement header)(Code)
Add an arbitrary XML element as a header to be sent with outgoing messages.
Parameters:
  header - header to be sent (non-null)



addHeader
public void addHeader(SOAPHeaderBlock header)(Code)
Add SOAP Header to be sent with outgoing messages.
Parameters:
  header - header to be sent (non-null)



addHeadersToEnvelope
public void addHeadersToEnvelope(SOAPEnvelope envelope)(Code)
Add all configured headers to a SOAP envelope.
Parameters:
  envelope - the SOAPEnvelope in which to write the headers



addStringHeader
public void addStringHeader(QName headerName, String headerText) throws AxisFault(Code)
Add a simple header containing some text to be sent with interactions.
Parameters:
  headerName - name of header to add
Parameters:
  headerText - text content for header
throws:
  AxisFault - in case of error



cleanup
public void cleanup() throws AxisFault(Code)
Clean up configuration created with this client. Call this method when you're done using the client, in order to discard any associated resources.
throws:
  AxisFault - in case of error



cleanupTransport
public void cleanupTransport() throws AxisFault(Code)



createClient
public OperationClient createClient(QName operationQName) throws AxisFault(Code)
Create an operation client with the appropriate message exchange pattern (MEP). This method creates a full-function MEP client which can be used to exchange messages for a specific operation. It configures the constructed operation client to use the current normal and override options. This method is used internally, and also by generated client stub code.
Parameters:
  operationQName - qualified name of operation (local name is operationname, namespace URI is just the empty string) client configured to talk to the given operation
throws:
  AxisFault - if the operation is not found



disengageModule
public void disengageModule(QName moduleName)(Code)
Disengage a module for this service client
Parameters:
  moduleName - name of Module to disengage



disengageModule
public void disengageModule(String moduleName)(Code)
Disengage a module for this service client
Parameters:
  moduleName - name of Module to disengage



engageModule
public void engageModule(QName moduleName) throws AxisFault(Code)
Engage a module for this service client.
Parameters:
  moduleName - name of the module to engage
throws:
  AxisFault - if something goes wrong



engageModule
public void engageModule(String moduleName) throws AxisFault(Code)
Engage a module for this service client.
Parameters:
  moduleName - name of the module to engage
throws:
  AxisFault - if something goes wrong



finalize
protected void finalize() throws Throwable(Code)



fireAndForget
public void fireAndForget(OMElement elem) throws AxisFault(Code)
Directly invoke an anonymous operation with an In-Only MEP. This method just sends your supplied XML without the possibility of any response from the service (even an error - though you can still get client-side errors such as "Host not found"). For more control, you can instead create a client for the operation and use that client to execute the send.
Parameters:
  elem - XML to send
throws:
  AxisFault - ff something goes wrong trying to send the XML
See Also:   ServiceClient.createClient(QName)



fireAndForget
public void fireAndForget(QName operation, OMElement elem) throws AxisFault(Code)
Directly invoke a named operation with an In-Only MEP. This method just sends your supplied XML without the possibility of any response from the service (even an error - though you can still get client-side errors such as "Host not found"). For more control, you can instead create a client for the operation and use that client to execute the send.
Parameters:
  operation - name of operation to be invoked (non-null)
Parameters:
  elem - XML to send
throws:
  AxisFault - if something goes wrong trying to send the XML
See Also:   ServiceClient.createClient(QName)



getAxisConfiguration
public AxisConfiguration getAxisConfiguration()(Code)
Returns the AxisConfiguration associated with the client.



getAxisService
public AxisService getAxisService()(Code)
Return the AxisService this is a client for. This is primarily useful when the AxisService is created anonymously or from WSDL as otherwise the user had the AxisService to start with. the axisService



getLastOperationContext
public OperationContext getLastOperationContext()(Code)
Gets the last OperationContext the last OperationContext that was invoked by this ServiceClient



getMyEPR
public EndpointReference getMyEPR(String transport) throws AxisFault(Code)
Get the endpoint reference for this client using a particular transport.
Parameters:
  transport - transport name (non-null) local endpoint
throws:
  AxisFault - in case of error



getOptions
public Options getOptions()(Code)
Get the basic client configuration from this service interaction. options



getOverrideOptions
public Options getOverrideOptions()(Code)
Get the client configuration used to override the normal options set by an operation client. override options



getServiceContext
public ServiceContext getServiceContext()(Code)
Get the service context. context



getTargetEPR
public EndpointReference getTargetEPR()(Code)
Get the endpoint reference for the service. service endpoint



removeHeaders
public void removeHeaders()(Code)
Remove all headers for outgoing message.



sendReceive
public OMElement sendReceive(OMElement elem) throws AxisFault(Code)
Directly invoke an anonymous operation with an In-Out MEP. This method sends your supplied XML and receives a response. For more control, you can instead create a client for the operation and use that client to execute the exchange.
Parameters:
  elem - the data to send (becomes the content of SOAP body) response
throws:
  AxisFault - in case of error
See Also:   ServiceClient.createClient(QName)



sendReceive
public OMElement sendReceive(QName operationQName, OMElement xmlPayload) throws AxisFault(Code)
Directly invoke a named operationQName with an In-Out MEP. This method sends your supplied XML and receives a response. For more control, you can instead create a client for the operationQName and use that client to execute the exchange.
Parameters:
  operationQName - name of operationQName to be invoked (non-null)
Parameters:
  xmlPayload - the data to send (becomes the content of SOAP body) response OMElement
throws:
  AxisFault - in case of error



sendReceiveNonBlocking
public void sendReceiveNonBlocking(OMElement elem, Callback callback) throws AxisFault(Code)
Directly invoke an anonymous operation with an In-Out MEP without waiting for a response. This method sends your supplied XML with response notification to your callback handler. For more control, you can instead create a client for the operation and use that client to execute the exchange.
Parameters:
  elem - the data to send (becomes the content of SOAP body)
Parameters:
  callback - a Callback which will be notified upon completion
throws:
  AxisFault - in case of error
See Also:   ServiceClient.createClient(QName)



sendReceiveNonBlocking
public void sendReceiveNonBlocking(OMElement elem, AxisCallback callback) throws AxisFault(Code)
Directly invoke an anonymous operation with an In-Out MEP without waiting for a response. This method sends your supplied XML with response notification to your callback handler. For more control, you can instead create a client for the operation and use that client to execute the exchange.
Parameters:
  elem - the data to send (becomes the content of SOAP body)
Parameters:
  callback - a Callback which will be notified upon completion
throws:
  AxisFault - in case of error
See Also:   ServiceClient.createClient(QName)



sendReceiveNonBlocking
public void sendReceiveNonBlocking(QName operation, OMElement elem, Callback callback) throws AxisFault(Code)
Directly invoke a named operation with an In-Out MEP without waiting for a response. This method sends your supplied XML with response notification to your callback handler. For more control, you can instead create a client for the operation and use that client to execute the exchange.
Parameters:
  operation - name of operation to be invoked (non-null)
Parameters:
  elem - the data to send (becomes the content of SOAP body)
Parameters:
  callback - a Callback which will be notified upon completion
throws:
  AxisFault - in case of error
See Also:   ServiceClient.createClient(QName)



sendReceiveNonBlocking
public void sendReceiveNonBlocking(QName operation, OMElement elem, AxisCallback callback) throws AxisFault(Code)
Directly invoke a named operation with an In-Out MEP without waiting for a response. This method sends your supplied XML with response notification to your callback handler. For more control, you can instead create a client for the operation and use that client to execute the exchange.
Parameters:
  operation - name of operation to be invoked (non-null)
Parameters:
  elem - the data to send (becomes the content of SOAP body)
Parameters:
  callback - a Callback which will be notified upon completion
throws:
  AxisFault - in case of error
See Also:   ServiceClient.createClient(QName)



sendRobust
public void sendRobust(OMElement elem) throws AxisFault(Code)
Directly invoke an anonymous operation with a Robust In-Only MEP. This method just sends your supplied XML and possibly receives a fault. For more control, you can instead create a client for the operation and use that client to execute the send.
Parameters:
  elem - XML to send
throws:
  AxisFault - if something goes wrong while sending, or if a fault isreceived in response (per the Robust In-Only MEP).
See Also:   ServiceClient.createClient(QName)



sendRobust
public void sendRobust(QName operation, OMElement elem) throws AxisFault(Code)
Directly invoke a named operation with a Robust In-Only MEP. This method just sends your supplied XML and possibly receives a fault. For more control, you can instead create a client for the operation and use that client to execute the send.
Parameters:
  operation - name of operation to be invoked (non-null)
Parameters:
  elem - XML to send
throws:
  AxisFault - if something goes wrong while sending it or if a fault isreceived in response (per the Robust In-Only MEP).
See Also:   ServiceClient.createClient(QName)



setAxisService
public void setAxisService(AxisService axisService) throws AxisFault(Code)
Configure the ServiceClient to interact with the Web service described by the specified AxisService object.
Parameters:
  axisService - the AxisService that represents the new Web service.
throws:
  AxisFault - if an error occurs while configuring the ServiceClient.



setCachingOperationContext
public void setCachingOperationContext(boolean cachingOpContext)(Code)
Sets whether or not to cache the last OperationContext
Parameters:
  cachingOpContext - true if we should hold onto the last active OperationContext



setOptions
public void setOptions(Options options)(Code)
Set the basic client configuration related to this service interaction.
Parameters:
  options - (non-null)



setOverrideOptions
public void setOverrideOptions(Options overrideOptions)(Code)
Set a client configuration to override the normal options used by an operation client. Any values set in this configuration will be used for each client, with the standard values for the client still used for any values not set in the override configuration.
Parameters:
  overrideOptions - the Options to use



setTargetEPR
public void setTargetEPR(EndpointReference targetEpr)(Code)
Set the endpoint reference for the service.
Parameters:
  targetEpr - the EPR this ServiceClient should target



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.