Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


 
Returns all defined EDMinterface communication parameters of a server context, identified by its unique server context id.
Related functions: edmiDefineServerContext, edmiDefineServerContextsFromFile, edmiDeleteAllServerContexts, edmiDeleteServerContext, edmiDeleteServerContextBN, edmiGetAllServerContexts, edmiGetServerContextId, edmiResetServerContext, edmiWriteServerContextsToFile.
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetServerContextProperties(SdaiUnsignedInt serverContextId,
                                          SdaiString      *serverContextName,
                                          SdaiString      *userName,
                                          SdaiString      *groupName,
                                          SdaiString      *password,
                                          SdaiString      *communicationType,
                                          SdaiString      *edmServerPortNumber,
                                          SdaiString      *edmServerHostName,
                                          SdaiString      *edmiHttpTunnelName,
                                          SdaiString      *edmiHttpTunnelPortNumber,
                                          SdaiString      *edmiHttpTunnelHostName,
                                          SdaiString      *proxyServerPortNumber,
                                          SdaiString      *proxyServerName);
Arguments:

serverContextId

The unique numeric identificator of the server context to explore.

*serverContextName

Variable that will receive the name of the server context.

*userName

Variable that will receive the name of the edmUser to connect to the EDMserver.

*groupName

Variable that will receive the name of the edmGroup to connect to the EDMserver.

*password

Variable that will receive the password of the edmUser specified by <userName>.

*communicationType

Variable that will receive the nature of the communication between the EDMclient and the EDMserver. Possible communication types are;
"HTTP": Stateless transaction oriented communication with a remote EDMserver by the Hyper Text Transfer Protocol.
"TCP": Stateless transaction oriented communication with a remote EDMserver by theTransfer Communication Protocol.
"LOCAL_DB": Stateful transaction oriented communication with the locally connected EDMserver. The communication type will be as specified for the locally connected EDMserver.
"LOCAL_CONTEXT": Stateful non-transaction oriented communication with the locally connected EDMserver. The communication type will be as specified for the locally connected EDMserver.

*edmServerPortNumber

Variable that will receive the service port number used for remote communication by an EDMserver.

*edmServerHostName

Variable that will receive the name or IP-address of the machine hosting the EDMserver.

*edmiHttpTunnelName

Variable that will receive the name and full path of the HTTP Tunnel Servlet.

*edmiHttpTunnelPortNumber

Variable that will receive the tunnel service port number on the machine hosting the HTTP Tunnel Servlet. Used by the HTTP tunnel for controling remote communication between an EDMserver and a thin EDMClient.

*edmiHttpTunnelHostName

Variable that will receive the name or IP-address of the machine hosting the HTTP Tunnel Servlet.

*proxyServerPortNumber

Variable that will receive the service port number used for communication by the proxy server.

*proxyServerName

Variable that will receive the name or IP-address of the machine hosting the proxy service.

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;
int i;
SdaiUnsignedInt contextId;
SdaiString ServerContextName = "HTTP_ServerContext";
SdaiString contextFile = "c:/data/myServerContexts";
SdaiUnsignedInt *pContextId;
SdaiInteger nContext;
 
/* Define contexts from file */
rstat = edmiDefineServerContextsFromFile("*", contextFile,
PARTIAL_MATCH);
/* Get all context ids */
rstat = edmiGetAllServerContexts(&pContextId, &nContext);
/* Print all contexts */
for (i=0;i<nContext;i++) {
SdaiString cntxtName; 
SdaiString usrName; 
SdaiString grpName; 
SdaiString pwd; 
SdaiString comType; 
SdaiString srvPort; 
SdaiString srvHost; 
SdaiString tnlName; 
SdaiString tnlPort; 
SdaiString tnlHost; 
SdaiString prxPort; 
SdaiString prxHost; 
rstat = edmiGetServerContextProperties(pContextId, &cntxtName,
&usrName, &grpName, &pwd, 
&comType, &srvPort, &srvHost,
&tnlName, &tnlPort, &tnlHost,
&prxPort, &prxHost); 
printf("\nContext Name : %s", cntxtName ? cntxtName : "<empty>"); 
printf("\n User Name : %s", usrName); 
printf("\n Group Name : %s", grpName ? grpName : "<empty>"); 
printf("\n Password : %s", pwd); 
printf("\n Communication Type : %s", comType); 
printf("\n EDM Server : %s", srvHost); 
printf("\n Port Number : %s", srvPort); 
printf("\n Http Tunnel : %s", tnlName ? tnlName : "<empty>"); 
printf("\n Http Tunnel Server : %s", tnlHost ? tnlHost : "<empty>"); 
printf("\n Port Number : %s", tnlPort ? tnlPort : "<empty>"); 
printf("\n Proxy Server : %s", prxHost ? prxHost : "<empty>"); 
printf("\n Proxy Port : %s", prxPort ? prxPort : "<empty>"); 
printf("\n"); 
++pContextId; 
}
. . .

  • No labels