com.webmethods.caf.wsclient.proxy
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
 int getCacheCapacity()
          Hint for the IWSCacheManager
 long getCacheTimeout()
          Hint for the IWSCacheManager Get the time-to-live of cached web service results.
 IWSClientProxy getProxy(Class clazz, String wsdlURL, String endPointURL)
           
 IWSClientProxy getProxy(Class clazz, String wsdlURL, String[] mapURLs, String endPointURL)
           
 IWSClientProxy getProxy(Class clazz, String wsdlURL, String[] mapURLs, String endPointURL, boolean useCache)
           
 IWSClientProxy getProxy(Class clazz, String wsdlURL, String[] mapURLs, String endPointURL, boolean useCache, boolean reuseSession)
           
 IWSClientProxy getProxy(Class clazz, String wsdlURL, String[] mapURLs, String endPointURL, boolean useCache, boolean reuseSession, AuthCredentials authCredentials)
           
 IWSClientProxy 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 webService
 IWSClientProxy getProxy(Class clazz, String wsdlURL, String endPointURL, boolean useCache)
           
 IWSClientProxy getProxy(Class clazz, String wsdlURL, String endPointURL, boolean useCache, boolean reuseSession)
           
 IWSClientProxy getProxy(Class clazz, String wsdlURL, String endPointURL, boolean useCache, boolean reuseSession, AuthCredentials authCredentials)
           
 IWSClientProxy 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 webService
 int getSocketTimeout()
          Get the default socket timeout.
 void setCacheCapacity(int capacity)
          Hint for the IWSCacheManager Set the initial capacity of the web service results cache
 void setCacheTimeout(long ms)
          Hint for the IWSCacheManager Sets the time-to-live for items in the web service results cache
 void setSocketTimeout(int socketTimeout)
          Set the default socket timeout.
 

Method Detail

getProxy

IWSClientProxy getProxy(Class clazz,
                        String wsdlURL,
                        String endPointURL)
                        throws WSClientException
Throws:
WSClientException
See Also:
IWSProxyFactory.getProxy(Class, String, String, boolean, boolean, int, com.webmethods.caf.wsclient.AuthCredentials)

getProxy

IWSClientProxy getProxy(Class clazz,
                        String wsdlURL,
                        String[] mapURLs,
                        String endPointURL)
                        throws WSClientException
Throws:
WSClientException
See Also:
IWSProxyFactory.getProxy(Class, String, String[], String, boolean, boolean, int, com.webmethods.caf.wsclient.AuthCredentials)

getProxy

IWSClientProxy getProxy(Class clazz,
                        String wsdlURL,
                        String endPointURL,
                        boolean useCache)
                        throws WSClientException
Throws:
WSClientException
See Also:
IWSProxyFactory.getProxy(Class, String, String, boolean, boolean, int, com.webmethods.caf.wsclient.AuthCredentials)

getProxy

IWSClientProxy getProxy(Class clazz,
                        String wsdlURL,
                        String[] mapURLs,
                        String endPointURL,
                        boolean useCache)
                        throws WSClientException
Throws:
WSClientException
See Also:
IWSProxyFactory.getProxy(Class, String, String[], String, boolean, boolean, int, com.webmethods.caf.wsclient.AuthCredentials)

getProxy

IWSClientProxy getProxy(Class clazz,
                        String wsdlURL,
                        String endPointURL,
                        boolean useCache,
                        boolean reuseSession)
                        throws WSClientException
Throws:
WSClientException
See Also:
IWSProxyFactory.getProxy(Class, String, String, boolean, boolean, int, com.webmethods.caf.wsclient.AuthCredentials)

getProxy

IWSClientProxy getProxy(Class clazz,
                        String wsdlURL,
                        String[] mapURLs,
                        String endPointURL,
                        boolean useCache,
                        boolean reuseSession)
                        throws WSClientException
Throws:
WSClientException
See Also:
IWSProxyFactory.getProxy(Class, String, String[], String, boolean, boolean, int, com.webmethods.caf.wsclient.AuthCredentials)

getProxy

IWSClientProxy getProxy(Class clazz,
                        String wsdlURL,
                        String endPointURL,
                        boolean useCache,
                        boolean reuseSession,
                        AuthCredentials authCredentials)
                        throws WSClientException
Throws:
WSClientException
See Also:
IWSProxyFactory.getProxy(Class, String, String, boolean, boolean, int, com.webmethods.caf.wsclient.AuthCredentials)

getProxy

IWSClientProxy getProxy(Class clazz,
                        String wsdlURL,
                        String[] mapURLs,
                        String endPointURL,
                        boolean useCache,
                        boolean reuseSession,
                        AuthCredentials authCredentials)
                        throws WSClientException
Throws:
WSClientException
See Also:
IWSProxyFactory.getProxy(Class, String, String[], String, boolean, boolean, int, com.webmethods.caf.wsclient.AuthCredentials)

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 webService
wsdlURL - the location of the WSDL describing the webService
endPointURL - the endpoint URL of the webService
useCache - whether to use results from the cache if present
reuseSession - if a previous session is available for the specified user, whether to reuse it
socketTimeout - timeout for socket connections (in ms)
authCredentials - to connect to with null 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 IMyWebService 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 webService
wsdlURL - the location of the wsdl describing the webService
mapURLs - String array of URLs describing the location of any associated map files
endPointURL - the endpoint of the webService
useCache - whether to use results from the cache if present
reuseSession - if a previous session is available for the specified user, whether to reuse it
socketTimeout - timeout for socket connections (in ms)
authCredentials - to connect to with null 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 the IWSCacheManager Sets the time-to-live for items in the web service results cache


getCacheTimeout

long getCacheTimeout()
Hint for the IWSCacheManager 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 the IWSCacheManager

Returns:
get the current maximum capacity of the web service results cache

setCacheCapacity

void setCacheCapacity(int capacity)
Hint for the IWSCacheManager 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 the IWSClientProxy created by IWSProxyFactory.getProxy(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 the IWSClientProxy created by IWSProxyFactory.getProxy(Class, String, String[], String, boolean, boolean, int, AuthCredentials)

Parameters:
the - socket timeout value in milliseconds