au.gov.nehta.vendorlibrary.pcehr.clients.common
Class Client<PortType>

java.lang.Object
  extended by au.gov.nehta.vendorlibrary.pcehr.clients.common.Client<PortType>
Type Parameters:
PortType - JAX-WS port class.
Direct Known Subclasses:
DoesPCEHRExistClient, GainPCEHRAccessClient, GetAuditViewClient, GetChangeHistoryViewClient, GetDocumentClient, GetDocumentListClient, GetIndividualDetailsViewClient, GetRepresentativeListClient, GetTemplateClient, GetViewClient, RegisterPCEHRClient, RemoveDocumentClient, SearchTemplateClient, UploadDocumentClient, UploadDocumentMetadataClient

public abstract class Client<PortType>
extends java.lang.Object

Provides a base class to simplify the creation of a JAX-WS Web Service client.


Constructor Summary
Client(java.lang.Class<? extends javax.xml.ws.Service> serviceClass, java.lang.Class<PortType> portClass, javax.net.ssl.SSLSocketFactory sslSocketFactory, java.security.cert.X509Certificate x509Certificate, au.gov.nehta.xsp.CertificateValidator certificateVerifier, java.security.PrivateKey privateKey, java.lang.String endpointAddress, boolean setLoggingEnabled)
          Constructor - accepts an optional certificate verifier.
Client(java.lang.Class<? extends javax.xml.ws.Service> serviceClass, java.lang.Class<PortType> portClass, javax.net.ssl.SSLSocketFactory sslSocketFactory, java.security.cert.X509Certificate x509Certificate, au.gov.nehta.xsp.CertificateValidator certificateVerifier, java.security.PrivateKey privateKey, java.lang.String endpointAddress, boolean setLoggingEnabled, IMTOMHandler customMtomHandler)
          Constructor - accepts an optional certificate verifier.
Client(java.lang.Class<? extends javax.xml.ws.Service> serviceClass, java.lang.Class<PortType> portClass, javax.net.ssl.SSLSocketFactory sslSocketFactory, java.security.cert.X509Certificate x509Certificate, java.security.PrivateKey privateKey, java.lang.String endpointAddress, boolean setLoggingEnabled)
          Constructor - no certificate verification performed.
Client(java.lang.Class<? extends javax.xml.ws.Service> serviceClass, java.lang.Class<PortType> portClass, javax.net.ssl.SSLSocketFactory sslSocketFactory, java.security.cert.X509Certificate x509Certificate, java.security.PrivateKey privateKey, java.lang.String endpointAddress, boolean setLoggingEnabled, IMTOMHandler customMtomHandler)
          Constructor - no certificate verification performed.
 
Method Summary
 java.util.List<javax.xml.ws.handler.Handler> getHandlerChain()
          Retrieves the current JAX-WS handler chain.
 java.lang.String getLastSoapRequest()
          Getter for lastSoapRequest.
 java.lang.String getLastSoapResponse()
          Getter for lastSoapResponse.
 PortType getPort()
          Get client port.
 void setMTOMEnabled()
          Enable MTOM for client port.
 void setProperty(java.lang.String propertyKey, java.lang.Object propertyValue)
          Exposes the ability to set a request context property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client

public Client(java.lang.Class<? extends javax.xml.ws.Service> serviceClass,
              java.lang.Class<PortType> portClass,
              javax.net.ssl.SSLSocketFactory sslSocketFactory,
              java.security.cert.X509Certificate x509Certificate,
              au.gov.nehta.xsp.CertificateValidator certificateVerifier,
              java.security.PrivateKey privateKey,
              java.lang.String endpointAddress,
              boolean setLoggingEnabled)
Constructor - accepts an optional certificate verifier.

Parameters:
serviceClass - the JAX-WS service class.
portClass - the JAX-WS port class.
sslSocketFactory - the SSLSocketFactory to be used when connecting to the web service provider (mandatory).
x509Certificate - the certificate key to be used for signing (mandatory)
certificateVerifier - CertificateVerifier implementation (optional).
privateKey - the private key to be used for signing (mandatory)
endpointAddress - the endpoint address of the web service (mandatory).
setLoggingEnabled - set to true to enable logging (mandatory).

Client

public Client(java.lang.Class<? extends javax.xml.ws.Service> serviceClass,
              java.lang.Class<PortType> portClass,
              javax.net.ssl.SSLSocketFactory sslSocketFactory,
              java.security.cert.X509Certificate x509Certificate,
              au.gov.nehta.xsp.CertificateValidator certificateVerifier,
              java.security.PrivateKey privateKey,
              java.lang.String endpointAddress,
              boolean setLoggingEnabled,
              IMTOMHandler customMtomHandler)
Constructor - accepts an optional certificate verifier.

Parameters:
serviceClass - the JAX-WS service class.
portClass - the JAX-WS port class.
sslSocketFactory - the SSLSocketFactory to be used when connecting to the web service provider (mandatory).
x509Certificate - the certificate key to be used for signing (mandatory)
certificateVerifier - CertificateVerifier implementation (optional).
privateKey - the private key to be used for signing (mandatory)
endpointAddress - the endpoint address of the web service (mandatory).
setLoggingEnabled - set to true to enable logging (mandatory).
customMTOMHandler -

Client

public Client(java.lang.Class<? extends javax.xml.ws.Service> serviceClass,
              java.lang.Class<PortType> portClass,
              javax.net.ssl.SSLSocketFactory sslSocketFactory,
              java.security.cert.X509Certificate x509Certificate,
              java.security.PrivateKey privateKey,
              java.lang.String endpointAddress,
              boolean setLoggingEnabled)
Constructor - no certificate verification performed.

Parameters:
sslSocketFactory - the SSLSocketFactory to be used when connecting to the web service provider (mandatory).
x509Certificate - the certificate key to be used for signing (mandatory)
privateKey - the private key to be used for signing (mandatory)
endpointAddress - the endpoint address of the web service (mandatory).
setLoggingEnabled - set to true to enable logging (mandatory).

Client

public Client(java.lang.Class<? extends javax.xml.ws.Service> serviceClass,
              java.lang.Class<PortType> portClass,
              javax.net.ssl.SSLSocketFactory sslSocketFactory,
              java.security.cert.X509Certificate x509Certificate,
              java.security.PrivateKey privateKey,
              java.lang.String endpointAddress,
              boolean setLoggingEnabled,
              IMTOMHandler customMtomHandler)
Constructor - no certificate verification performed.

Parameters:
sslSocketFactory - the SSLSocketFactory to be used when connecting to the web service provider (mandatory).
x509Certificate - the certificate key to be used for signing (mandatory)
privateKey - the private key to be used for signing (mandatory)
endpointAddress - the endpoint address of the web service (mandatory).
setLoggingEnabled - set to true to enable logging (mandatory).
Method Detail

getHandlerChain

public final java.util.List<javax.xml.ws.handler.Handler> getHandlerChain()
Retrieves the current JAX-WS handler chain.

Returns:
List containing the handler chain.

getLastSoapResponse

public final java.lang.String getLastSoapResponse()
Getter for lastSoapResponse.

Returns:
lastSoapResponse the lastSoapResponse instance variable

getLastSoapRequest

public final java.lang.String getLastSoapRequest()
Getter for lastSoapRequest.

Returns:
lastSoapRequest the lastSoapRequest instance variable

setProperty

public final void setProperty(java.lang.String propertyKey,
                              java.lang.Object propertyValue)
Exposes the ability to set a request context property.

Parameters:
propertyKey - request property name (Mandatory).
propertyValue - request property value (Mandatory).

setMTOMEnabled

public final void setMTOMEnabled()
Enable MTOM for client port.


getPort

public final PortType getPort()
Get client port.

Returns:
the client port.