Defines the EDMInterface communication parameters to be used for communication between a thick EDMclient and an EDMserver.
The defined communication will be stateful and non-transaction oriented. After defining the communication parameters, the EDMclient must explicitly connect to the EDMdatabase, via an EDMserver by edmiConnect.
Only one set of communication parameters may be active at the same time. To connect to another EDMserver, the EDMclient must first disconnect from the EDMdatabase and then redefine the communication parameters before reconnecting.
Related functions: edmiDefineCommunication, edmiGetCommunicationEX, edmiGetCommunication, edmiConnect, edmiTestConnect.
Header:
#include "sdai.h"
Prototype:
EdmiError edmiDefineCommunicationEX(SdaiString communicationType,
SdaiString edmServerPortNumber,
SdaiString edmServerHostName,
SdaiString edmiHttpTunnelName,
SdaiString edmiHttpTunnelPortNumber,
SdaiString edmiHttpTunnelHostName,
SdaiString proxyServerPortNumber,
SdaiString proxyServerName);
Arguments:
communicationType |
The desired nature of the communication with the EDMserver. Valid communication types are; |
edmServerPortNumber |
The service port number used for communication by the EDMserver. Mandatory for both the http and the tcp communication types. |
edmServerHostName |
The name or IP-address of the machine hosting the EDMserver. Mandatory for both the http and the tcp communication types. |
edmiHttpTunnelName |
The name and full path of the HTTP Tunnel Servlet. Valid only for the http communication type. |
edmiHttpTunnelPortNumber |
The tunnel service port number on the machine hosting the HTTP Tunnel Servlet. Valid only for the http communication type. |
edmiHttpTunnelHostName |
The name or IP-address of the machine hosting the HTTP Tunnel Servlet. Valid only for the http communication type. |
proxyServerPortNumber |
The service port number used for communication by the proxy server. Valid for both the http and the tcp communication types. |
proxyServerName |
The name or IP-address of the machine hosting the proxy service. Valid for both the http and the tcp communication types. |
Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
Example:
EdmiError rstat;
SdaiUnsignedInt serverContextId;
. . .
if (rstat = edmiDefineCommunicationEx("TCP", "9090", "MyEdmServer",
"/http/MyHttpTunnel", "7408", "192.136.64.13",
"1120", "OurProxyServer")) {
printf("\nError %d in edmiDefineCommunicationEx", rstat);
goto err;
}
. . .