Interface IWSProxyFactory
- All Known Implementing Classes:
WSProxyFactory
public interface IWSProxyFactory
IWSProxyFactory is responsible for instantiating
the dynamic proxies which will in turn invoke target webservices
-
Method Summary
Modifier and TypeMethodDescriptionint
Hint for theIWSCacheManager
long
Hint for theIWSCacheManager
Get the time-to-live of cached web service results.getProxy
(Class<?> clazz, String wsdlURL, String[] mapURLs, String endPointURL, boolean useCache, boolean reuseSession) getProxy
(Class<?> clazz, String wsdlURL, String[] mapURLs, String endPointURL, boolean useCache, boolean reuseSession, int socketTimeout, AuthCredentials authCredentials) This will obtain a Proxy that can be used for invoking the target webServicegetProxy
(Class<?> clazz, String wsdlURL, String[] mapURLs, String endPointURL, boolean useCache, boolean reuseSession, AuthCredentials authCredentials) getProxy
(Class<?> clazz, String wsdlURL, String endPointURL, boolean useCache, boolean reuseSession) getProxy
(Class<?> clazz, String wsdlURL, String endPointURL, boolean useCache, boolean reuseSession, int socketTimeout, AuthCredentials authCredentials) This will obtain a Proxy that can be used for invoking the target webServicegetProxy
(Class<?> clazz, String wsdlURL, String endPointURL, boolean useCache, boolean reuseSession, AuthCredentials authCredentials) int
Get the default socket timeout.void
setCacheCapacity
(int capacity) Hint for theIWSCacheManager
Set the initial capacity of the web service results cachevoid
setCacheTimeout
(long ms) Hint for theIWSCacheManager
Sets the time-to-live for items in the web service results cachevoid
setSocketTimeout
(int socketTimeout) Set the default socket timeout.
-
Method Details
-
getProxy
IWSClientProxy getProxy(Class<?> clazz, String wsdlURL, String endPointURL) throws WSClientException -
getProxy
IWSClientProxy getProxy(Class<?> clazz, String wsdlURL, String[] mapURLs, String endPointURL) throws WSClientException -
getProxy
IWSClientProxy getProxy(Class<?> clazz, String wsdlURL, String endPointURL, boolean useCache) throws WSClientException -
getProxy
IWSClientProxy getProxy(Class<?> clazz, String wsdlURL, String[] mapURLs, String endPointURL, boolean useCache) throws WSClientException -
getProxy
IWSClientProxy getProxy(Class<?> clazz, String wsdlURL, String endPointURL, boolean useCache, boolean reuseSession) throws WSClientException -
getProxy
IWSClientProxy getProxy(Class<?> clazz, String wsdlURL, String[] mapURLs, String endPointURL, boolean useCache, boolean reuseSession) throws WSClientException -
getProxy
IWSClientProxy getProxy(Class<?> clazz, String wsdlURL, String endPointURL, boolean useCache, boolean reuseSession, AuthCredentials authCredentials) throws WSClientException -
getProxy
IWSClientProxy getProxy(Class<?> clazz, String wsdlURL, String[] mapURLs, String endPointURL, boolean useCache, boolean reuseSession, AuthCredentials authCredentials) throws WSClientException -
getProxy
IWSClientProxy getProxy(Class<?> clazz, String wsdlURL, String endPointURL, boolean useCache, boolean reuseSession, int socketTimeout, AuthCredentials authCredentials) throws WSClientException This will obtain a Proxy that can be used for invoking the target webService- Parameters:
clazz
- the interface of the target webServicewsdlURL
- the location of the WSDL describing the webServiceendPointURL
- the endpoint URL of the webServiceuseCache
- whether to use results from the cache if presentreuseSession
- if a previous session is available for the specified user, whether to reuse itsocketTimeout
- timeout for socket connections (in ms)authCredentials
- to connect to withnull
for Default System User- Returns:
- any results from the invocation
- Throws:
WSClientException
- Note, if you aren't reusing a session, then the cache won't be availableIMyWebService myWebService = (IMyWebService)WSClient.getProxy(IMyWebService.class, wsdlURL, endPointURL); Object results = myWebService.runWebService(myParams);
-
getProxy
IWSClientProxy getProxy(Class<?> clazz, String wsdlURL, String[] mapURLs, String endPointURL, boolean useCache, boolean reuseSession, int socketTimeout, AuthCredentials authCredentials) throws WSClientException This will obtain a Proxy that can be used for invoking the target webService- Parameters:
clazz
- the interface of the target webServicewsdlURL
- the location of the wsdl describing the webServicemapURLs
- String array of URLs describing the location of any associated map filesendPointURL
- the endpoint of the webServiceuseCache
- whether to use results from the cache if presentreuseSession
- if a previous session is available for the specified user, whether to reuse itsocketTimeout
- timeout for socket connections (in ms)authCredentials
- to connect to withnull
for Default System User- Returns:
- any results from the invocation
- Throws:
WSClientException
- Note, if you aren't reusing a session, then the cache won't be available Note, if the wsdl or map URLs specify the custom protocol 'classpath:', the file will be extracted from the classpath and stored as a local file in a temp subdirectory.IMyWebService myWebService = (IMyWebService)WSClient.getProxy(IMyWebService.class, wsdlURL, endPointURL); Object results = myWebService.runWebService(myParams);
-
setCacheTimeout
void setCacheTimeout(long ms) Hint for theIWSCacheManager
Sets the time-to-live for items in the web service results cache -
getCacheTimeout
long getCacheTimeout()Hint for theIWSCacheManager
Get the time-to-live of cached web service results. If caching is enabled, any cache entries older than this timeout value are considered stale.- Returns:
- the cache entry time-to-live, measured in milliseconds
-
getCacheCapacity
int getCacheCapacity()Hint for theIWSCacheManager
- Returns:
- get the current maximum capacity of the web service results cache
-
setCacheCapacity
void setCacheCapacity(int capacity) Hint for theIWSCacheManager
Set the initial capacity of the web service results cache- Parameters:
initial
- size (number of entries) in the web service results cache
-
getSocketTimeout
int getSocketTimeout()Get the default socket timeout. This is the number of milliseconds the web service request will wait before it gives up waiting for a response from the web service provider. This value is set on theIWSClientProxy
created bygetProxy(Class, String, String[], String, boolean, boolean, int, AuthCredentials)
- Returns:
- the socket timeout value in milliseconds
-
setSocketTimeout
void setSocketTimeout(int socketTimeout) Set the default socket timeout. This is the number of milliseconds the web service request will wait before it gives up waiting for a response from the web service provider. This value is set on theIWSClientProxy
created bygetProxy(Class, String, String[], String, boolean, boolean, int, AuthCredentials)
- Parameters:
the
- socket timeout value in milliseconds
-