org.jboss.wise.core.client.factories
Class WSDynamicClientFactory

java.lang.Object
  extended by org.jboss.wise.core.client.factories.WSDynamicClientFactory
Direct Known Subclasses:
ReflectionWSDynamicClientFactory

@ThreadSafe
public abstract class WSDynamicClientFactory
extends java.lang.Object

WSDynamicClientFactory is a singleton containing a WSDynamicClient cache. It's able to create WSDynamicCient objects, and init then using WiseProperties using wise-core.properties find in classpath as default. This default properties may be overridden using setWiseProperties method.

Author:
Stefano Maestri, stefano.maestri@javalinux.it

Constructor Summary
WSDynamicClientFactory()
           
 
Method Summary
abstract  WSDynamicClientBuilder createBuilder()
           
 WSDynamicClient getClient(java.lang.String wsdlURL)
           
 WSDynamicClient getClient(java.lang.String wsdlURL, java.util.List<java.io.File> bindings, java.io.File catelog)
           
 WSDynamicClient getClient(java.lang.String wsdlURL, java.lang.String userName, java.lang.String password)
          Return an instance of WSDynamicClient taken from cache if possible, generate and initialise if not.
 WSDynamicClient getClient(java.lang.String wsdlURL, java.lang.String userName, java.lang.String password, java.lang.String targetPackage, java.util.List<java.io.File> bindings, java.io.File catelog)
           
 WiseClientConfiguration getConfig()
           
static WSDynamicClientFactory getInstance()
           
static void initialise()
          Provide a method to clean up cached thing when Wise is integrated with JBoss or other container
 void setConfig(WiseClientConfiguration config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSDynamicClientFactory

public WSDynamicClientFactory()
Method Detail

initialise

public static void initialise()
Provide a method to clean up cached thing when Wise is integrated with JBoss or other container


getInstance

public static WSDynamicClientFactory getInstance()
                                          throws MCKernelUnavailableException
Throws:
MCKernelUnavailableException

getClient

public WSDynamicClient getClient(java.lang.String wsdlURL)
                          throws java.lang.IllegalStateException,
                                 WiseConnectionException,
                                 WiseRuntimeException
Throws:
java.lang.IllegalStateException
WiseConnectionException
WiseRuntimeException

getClient

public WSDynamicClient getClient(java.lang.String wsdlURL,
                                 java.lang.String userName,
                                 java.lang.String password)
                          throws java.lang.IllegalStateException,
                                 WiseConnectionException,
                                 WiseRuntimeException
Return an instance of WSDynamicClient taken from cache if possible, generate and initialise if not.

Parameters:
wsdlURL - The URL to retrive wsdl of webservice called
userName - we support HTTP BASIC Auth protected wsdls: this is username used for authentication
password - we support HTTP BASIC Auth protected wsdls: this is password used for authentication
Returns:
an instance of WSDynamicClient already initialized, ready to call endpoints
Throws:
java.lang.IllegalStateException
WiseConnectionException - thrown in case wsdl isn't accessible at given URL
WiseRuntimeException

getClient

public WSDynamicClient getClient(java.lang.String wsdlURL,
                                 java.util.List<java.io.File> bindings,
                                 java.io.File catelog)
                          throws java.lang.IllegalStateException,
                                 WiseConnectionException,
                                 WiseRuntimeException
Throws:
java.lang.IllegalStateException
WiseConnectionException
WiseRuntimeException

getClient

public WSDynamicClient getClient(java.lang.String wsdlURL,
                                 java.lang.String userName,
                                 java.lang.String password,
                                 java.lang.String targetPackage,
                                 java.util.List<java.io.File> bindings,
                                 java.io.File catelog)
                          throws java.lang.IllegalStateException,
                                 WiseConnectionException,
                                 WiseRuntimeException
Throws:
java.lang.IllegalStateException
WiseConnectionException
WiseRuntimeException

getConfig

public final WiseClientConfiguration getConfig()

setConfig

public final void setConfig(WiseClientConfiguration config)

createBuilder

public abstract WSDynamicClientBuilder createBuilder()