Introduction

Runtime Modules:xxclient.jar   (The Java Client Library is available for Windows, Linux and UNIX platforms. )
JRE version required:8.0 or higher recommended
Setup:Put xxclient.jar in your application CLASSPATH
Main Class:xxclient.XXClient 
XXClient is a proxy instance of XX1. This is the main class the user application is working with.


You can download the client software and examples in our Download-Section, if you are logged in.

XXClient Object Properties

Property TypeProperty NameDefault ValueDescription
StringhostlocalhostServer IP address or URL value.
intport

non-SSL: 8800

SSL: 443

Server SOAP port value.
Stringtc-Transaction Control data (TC).
Stringrsptc-Returns received transaction control data value (TC). (read-only)
boolean_nativefalse

Set and get status of request sending mode.

  • true: send native provider request message as is to provider
  • false: send XX/1 request message to XX/1
booleancompresstrue

Set and get Status of data compression. (Recommended for performance reasons)

booleansslfalseSet and get Status of SSL/TLS data encryption.
Stringcertificate"exportedCert.p12"If SSL is used, specify where certification databases reside - by default they must reside in the same directory where xxclient library modules are installed (there is a working certificate named "exportedCert.p12" within the xxclient.jar, but you can apply your own certificate. In this case an absolute path is needed)
booleankeepalivetrue

indication flag to keep a connection alive (default timeout is set on the server).

Indicates whether the client application is in the sessioned mode.
This flag must be set to false in two cases:

  • when calling transaction() to send a stateless request (without prior getSession()), which is the most common use case.
  • when calling releaseSession() to close a session previously opened with getSession()

and to true otherwise.

StringstrContext-Contains a context string (or session id) of a locked provider session. This is required to check whether a getSession() was successful or not.
StringstrContextRelease-Contains a context string (or session id) of a last unlocked provider session.
This is required to check whether a releaseSession() was successful or not.
booleanadminfalseIndicates whether or not to use the admin mode, which is required for some monitoring functionality only.

 

 

XXClient Object Methods

Return TypeMethod NameMethod parametersDescription
booleangetSession()

Locks a session on the host and carries a context.

Returns:

  • true: successful GetSession
  • false: unsuccessful GetSession.

Remarks:

  • Use releaseSession()  when done with sessioned transactions to unlock the host context. Keep in mind - the socket connection is still alive. To close all socket streams (input and output) use disconnect() method.

 

Exceptions:

  • java.io.IOException
    • if an I/O-Error occurs
  • java.io.DataFormatException
    • if a http-error occurs. This Exception represents a SOAP-Fault response from server (with HTTP Error Code 500). The fault code identifies the error source, fault string contains a description of an appropriate error.
  • xxclient.HttpErrorException
    • if the compressed data format is invalid
  • java.security.NoSuchAlgorithmException
    • This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
  • java.security.KeyStoreException
    • This is the generic KeyStore exception.
  • java.security.cert.CertificateException
    • This exception indicates one of a variety of certificate problems.
  • java.security.KeyManagementException
    • This is the general key management exception for all operations dealing with key management.
  • java.security.UnrecoverableKeyException
    • This exception is thrown if a key in the keystore cannot be recovered.
  • java.security.NoSuchProviderException
    • This exception is thrown when a particular security provider is requested but is not available in the environment.
voidreleaseSession()

Unlocks a session previously locked with GetSession.

If release of the session succeeded, a strContextRelease property in XXClient instance is set. Otherwise an exception will be thrown.

Exceptions:

  • same as for getSession() method. Please see above.
Stringtransaction(String strReq)Performs the current transaction. Sends the request data to server and receives the response.
voiddisconnect()

Terminates the current socket connection.

 

Exceptions:

  • same as for getSession() method. Please see above.

 

Exceptions:

  • java.io.IOException
    • if an I/O-Error occurs