diff --git a/Modules.EDMIAPI/Client.vb b/Modules.EDMIAPI/Client.vb
index 9b7b7855..ac0c3cb0 100644
--- a/Modules.EDMIAPI/Client.vb
+++ b/Modules.EDMIAPI/Client.vb
@@ -87,12 +87,8 @@ Public Class Client
Try
ServerAddress = oAddressArray(0)
ServerPort = oAddressArray(1)
-
- Dim oBinding = API.Channel.GetBinding()
- Dim oAddress = New EndpointAddress($"net.tcp://{ServerAddress}:{ServerPort}/DigitalData/Services/Main")
- Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress)
-
- ChannelFactory = oFactory
+ Logger.Debug("Connecting to Service at: [{0}]", ServerAddress)
+ ChannelFactory = GetChannelFactory(ServerAddress, ServerPort)
Catch ex As Exception
Logger.Error(ex)
End Try
@@ -109,20 +105,24 @@ Public Class Client
Logger = LogConfig.GetLogger()
FileEx = New Filesystem.File(LogConfig)
+ UpdateTimer.Interval = 60 * 1000 * UPDATE_INTERVAL_IN_MINUTES
+ UpdateTimer.Start()
+
Try
- ServerAddress = IPAddress
- Dim oBinding = API.Channel.GetBinding()
- Dim oAddress = New EndpointAddress($"net.tcp://{IPAddress}:{PortNumber}/DigitalData/Services/Main")
- Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress)
-
- Logger.Debug("Connecting to Service at: [{0}]", oAddress)
-
- ChannelFactory = oFactory
+ Logger.Debug("Connecting to Service at: [{0}]", IPAddress)
+ ChannelFactory = GetChannelFactory(IPAddress, PortNumber)
Catch ex As Exception
Logger.Error(ex)
End Try
End Sub
+ Private Function GetChannelFactory(pIPAddress As String, pPortNumber As Integer) As ChannelFactory(Of IEDMIServiceChannel)
+ Dim oBinding = API.Channel.GetBinding()
+ Dim oAddress = New EndpointAddress($"net.tcp://{pIPAddress}:{pPortNumber}/DigitalData/Services/Main")
+ Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress)
+ Return oFactory
+ End Function
+
'''
''' Connect to the service
'''
diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd
index f6058ff7..326edd8a 100644
--- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd
+++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd
@@ -2,6 +2,8 @@
+
+
diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb
index 0dd8738a..b7ca66f0 100644
--- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb
+++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb
@@ -638,6 +638,12 @@ Namespace EDMIServiceReference
_
Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
+ _
+ Private ConnectionStringECMField As String
+
+ _
+ Private ConnectionStringIDBField As String
+
_
Private DocumentTypesField() As EDMIServiceReference.GlobalStateDoctype
@@ -654,6 +660,32 @@ Namespace EDMIServiceReference
End Set
End Property
+ _
+ Public Property ConnectionStringECM() As String
+ Get
+ Return Me.ConnectionStringECMField
+ End Get
+ Set
+ If (Object.ReferenceEquals(Me.ConnectionStringECMField, value) <> true) Then
+ Me.ConnectionStringECMField = value
+ Me.RaisePropertyChanged("ConnectionStringECM")
+ End If
+ End Set
+ End Property
+
+ _
+ Public Property ConnectionStringIDB() As String
+ Get
+ Return Me.ConnectionStringIDBField
+ End Get
+ Set
+ If (Object.ReferenceEquals(Me.ConnectionStringIDBField, value) <> true) Then
+ Me.ConnectionStringIDBField = value
+ Me.RaisePropertyChanged("ConnectionStringIDB")
+ End If
+ End Set
+ End Property
+
_
Public Property DocumentTypes() As EDMIServiceReference.GlobalStateDoctype()
Get
diff --git a/Service.EDMIService/GlobalState.vb b/Service.EDMIService/GlobalState.vb
index bb73e113..0ee10f8d 100644
--- a/Service.EDMIService/GlobalState.vb
+++ b/Service.EDMIService/GlobalState.vb
@@ -156,6 +156,8 @@ Public Class GlobalState
_Logger.Debug("ForceDirectDatabaseAccess: {0}", pConfig.ClientConfig.ForceDirectDatabaseAccess)
ClientConfig.ForceDirectDatabaseAccess = pConfig.ClientConfig.ForceDirectDatabaseAccess
ClientConfig.DocumentTypes = Doctypes
+ ClientConfig.ConnectionStringECM = _MSSQL_ECM.CurrentSQLConnectionString
+ ClientConfig.ConnectionStringIDB = _MSSQL_IDB.CurrentSQLConnectionString
End Sub
Public Class ObjectStore
@@ -180,6 +182,9 @@ Public Class GlobalState
Public Class ClientConfiguration
Public Property ForceDirectDatabaseAccess As Boolean = False
Public Property DocumentTypes As New List(Of Doctype)
+
+ Public Property ConnectionStringECM As String
+ Public Property ConnectionStringIDB As String
End Class