Introduction

Runtime Modules:

Windows: xxclient.dll, zlib.dll

Unix/Linux: libxxclient.so

Link Library:xxclient.lib
Include:xxclient.h

Exported C-Functions

Return TypeFunction NameFunction ParametersDescription
unsigned longXxcTransaction
  • char * pszServer
    • [in] XX1 Server ip-address or URL
  • int port
    • [in] XX1 Server SOAP port
  • char * pszCertificate
    • [in]
      • PGP: optional, path and file name of certificate database
      • SSL: optional, path of certificate databases
  • char * pszTC
    • [in] Transaction Control Data as XML format
  • char * pszReq
    • [in] Request message as XML format
  • int cbReq
    • [in] Length of request message in pszReq
  • char ** ppszRspTC
    • [out] Returned Transaction Control Data as XML format
  • char ** ppszRsp
    • [out] Response message as XML format
  • int * pcbRsp
    • [out] Length of response message in ppszRsp
  • char ** ppszError
    • [out] Error text
  • unsigned long ulTimeout
    • [in] Socket connect timeout in seconds or XXC_DEFAULTTIMEOUT
  • unsigned long ulFlags
    • [in] Transaction Flags

Sends a stateless transaction to the server.

Return Values:

  • If no error occurs, the return code is XXC_OK (0) and ppszRsp contains the response XML.

Remarks:

  • XxcFreeBuffer must be called on all returned strings.
HXXCONTEXTXxcGetSession
  • char * pszServer
    • [in] XX1 Server ip-address or URL
  • int port
    • [in] XX1 Server SOAP port
  • char * pszCertificate
    • [in]
      • PGP: optional, path and file name of certificate database
      • SSL: optional, path of certificate databases
  • char * pszTC
    • [in] Transaction Control Data as XML format
  • char ** ppszError
    • [out] Error text
  • unsigned long pulStatus
    • [out] Return code
  • unsigned long ulTimeout
    • [in] Socket connect timeout in seconds or XXC_DEFAULTTIMEOUT
  • unsigned long ulFlags
    • [in] Transaction Flags

Obtains a session context from the host and locks it for other users.

Return Values:

  • If no error occurs, the return code is a context handle and pulStatus is set to XXC_OK.
  • On error the return value is NULL and pulStatus contains the error code.

Remarks:

  • XxcFreeBuffer must be called on all returned strings.
  • Use XxcReleaseSession when done with sessioned transactions to unlock the host context.
unsigned longXxcReleaseSession
  • HXXCONTEXT hContext
    • [in] Context handle returned by XxcGetSession function
  • char * pszTC
    • [in] Transaction Control Data as XML format
  • char ** ppszError
    • [out] Error text
  • unsigned long ulFlags
    • [in] Transaction Flags

Releases context obtained with XxcGetSession and unlocks the session on the host.

Return Values:

  • If no error occurs, the return code is XXC_OK (0).

Remarks:

  • XxcFreeBuffer must be called on all returned strings.
  • Connections will be closed.
  • The XXF_HTTPKEEPALIVE flag has no effect.
unsigned longXxcSessionedTransaction
  • HXXCONTEXT hContext
    • [in] Context handle returned by XxcGetSession function
  • char * pszTC
    • [in] Transaction Control Data as XML format
  • char * pszReq
    • [in] Request message as XML format
  • int cbReq
    • [in] Length of request message in pszReq
  • char ** ppszRspTC
    • [out] Returned Transaction Control Data as XML format
  • char ** ppszRsp
    • [out] Response message as XML format
  • int * pcbRsp
    • [out] Length of response message in ppszRsp
  • char ** ppszError
    • [out] Error text
  • unsigned long ulFlags
    • [in] Transaction Flags

Sends a transaction to the server using a host context.

Return Values:

  • If no error occurs, the return code is XXC_OK (0) and ppszRsp contains the response XML.

Remarks:

  • XxcFreeBuffer must be called on all returned strings.
  • It is highly recommended to use the XXF_HTTPKEEPALIVE flag with all sessioned transactions.
voidXxcFreeBuffer
  • char * pszBuffer
    • [in] String returned by any function/parameter

Frees memory allocated for returned strings.

Remarks:

  • This function must be called on all returned string (char *) parameters after each invocation of the following functions:
    • XxcTransaction
    • XxcSessionedTransaction
    • XxcGetSession
    • XxcReleaseSession

 

 

Transaction flags

Transaction Flags can be combined with & like this:

unsigned long ulflags = XXF_SSL & XXF_HTTPKEEPALIVE;

Can be a combined of the following:

Flag CodeMeaning
XXF_NOCOMPRESSIONDo not compress data streams.
XXF_NATIVEDATARequest XML is native provider data format.
XXF_ENCRYPTApply PGP 128-bit encryption on data streams (port 8800)
XXF_SSLApply SSL3 and TLS with 128-bit encryption (default port 443)
XXF_HTTPKEEPALIVEKeeps TCP/IP socket connection alive.

Error codes

Error CodeMeaning
XXC_ERR_MEMORYNot enough memory.
XXC_ERR_PARAMETERInvalid parameter.
XXC_ERR_SOCKETCONNECTCan't connect to server.
XXC_ERR_SOCKETREADSocket receive failed.
XXC_ERR_SOCKETWRITESocket send failed.
XXC_ERR_SOAPServer rejected SOAP envelope.
XXC_ERR_NOSESSIONAVAILABLEServer busy.
XXC_ERR_SSLINITThe SSL certification databases were invalid or not found.