| Quintiq file version 2.0 | 
| #parent: #root | 
| Method SendDMConfigurationToSystemsViaSOAP (String systemName_i, String systemQProductName_i, String systemHost_i,  | 
|   Number systemPort_i, String systemDatasetKind_i, String systemDatasetFolder_i,  | 
|   String systemDatasetName_i) | 
| { | 
|   Description: 'Send DataManager configuration to Systems stored in DataManager via SOAP.' | 
|   TextBody: | 
|   [* | 
|     // Send DataManager configuration to Systems | 
|     soapInterface := LibDMF_SOAPClient::CreateInterface(); | 
|      | 
|     // Gather DM configuration | 
|     globalParam     := this.GlobalParameters(); | 
|     dmHost          := OS::ComputerName(); | 
|     dmPort          := CommandLine::Instance().NumberArgument( "webserverport" ); | 
|     dmDatasetKind   := globalParam.DM_DatasetKind(); | 
|     dmDatasetFolder := globalParam.DM_DatasetFolder(); | 
|     dmDatasetName   := globalParam.DM_DatasetName(); | 
|      | 
|     // If the system's hostname is the same with the DataManager's hostname, change it to 'localhost' instead. | 
|     // A temporary workaround as SOAP is unable to send to the same machine using absolute hostname. | 
|     soapSystemHost := ifexpr( dmHost = systemHost_i, "localhost", systemHost_i ); | 
|      | 
|     // Set the SOAP client interface such that the destination dataset of the System could receive the SOAP message | 
|     LibDMF_Util::SetSOAPClientInterfaceConfiguration( soapInterface, | 
|                                                       soapSystemHost, | 
|                                                       systemPort_i, | 
|                                                       "SOAPServer", | 
|                                                       "ReceiveDataManagerConfiguration", | 
|                                                       systemDatasetKind_i, | 
|                                                       systemDatasetName_i ); | 
|      | 
|     logmessage := "Sending DataManager configuration to " + systemName_i + | 
|                   "; Host = '" + systemHost_i + | 
|                   "', Port = '" + [String]systemPort_i + | 
|                   "', Dataset Kind = '" + systemDatasetKind_i + | 
|                   "', Dataset Name = '" + systemDatasetName_i; | 
|      | 
|     // Log this event | 
|     event := this.EventCreate( systemDatasetKind_i, systemDatasetName_i, false ); | 
|     this.EventLogActivity( event, logmessage ); | 
|      | 
|     soapInterface.ASync_ReceiveDataManagerConfiguration( dmHost, dmPort, dmDatasetKind, dmDatasetFolder, dmDatasetName, | 
|                                                          systemName_i, systemQProductName_i, systemDatasetKind_i, systemDatasetFolder_i, systemDatasetName_i, | 
|                                                          this, this.EventGetID( event ) ); | 
|   *] | 
| } |