|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.services.BaseService toolbox.services.ws.WSClientService
public class WSClientService
A convenience service implementation to develop Web Service clients.
Developers will extend or use this class to obtain a reference to a web service client using either static configuration or a toolbox.services.uddi.simple.SimpleUDDIService instance to obtain the remote service details dynamically.
WSClientService implementations must be configured with a specific XML configuration document. An example is provided with the Toolbox distribution at the following location: etc/wsClientService.xml.
Configure service implementations based on this class as singleton to avoid looking up and creating the service reference on each access of the getServiceObject method.
Nested Class Summary | |
---|---|
(package private) class |
WSClientService.WSClientPasswordCallback
WSS4J callback implementation to return the WS-Security password that must be used to access the service. |
Constructor Summary | |
---|---|
WSClientService()
Default constructor. |
Method Summary | |
---|---|
protected void |
clearMessageID()
Clear the message id from the previous method invocation. |
void |
create(java.lang.String name,
java.lang.String confHome,
ServiceEnvironment env,
XMLProperties xmlProps)
Call the parent class. |
void |
destroy()
Destroy this service. |
protected java.lang.String |
getMessageID()
Return the message id from the previous method invocation. |
java.lang.Object |
getServiceObject()
Return a reference to the service this client is accessing. |
void |
setBus(org.apache.cxf.Bus bus)
Set the CXF bus that must be used by this client instance. |
protected void |
setPassword(java.lang.String passwd)
Set the password that must be used to authenticate against the service. |
void |
setSimpleUDDIService(SimpleUDDIService uddiSvc)
The injection point for the SimpleUDDIService dependency when dynamic service lookup is employed. |
protected void |
setUser(java.lang.String user)
Set the user name that must be used to authenticate against the service. |
Methods inherited from class toolbox.services.BaseService |
---|
getConfigHome, getName, getProperties, getProperty, getXMLProperties, logConfig, logFine, logFiner, logFinest, logInfo, logSevere, logWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WSClientService()
Method Detail |
---|
public void create(java.lang.String name, java.lang.String confHome, ServiceEnvironment env, XMLProperties xmlProps) throws ServiceException
create
in interface Service
create
in class BaseService
name
- The name of the service.confHome
- The path to the configuration home directory.env
- ServiceEnvironment of this service.xmlProps
- XML configuration properties.
ServiceException
- if the service cannot be created.public void setBus(org.apache.cxf.Bus bus)
bus
- The CXF Bus instance to use.public java.lang.Object getServiceObject() throws ServiceException
NOTE: A new reference will be created everytime this method is called. To avoid this overhead only call this method once to obtain a reference to the remote service.
ServiceException
- if the service reference cannot be returned.protected java.lang.String getMessageID()
protected void clearMessageID()
protected void setUser(java.lang.String user)
Call this method before calling getServiceObject to specify or override the user name that must be used to authenticate.
user
- String containing the user name that must be used.protected void setPassword(java.lang.String passwd)
Call this method before calling getServiceObject to specify or override the password that must be used to authenticate.
passwd
- String containing the password that must be used.public void setSimpleUDDIService(SimpleUDDIService uddiSvc)
uddiSvc
- SimpleUDDIService instance.public void destroy()
destroy
in interface Service
destroy
in class BaseService
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |