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 buffers containing the name and id of all XML Configurations assosiated with a given Express Schema.
Related functions: edmiRemoteCreateXMLConfiguration , edmiRemoteDeleteXMLConfiguration , edmiRemoteGetXMLConfiguration, edmiRemoteGetXMLConfigurationId, edmiRemoteReadXMLDocument, edmiRemoteReadXMLFile, edmiRemoteWriteXMLDocument, edmiRemoteWriteXMLFile.
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteListXMLConfigurations (SdaiServerContext serverContextId, 
                                            SdaiString        schemaName, 
                                            SdaiInstance      **xmlConfigurationIds, 
                                            SdaiString        **xmlConfigurationNames, 
                                            SdaiInteger       *numberOfConfigsReturned,
                                            SdaiInvocationId  *edmiInvocationId);
 
Arguments:

serverContextId

Context identification, from edmiDefineServerContext

schemaName

The name of the assosiated Express Schema.

xmlConfigurationIds

Variable that will receive a pointer to an allocated buffer containing the XML Configuration Id of all the XML Configurations assosiated with the Express Schema specified by the <schemaName> argument.

xmlConfigurationNames

Variable that will receive a pointer to an allocated buffer containing the XML Configuration Name of all the XML Configurations assosiated with the Express Schema specified by the <schemaName> argument.

numberOfConfigsReturned

Number of elements returned in the <xmlConfigurationIds> and <xmlConfigurationNames> buffers.

edmiInvocationId

Currently unused

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:
int i;
EdmiError rstat;
SdaiServerContext myContext;
SdaiInstance *pConfigIds, configId;
SdaiString *pConfigNames, configString;
SdaiInteger nConfig;
SdaiString nameSpace, nameSpaceAlias, xmlSchemaURL;
 
/* Create Server Context */
rstat = edmiDefineServerContext("MyContext",
"Johnny", "Supervisor", "cf37ftr", 
"TCP", "9090", "MyServerHost", 
NULL, NULL, NULL, NULL, NULL, &myContext); 
/* Get all xml configurations */
rstat = edmiRemoteListXMLConfigurations(myContext,"IFC2X2_FINAL",
&pConfigIds, &pConfigNames, &nConfig, NULL); 
 
/* Delete them one by one */
for (i=0; i<nConfig; i++) {
rstat = edmiRemoteGetXMLConfiguration(myContext,
"IFC2X2_FINAL", pConfigNames[i], 
&configId, &configString, &nameSpace, 
&nameSpaceAlias, &xmlSchemaURL, NULL); 
printf("\nDeleting Configuration %s", nameSpaceAlias); 
rstat = edmiRemoteDeleteXMLConfiguration(myContext, "IFC2X2_FINAL", 
pConfigNames[i], NULL); 
}
. . .

  • No labels