Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 Creates a new XML configuration in a dictionary model in a remote EDMdatabase
Related functions: edmiRemoteDeleteXMLConfiguration , edmiRemoteGetXMLConfiguration, edmiRemoteGetXMLConfigurationId, edmiRemoteListXMLConfigurations, edmiRemoteReadXMLDocument, edmiRemoteReadXMLFile, edmiRemoteWriteXMLDocument, edmiRemoteWriteXMLFile.
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteCreateXMLConfiguration (SdaiServerContext serverContextId,                                            SdaiString        schemaName,                                            SdaiString        xmlConfigurationString,                                            SdaiString        nameSpace,                                            SdaiString        nameSpaceAlias,                                            SdaiString        xmlSchemaURL,                                            SdaiUnsignedInt   options,                                            SdaiString        *parserMessages,                                            SdaiInstance      *xmlConfigurationId,                                            SdaiInvocationId  *edmiInvocationId);
 
Arguments:

Code Block
languagecpp
themeConfluence
EdmiError edmiRemoteCreateXMLConfiguration (SdaiServerContext serverContextId,
                                            SdaiString        schemaName,    
                                            SdaiString        xmlConfigurationString, 
                                            SdaiString        nameSpace, 
                                            SdaiString        nameSpaceAlias, 
                                            SdaiString        xmlSchemaURL,  
                                            SdaiUnsignedInt   options,      
                                            SdaiString        *parserMessages,
                                            SdaiInstance      *xmlConfigurationId,    
                                            SdaiInvocationId  *edmiInvocationId);

Creates a new XML configuration in a dictionary model in a remote EDMdatabase.

Arguments

...

1TypeNameComment
2 SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

3 SdaiString

schemaName

The name of the Express Schema for which to create an XML configuration.

4 SdaiString

xmlConfigurationString

The XML configuration.

5 SdaiString

nameSpace

Optional namespace string to associate with the XML configuration. This is the namespace of the elements contained in the UOS element of the generated XML.

6 SdaiString

nameSpaceAlias

Optional alias for the <nameSpace>.

7 SdaiString

xmlSchemaURL

Optional XML Schema URL.

8 SdaiUnsignedInt

options

Currently unused.

9 SdaiString

parserMessages

Pointer variable that will receive the address of the diagnostics string allocated by the XML parser.

10 SdaiInstance

xmlConfigurationId

Variable that will receive the instanceId that uniquely identifies the XML configuration in the EDMdatabase .

11 SdaiInvocationId

edmiInvocationId

Currently unused.

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

OptionComment
Option nameComment

 

Example

...

 

Code Block
languagecpp
 #define S_FILE_SIZE 8194

...


 FILE *fp = NULL;

...


 EdmiError rstat;

...


 SdaiString xmlConfigString, parserMsg;

...


 SdaiInteger numRead;

...


 SdaiInstance xmlConfigId;

...


 SdaiServerContext myContext;

...


  
 /* Create Server Context */

...


 rstat = edmiDefineServerContext("MyContext",

...


 "Johnny", "Supervisor", "cf37ftr",

...

 
 "TCP", "9090", "MyServerHost",

...

 
 NULL, NULL, NULL, NULL, NULL, &myContext);

...

 
  
 /* Read XML Config String from file */

...


 if ((fp = fopen("c:/xml/ifcXmlConfigFile.xml", "r")) == NULL) {

...


 printf("\nError. Failed to open config file.");

...

 
 goto err;

...

 
 }
 xmlConfigString = (char *) malloc (S_FILE_SIZE*sizeof(char));

...


 numRead = fread(xmlConfigString, sizeof(char), S_FILE_SIZE, fp);

...


 xmlConfigString[numRead] = '\0';

...


 fclose(fp);

...


  
 /* Create the XML Configuration */

...


 if (rstat = edmiRemoteCreateXMLConfiguration(myContext,

...


 "IFC2X2_FINAL", xmlConfigString,

...

  
 "http://www.iai-international.org/ifcXML/IFC2X2_FINAL",

...

 
 "ifc", "c:/xml/IFC2X2_FINAL.xsd", 0,

...

  
 &parserMsg, &xmlConfigId, NULL)) {

...

 
 printf("\nError %d in edmiRemoteCreateXMLConfiguration: %s",

...


 rstat, edmiGetErrotText(rstat));

...


 if (parserMsg) {

...


 printf("\nReturned xml parser diagnostics:\n%s", parserMsg);

...


 }
 }

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"