groovyx.net.ws
Class WSClient

java.lang.Object
  extended by groovy.lang.GroovyObjectSupport
      extended by groovyx.net.ws.AbstractCXFWSClient
          extended by groovyx.net.ws.WSClient
All Implemented Interfaces:
groovy.lang.GroovyObject, IWSClient<org.apache.cxf.endpoint.Client>

public class WSClient
extends AbstractCXFWSClient

A Webservice client using the cxf-framework dynamic client factory.

Since:
0.1
Author:
Dennis Bayer, Tog

Field Summary
protected  java.lang.ClassLoader classloader
          The ClassLoader to use to generate classes from WSDL.
protected  java.net.URL url
          The URL of the WSDL-file.
 
Fields inherited from class groovyx.net.ws.AbstractCXFWSClient
basicAuthHelper, client, connectionTimeoutHelper, mtomHelper, proxyHelper, soapHelper, sslHelper
 
Constructor Summary
WSClient(java.lang.String wsdlLocation, java.lang.ClassLoader classloader)
          Default constructor.
WSClient(java.lang.String wsdlLocation, java.lang.ClassLoader classloader, SoapVersion soapVersion)
          Default constructor.
 
Method Summary
 void initialize()
          Initializes the default configurations for ssl, http basic authentication and a proxy.
 void setBasicAuthentication(java.lang.String name, java.lang.String password)
          Set the properties of the basic authentication.
 void setConnectionTimeout(long timeout)
           
 void setMtom(boolean isMtom)
           
 void setPreferredSoapVersion(SoapVersion soapVersion)
           
 void setProxyProperties(java.util.Map<java.lang.String,java.lang.String> proxyProperties)
          Set the properties of the proxy.
 void setSSLProperties(java.util.Map<java.lang.String,java.lang.String> sslProperties)
          Set the properties of the ssl connection.
 
Methods inherited from class groovyx.net.ws.AbstractCXFWSClient
create, createClient, getBindingOperationInfo, getLogger, getServiceNamespaceURI, invokeMethod, parseResponse
 
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, getProperty, setMetaClass, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

protected java.net.URL url
The URL of the WSDL-file.


classloader

protected java.lang.ClassLoader classloader
The ClassLoader to use to generate classes from WSDL.

Constructor Detail

WSClient

public WSClient(java.lang.String wsdlLocation,
                java.lang.ClassLoader classloader)
Default constructor.

Parameters:
wsdlLocation - The url of the wsdl-file
classloader - The classoader

WSClient

public WSClient(java.lang.String wsdlLocation,
                java.lang.ClassLoader classloader,
                SoapVersion soapVersion)
Default constructor.

Parameters:
wsdlLocation - The url of the wsdl-file
classloader - The classoader
soapVersion - The preferred SOAP version
Method Detail

initialize

public void initialize()
Initializes the default configurations for ssl, http basic authentication and a proxy. If no properties were set previously, the standard properties of the respective configurations will be used.


setProxyProperties

public void setProxyProperties(java.util.Map<java.lang.String,java.lang.String> proxyProperties)
Set the properties of the proxy.

Parameters:
proxyProperties - The map containing the properties.
See Also:
AbstractSettingHelper.setProperties(Map)

setSSLProperties

public void setSSLProperties(java.util.Map<java.lang.String,java.lang.String> sslProperties)
Set the properties of the ssl connection.

Parameters:
sslProperties - The map containing the properties.
See Also:
AbstractSettingHelper.setProperties(Map)

setBasicAuthentication

public void setBasicAuthentication(java.lang.String name,
                                   java.lang.String password)
Set the properties of the basic authentication.

Parameters:
name - The username
password - The password
See Also:
BasicAuthenticationHelper.setBasicAuthentication(String, String)

setMtom

public void setMtom(boolean isMtom)
Parameters:
isMtom - true if mtom is enabled, otherwise false.

setConnectionTimeout

public void setConnectionTimeout(long timeout)
Parameters:
timeout - The timeout value in milliseconds.

setPreferredSoapVersion

public void setPreferredSoapVersion(SoapVersion soapVersion)
Parameters:
soapVersion - The SOAP version as define in SoapVersion.