EDMI: Update Service and Client to Use Messages for EDMI Methods
This commit is contained in:
parent
d2717b9216
commit
ed29e1b6a9
20
GUIs.Test.EDMIBenchmark/Form1.Designer.vb
generated
20
GUIs.Test.EDMIBenchmark/Form1.Designer.vb
generated
@ -32,7 +32,7 @@ Partial Class Form1
|
||||
Me.ButtonImportFiles = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.buttonClearLog = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.buttonClearFiles = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.TextboxObejctId = New DevExpress.XtraBars.BarEditItem()
|
||||
Me.TextboxObjectId = New DevExpress.XtraBars.BarEditItem()
|
||||
Me.RepositoryItemTextEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemTextEdit()
|
||||
Me.ButtonLoadFile = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarListItem1 = New DevExpress.XtraBars.BarListItem()
|
||||
@ -110,7 +110,7 @@ Partial Class Form1
|
||||
'RibbonControl1
|
||||
'
|
||||
Me.RibbonControl1.ExpandCollapseItem.Id = 0
|
||||
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.ButtonSelectFiles, Me.ButtonImportFiles, Me.buttonClearLog, Me.buttonClearFiles, Me.TextboxObejctId, Me.ButtonLoadFile, Me.BarListItem1, Me.BarButtonItem2, Me.BarToggleSwitchItem1, Me.BarDockingMenuItem1, Me.BarMdiChildrenListItem1, Me.BarButtonItem1})
|
||||
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.ButtonSelectFiles, Me.ButtonImportFiles, Me.buttonClearLog, Me.buttonClearFiles, Me.TextboxObjectId, Me.ButtonLoadFile, Me.BarListItem1, Me.BarButtonItem2, Me.BarToggleSwitchItem1, Me.BarDockingMenuItem1, Me.BarMdiChildrenListItem1, Me.BarButtonItem1})
|
||||
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.RibbonControl1.MaxItemId = 14
|
||||
Me.RibbonControl1.Name = "RibbonControl1"
|
||||
@ -151,12 +151,12 @@ Partial Class Form1
|
||||
'
|
||||
'TextboxObejctId
|
||||
'
|
||||
Me.TextboxObejctId.Caption = "Document Id"
|
||||
Me.TextboxObejctId.Edit = Me.RepositoryItemTextEdit1
|
||||
Me.TextboxObejctId.EditWidth = 100
|
||||
Me.TextboxObejctId.Id = 5
|
||||
Me.TextboxObejctId.ImageOptions.SvgImage = CType(resources.GetObject("TextboxObejctId.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||
Me.TextboxObejctId.Name = "TextboxObejctId"
|
||||
Me.TextboxObjectId.Caption = "Document Id"
|
||||
Me.TextboxObjectId.Edit = Me.RepositoryItemTextEdit1
|
||||
Me.TextboxObjectId.EditWidth = 100
|
||||
Me.TextboxObjectId.Id = 5
|
||||
Me.TextboxObjectId.ImageOptions.SvgImage = CType(resources.GetObject("TextboxObejctId.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||
Me.TextboxObjectId.Name = "TextboxObejctId"
|
||||
'
|
||||
'RepositoryItemTextEdit1
|
||||
'
|
||||
@ -218,7 +218,7 @@ Partial Class Form1
|
||||
'
|
||||
'RibbonPageGroup4
|
||||
'
|
||||
Me.RibbonPageGroup4.ItemLinks.Add(Me.TextboxObejctId)
|
||||
Me.RibbonPageGroup4.ItemLinks.Add(Me.TextboxObjectId)
|
||||
Me.RibbonPageGroup4.ItemLinks.Add(Me.BarToggleSwitchItem1)
|
||||
Me.RibbonPageGroup4.ItemLinks.Add(Me.ButtonLoadFile)
|
||||
Me.RibbonPageGroup4.ItemLinks.Add(Me.BarButtonItem2)
|
||||
@ -497,7 +497,7 @@ Partial Class Form1
|
||||
Friend WithEvents buttonClearLog As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents RibbonPageGroup3 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents buttonClearFiles As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents TextboxObejctId As DevExpress.XtraBars.BarEditItem
|
||||
Friend WithEvents TextboxObjectId As DevExpress.XtraBars.BarEditItem
|
||||
Friend WithEvents RepositoryItemTextEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemTextEdit
|
||||
Friend WithEvents ButtonLoadFile As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents RibbonPageGroup4 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
|
||||
@ -4,22 +4,19 @@ Imports DigitalData.Modules.EDMI.API
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraEditors.Controls
|
||||
Imports System.IO
|
||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||
|
||||
Public Class Form1
|
||||
Private _Channel As EDMIServiceReference.IEDMIServiceChannel
|
||||
Private _LogConfig As LogConfig
|
||||
Private _Logger As Logger
|
||||
Private _Client As Client
|
||||
|
||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
Try
|
||||
_LogConfig = New LogConfig(LogConfig.PathType.Temp, Nothing, "EDMIBenschmark")
|
||||
_Logger = _LogConfig.GetLogger()
|
||||
|
||||
Dim oChannelFactory As New ChannelFactory(Of EDMIServiceReference.IEDMIServiceChannel)(
|
||||
Channel.GetBinding(TcpClientCredentialType.Windows),
|
||||
"net.tcp://172.24.12.39:9000/DigitalData/Services/Main")
|
||||
_Channel = oChannelFactory.CreateChannel()
|
||||
_Channel.Open()
|
||||
_Client = New Client(_LogConfig, "net.tcp://172.24.12.39:9000/DigitalData/Services/Main")
|
||||
_Client.Connect()
|
||||
|
||||
DocumentViewer1.Init(_LogConfig, "21182889975216572111813147150675976632")
|
||||
Catch ex As Exception
|
||||
@ -61,18 +58,8 @@ Public Class Form1
|
||||
|
||||
AddLogMessage($"Importing {oFileInfo.Name}... ({FormatBytes(oFileInfo.Length)})")
|
||||
|
||||
Dim oContents As Byte() = New Byte(oFileInfo.Length) {}
|
||||
|
||||
Using oStream As New FileStream(oFileName, FileMode.Open)
|
||||
Await oStream.ReadAsync(oContents, 0, oFileInfo.Length)
|
||||
End Using
|
||||
|
||||
Dim oResult As EDMIServiceReference.DocumentResult = Await _Channel.ImportFileAsync(oFileInfo.Name, oContents, 1, "WichtigesDokument", 0)
|
||||
If oResult.OK Then
|
||||
AddLogMessage($"File [{oFileInfo.Name}] with Id [{oResult.Document.FileId}] imported!")
|
||||
Else
|
||||
AddLogMessage($"Import Error: {oResult.ErrorMessage}")
|
||||
End If
|
||||
Dim oObjectId As Long = Await _Client.ImportFileAsync(oFileInfo.Name, "WichtigesDokument", 1, 0)
|
||||
AddLogMessage($"File with Id [{oObjectId}] imported!")
|
||||
oSW.Stop()
|
||||
AddLogMessage($"Import Time: {FormatTime(oSW.ElapsedMilliseconds)}")
|
||||
AddLogMessage("")
|
||||
@ -135,18 +122,14 @@ Public Class Form1
|
||||
Dim oSWTotal As New Stopwatch()
|
||||
oSWTotal.Start()
|
||||
|
||||
If TextboxObejctId.EditValue = "" Then
|
||||
If TextboxObjectId.EditValue = "" Then
|
||||
MsgBox("Please enter an object id!", MsgBoxStyle.Exclamation, "Uh oh!")
|
||||
End If
|
||||
|
||||
Dim oObjectId As Integer = TextboxObejctId.EditValue
|
||||
Dim oObjectId As Integer = TextboxObjectId.EditValue
|
||||
Dim oResponse As Client.StreamedFile = Await _Client.GetFileByObjectIdAsync(oObjectId)
|
||||
|
||||
Dim oResponse = Await _Channel.GetFileByObjectIdAsync(New EDMIServiceReference.DocumentStreamRequest() With {.ObjectId = oObjectId})
|
||||
Dim oMemoryStream As New MemoryStream()
|
||||
oResponse.FileContents.CopyTo(oMemoryStream)
|
||||
oMemoryStream.Position = 0
|
||||
|
||||
DocumentViewer1.LoadFile(oResponse.FileName, oMemoryStream)
|
||||
DocumentViewer1.LoadFile(oResponse.FileName, oResponse.Stream)
|
||||
|
||||
oSWTotal.Stop()
|
||||
AddLogMessage($"File [{oResponse.FileName}] loaded: [{FormatTime(oSWTotal.ElapsedMilliseconds)}]")
|
||||
@ -159,7 +142,7 @@ Public Class Form1
|
||||
|
||||
Private Async Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
|
||||
Try
|
||||
Dim oResult = Await _Channel.ListFilesForUserAsync()
|
||||
Dim oResult As Client.FileList = Await _Client.ListFilesForUserAsync()
|
||||
BindingSource1.DataSource = oResult.Datatable
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Uh oh!")
|
||||
@ -177,13 +160,10 @@ Public Class Form1
|
||||
Dim oSWTotal As New Stopwatch()
|
||||
oSWTotal.Start()
|
||||
|
||||
Dim oObjectId As Int64 = oRow.Item("IDB_OBJ_ID")
|
||||
Dim oResponse = Await _Channel.GetFileByObjectIdAsync(New EDMIServiceReference.DocumentStreamRequest() With {.ObjectId = oObjectId})
|
||||
Dim oMemoryStream As New MemoryStream()
|
||||
oResponse.FileContents.CopyTo(oMemoryStream)
|
||||
oMemoryStream.Position = 0
|
||||
Dim oObjectId As Long = oRow.Item("IDB_OBJ_ID")
|
||||
Dim oResponse As Client.StreamedFile = Await _Client.GetFileByObjectIdAsync(oObjectId)
|
||||
|
||||
DocumentViewer1.LoadFile(oResponse.FileName, oMemoryStream)
|
||||
DocumentViewer1.LoadFile(oResponse.FileName, oResponse.Stream)
|
||||
|
||||
oSWTotal.Stop()
|
||||
AddLogMessage($"File [{oResponse.FileName}] loaded: [{FormatTime(oSWTotal.ElapsedMilliseconds)}]")
|
||||
@ -199,14 +179,11 @@ Public Class Form1
|
||||
Dim oSWTotal As New Stopwatch()
|
||||
oSWTotal.Start()
|
||||
|
||||
Dim oObjectId As Integer = TextboxObejctId.EditValue
|
||||
Dim oObjectId As Integer = TextboxObjectId.EditValue
|
||||
|
||||
Dim oResponse = Await _Channel.GetFileByObjectIdAsync(New EDMIServiceReference.DocumentStreamRequest() With {.ObjectId = oObjectId})
|
||||
Dim oMemoryStream As New MemoryStream()
|
||||
oResponse.FileContents.CopyTo(oMemoryStream)
|
||||
oMemoryStream.Position = 0
|
||||
Dim oResponse As Client.StreamedFile = Await _Client.GetFileByObjectIdAsync(oObjectId)
|
||||
|
||||
DocumentViewer1.LoadFile(oResponse.FileName, oMemoryStream)
|
||||
DocumentViewer1.LoadFile(oResponse.FileName, oResponse.Stream)
|
||||
|
||||
oSWTotal.Stop()
|
||||
AddLogMessage($"File [{oResponse.FileName}] loaded: [{FormatTime(oSWTotal.ElapsedMilliseconds)}]")
|
||||
@ -217,7 +194,7 @@ Public Class Form1
|
||||
|
||||
Private Sub BarToggleSwitchItem1_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarToggleSwitchItem1.CheckedChanged
|
||||
If BarToggleSwitchItem1.Checked Then
|
||||
If TextboxObejctId.EditValue = "" Then
|
||||
If TextboxObjectId.EditValue = "" Then
|
||||
Timer1.Stop()
|
||||
MsgBox("Please set a ObjectId!", MsgBoxStyle.Critical, Text)
|
||||
Else
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
Imports System.ServiceModel
|
||||
Imports System.Xml
|
||||
|
||||
Public Class Channel
|
||||
Public Shared Function GetBinding(Optional AuthenticationMode As TcpClientCredentialType = TcpClientCredentialType.Windows) As NetTcpBinding
|
||||
Return New NetTcpBinding() With {
|
||||
.MaxReceivedMessageSize = Constants.MAX_RECEIVED_MESSAGE_SIZE,
|
||||
.MaxBufferSize = Constants.MAX_BUFFER_SIZE,
|
||||
.MaxBufferPoolSize = Constants.MAX_BUFFER_POOL_SIZE,
|
||||
.MaxConnections = Constants.MAX_CONNECTIONS,
|
||||
.TransferMode = TransferMode.Streamed,
|
||||
.Security = New NetTcpSecurity() With {
|
||||
.Mode = SecurityMode.Transport,
|
||||
.Transport = New TcpTransportSecurity() With {
|
||||
.ClientCredentialType = AuthenticationMode
|
||||
}
|
||||
},
|
||||
.ReaderQuotas = New XmlDictionaryReaderQuotas() With {
|
||||
.MaxArrayLength = Constants.MAX_ARRAY_LENGTH,
|
||||
.MaxStringContentLength = Constants.MAX_STRING_CONTENT_LENGTH
|
||||
}
|
||||
}
|
||||
End Function
|
||||
End Class
|
||||
152
Modules.EDMIAPI/Client.vb
Normal file
152
Modules.EDMIAPI/Client.vb
Normal file
@ -0,0 +1,152 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||
Imports System.ServiceModel
|
||||
Imports System.IO
|
||||
|
||||
Public Class Client
|
||||
Private ReadOnly _logger As Logger
|
||||
Private ReadOnly _channelFactory As ChannelFactory(Of IEDMIServiceChannel)
|
||||
Private _channel As IEDMIServiceChannel
|
||||
|
||||
Public Class StreamedFile
|
||||
Public Stream As MemoryStream
|
||||
Public FileName As String
|
||||
End Class
|
||||
|
||||
Public Class FileList
|
||||
Public Datatable As DataTable
|
||||
End Class
|
||||
|
||||
''' <summary>
|
||||
''' Creates a new EDMIAPI object
|
||||
''' </summary>
|
||||
''' <param name="LogConfig">LogConfig object</param>
|
||||
''' <param name="ServiceAdress">The full service url to connect to</param>
|
||||
Public Sub New(LogConfig As LogConfig, ServiceAdress As String)
|
||||
_logger = LogConfig.GetLogger()
|
||||
|
||||
Try
|
||||
Dim oBinding = Channel.GetBinding()
|
||||
Dim oAddress = New EndpointAddress(ServiceAdress)
|
||||
Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress)
|
||||
|
||||
_channelFactory = oFactory
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Connect to the service
|
||||
''' </summary>
|
||||
''' <returns>True if connection was successful, false otherwise</returns>
|
||||
Public Function Connect() As Boolean
|
||||
Try
|
||||
_channel = GetChannel()
|
||||
|
||||
_logger.Debug("Opening channel..")
|
||||
_channel.Open()
|
||||
|
||||
_logger.Info("Connection to Service established!")
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Imports a file by filename
|
||||
''' </summary>
|
||||
''' <returns>A document object</returns>
|
||||
Public Async Function ImportFileAsync(FilePath As String, DocumentType As String, ObjectStoreId As Long, Optional RetentionDays As Integer = 0) As Task(Of Long)
|
||||
Try
|
||||
Dim oFileInfo As New FileInfo(FilePath)
|
||||
If oFileInfo.Exists = False Then
|
||||
Throw New FileNotFoundException("Cannot import non-existing file.", FilePath)
|
||||
End If
|
||||
|
||||
Using oStream As New FileStream(FilePath, FileMode.Open)
|
||||
Dim oContents As Byte() = {}
|
||||
Dim oBytesRead = Await oStream.ReadAsync(oContents, 0, oStream.Length)
|
||||
Dim oData As New DocumentImportRequest() With {
|
||||
.FileName = oFileInfo.Name,
|
||||
.Contents = oContents,
|
||||
.DocumentType = DocumentType,
|
||||
.ObjectStoreId = ObjectStoreId,
|
||||
.RetentionDays = RetentionDays
|
||||
}
|
||||
|
||||
Dim oResponse = Await _channel.ImportFileAsync(oData)
|
||||
|
||||
Return oResponse.ObjectId
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Async Function GetFileByObjectIdAsync(ObjectId As Long) As Task(Of StreamedFile)
|
||||
Try
|
||||
Dim oData As New DocumentStreamRequest() With {.ObjectId = ObjectId}
|
||||
Dim oResponse As DocumentStreamResponse = Await _channel.GetFileByObjectIdAsync(oData)
|
||||
Dim oMemoryStream As New MemoryStream()
|
||||
oResponse.FileContents.CopyTo(oMemoryStream)
|
||||
oMemoryStream.Position = 0
|
||||
|
||||
Return New StreamedFile() With {
|
||||
.Stream = oMemoryStream,
|
||||
.FileName = oResponse.FileName
|
||||
}
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Async Function ListFilesForUserAsync() As Task(Of FileList)
|
||||
Try
|
||||
Dim oResponse As DocumentListResponse = Await _channel.ListFilesForUserAsync(New ListFilesForUserRequest())
|
||||
Return New FileList() With {
|
||||
.Datatable = oResponse.Datatable
|
||||
}
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Aborts the channel and creates a new connection
|
||||
''' </summary>
|
||||
Private Sub Reconnect()
|
||||
_logger.Warn("Connection faulted. Trying to reconnect..")
|
||||
|
||||
Try
|
||||
_channel.Abort()
|
||||
_channel = GetChannel()
|
||||
_channel.Open()
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Creates a channel and adds a Faulted-Handler
|
||||
''' </summary>
|
||||
''' <returns>A channel object</returns>
|
||||
Private Function GetChannel() As IEDMIServiceChannel
|
||||
Try
|
||||
_logger.Debug("Creating channel..")
|
||||
Dim oChannel = _channelFactory.CreateChannel()
|
||||
|
||||
AddHandler oChannel.Faulted, AddressOf Reconnect
|
||||
|
||||
Return oChannel
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
38
Modules.EDMIAPI/Client/Channel.vb
Normal file
38
Modules.EDMIAPI/Client/Channel.vb
Normal file
@ -0,0 +1,38 @@
|
||||
Imports System.ServiceModel
|
||||
Imports System.Xml
|
||||
|
||||
|
||||
Public Class Channel
|
||||
' Infos about MaxBufferSize and MaxBufferPoolSize
|
||||
' https://social.msdn.microsoft.com/Forums/vstudio/en-US/d6e234d3-942f-4e9d-8470-32618d3f3212/maxbufferpoolsize-vs-maxbuffersize?forum=wcf
|
||||
|
||||
Public Const MAX_RECEIVED_MESSAGE_SIZE = 2147483647 ' 1GB
|
||||
Public Const MAX_BUFFER_SIZE = 2147483647 ' 10MB
|
||||
Public Const MAX_BUFFER_POOL_SIZE = 2147483647 ' 40MB
|
||||
|
||||
Public Const MAX_CONNECTIONS = 500
|
||||
Public Const MAX_ARRAY_LENGTH = 2147483647
|
||||
Public Const MAX_STRING_CONTENT_LENGTH = 2147483647
|
||||
|
||||
Public Shared Function GetBinding(Optional AuthenticationMode As TcpClientCredentialType = TcpClientCredentialType.Windows) As NetTcpBinding
|
||||
Return New NetTcpBinding() With {
|
||||
.MaxReceivedMessageSize = MAX_RECEIVED_MESSAGE_SIZE,
|
||||
.MaxBufferSize = MAX_BUFFER_SIZE,
|
||||
.MaxBufferPoolSize = MAX_BUFFER_POOL_SIZE,
|
||||
.MaxConnections = MAX_CONNECTIONS,
|
||||
.TransferMode = TransferMode.Streamed,
|
||||
.Security = New NetTcpSecurity() With {
|
||||
.Mode = SecurityMode.Transport,
|
||||
.Transport = New TcpTransportSecurity() With {
|
||||
.ClientCredentialType = AuthenticationMode
|
||||
}
|
||||
},
|
||||
.ReaderQuotas = New XmlDictionaryReaderQuotas() With {
|
||||
.MaxArrayLength = MAX_ARRAY_LENGTH,
|
||||
.MaxStringContentLength = MAX_STRING_CONTENT_LENGTH
|
||||
}
|
||||
}
|
||||
End Function
|
||||
End Class
|
||||
|
||||
|
||||
@ -5,6 +5,6 @@
|
||||
Renaming the file extension or editing the content of this file may
|
||||
cause the file to be unrecognizable by the program.
|
||||
-->
|
||||
<GenericObjectDataSource DisplayName="DocumentResult" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TypeInfo>DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentResult, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
||||
<GenericObjectDataSource DisplayName="DocumentImportResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TypeInfo>DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentImportResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
||||
</GenericObjectDataSource>
|
||||
@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:complexType name="DocumentListResponse">
|
||||
<xs:complexContent mixed="false">
|
||||
<xs:extension base="tns:BaseResponse">
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="Datatable" nillable="true">
|
||||
<xs:complexType>
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<ActualType Name="DataTable" Namespace="http://schemas.datacontract.org/2004/07/System.Data" xmlns="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
</ActualType>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax" />
|
||||
<xs:any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:element name="DocumentListResponse" nillable="true" type="tns:DocumentListResponse" />
|
||||
<xs:complexType name="BaseResponse">
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="ErrorMessage" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="OK" type="xs:boolean" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:element name="BaseResponse" nillable="true" type="tns:BaseResponse" />
|
||||
</xs:schema>
|
||||
@ -9,7 +9,6 @@
|
||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/System.Data" />
|
||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.Filesystem" />
|
||||
<xsd:import namespace="http://schemas.microsoft.com/Message" />
|
||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" />
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="IEDMIService_Heartbeat_InputMessage">
|
||||
@ -84,11 +83,11 @@
|
||||
<wsdl:message name="IEDMIService_GetDocumentByContainerId_OutputMessage">
|
||||
<wsdl:part name="parameters" element="tns:GetDocumentByContainerIdResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IEDMIService_ImportFile_InputMessage">
|
||||
<wsdl:part name="parameters" element="tns:ImportFile" />
|
||||
<wsdl:message name="DocumentImportRequest">
|
||||
<wsdl:part name="parameters" element="tns:DocumentImportRequest" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IEDMIService_ImportFile_OutputMessage">
|
||||
<wsdl:part name="parameters" element="tns:ImportFileResponse" />
|
||||
<wsdl:message name="DocumentImportResponse">
|
||||
<wsdl:part name="parameters" element="tns:DocumentImportResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="DocumentStreamRequest">
|
||||
<wsdl:part name="parameters" element="tns:DocumentStreamRequest" />
|
||||
@ -99,11 +98,9 @@
|
||||
<wsdl:message name="DocumentStreamResponse_Headers">
|
||||
<wsdl:part name="FileName" element="tns:FileName" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IEDMIService_ListFilesForUser_InputMessage">
|
||||
<wsdl:part name="parameters" element="tns:ListFilesForUser" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IEDMIService_ListFilesForUser_OutputMessage">
|
||||
<wsdl:part name="parameters" element="tns:ListFilesForUserResponse" />
|
||||
<wsdl:message name="IEDMIService_ListFilesForUser_InputMessage" />
|
||||
<wsdl:message name="DocumentListResponse">
|
||||
<wsdl:part name="parameters" element="tns:DocumentListResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="IEDMIService_NewFileIndex_InputMessage">
|
||||
<wsdl:part name="parameters" element="tns:NewFileIndex" />
|
||||
@ -161,8 +158,8 @@
|
||||
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/GetDocumentByContainerIdResponse" message="tns:IEDMIService_GetDocumentByContainerId_OutputMessage" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ImportFile">
|
||||
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ImportFile" message="tns:IEDMIService_ImportFile_InputMessage" />
|
||||
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ImportFileResponse" message="tns:IEDMIService_ImportFile_OutputMessage" />
|
||||
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ImportFile" name="DocumentImportRequest" message="tns:DocumentImportRequest" />
|
||||
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ImportFileResponse" name="DocumentImportResponse" message="tns:DocumentImportResponse" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetFileByObjectId">
|
||||
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId" name="DocumentStreamRequest" message="tns:DocumentStreamRequest" />
|
||||
@ -170,7 +167,7 @@
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ListFilesForUser">
|
||||
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ListFilesForUser" message="tns:IEDMIService_ListFilesForUser_InputMessage" />
|
||||
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ListFilesForUserResponse" message="tns:IEDMIService_ListFilesForUser_OutputMessage" />
|
||||
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/ListFilesForUserResponse" name="DocumentListResponse" message="tns:DocumentListResponse" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="NewFileIndex">
|
||||
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/NewFileIndex" message="tns:IEDMIService_NewFileIndex_InputMessage" />
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService" />
|
||||
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.Filesystem" />
|
||||
<xs:import namespace="http://schemas.microsoft.com/Message" />
|
||||
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" />
|
||||
<xs:element name="Heartbeat">
|
||||
<xs:complexType>
|
||||
<xs:sequence />
|
||||
@ -169,21 +168,21 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ImportFile">
|
||||
<xs:element name="DocumentImportRequest">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="FileName" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="Contents" nillable="true" type="xs:base64Binary" />
|
||||
<xs:element minOccurs="0" name="ObjectStoreId" type="xs:long" />
|
||||
<xs:element minOccurs="0" name="DocumentType" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="FileName" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="ObjectStoreId" type="xs:long" />
|
||||
<xs:element minOccurs="0" name="RetentionDays" type="xs:long" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ImportFileResponse">
|
||||
<xs:element name="DocumentImportResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q12="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService" minOccurs="0" name="ImportFileResult" nillable="true" type="q12:DocumentResult" />
|
||||
<xs:element minOccurs="0" name="ObjectId" type="xs:long" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@ -197,27 +196,35 @@
|
||||
<xs:element name="DocumentStreamResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q13="http://schemas.microsoft.com/Message" name="FileContents" type="q13:StreamBody" />
|
||||
<xs:element xmlns:q12="http://schemas.microsoft.com/Message" name="FileContents" type="q12:StreamBody" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="FileName" nillable="true" type="xs:string" />
|
||||
<xs:element name="ListFilesForUser">
|
||||
<xs:complexType>
|
||||
<xs:sequence />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="ListFilesForUserResponse">
|
||||
<xs:element name="DocumentListResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" minOccurs="0" name="ListFilesForUserResult" nillable="true" type="q14:DocumentListResponse" />
|
||||
<xs:element minOccurs="0" name="Datatable" nillable="true">
|
||||
<xs:complexType>
|
||||
<xs:annotation>
|
||||
<xs:appinfo>
|
||||
<ActualType Name="DataTable" Namespace="http://schemas.datacontract.org/2004/07/System.Data" xmlns="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
</ActualType>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:sequence>
|
||||
<xs:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax" />
|
||||
<xs:any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="NewFileIndex">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q15="http://schemas.datacontract.org/2004/07/DigitalData.Modules.Filesystem" minOccurs="0" name="DocObject" nillable="true" type="q15:DocumentObject" />
|
||||
<xs:element xmlns:q13="http://schemas.datacontract.org/2004/07/DigitalData.Modules.Filesystem" minOccurs="0" name="DocObject" nillable="true" type="q13:DocumentObject" />
|
||||
<xs:element minOccurs="0" name="Syskey" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="LanguageCode" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="Value" nillable="true" type="xs:string" />
|
||||
@ -227,7 +234,7 @@
|
||||
<xs:element name="NewFileIndexResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element xmlns:q16="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService" minOccurs="0" name="NewFileIndexResult" nillable="true" type="q16:IndexResult" />
|
||||
<xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService" minOccurs="0" name="NewFileIndexResult" nillable="true" type="q14:IndexResult" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
@ -61,25 +61,6 @@
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:element name="DocumentResultOld" nillable="true" type="tns:DocumentResultOld" />
|
||||
<xs:complexType name="DocumentResult">
|
||||
<xs:complexContent mixed="false">
|
||||
<xs:extension base="tns:BaseResult">
|
||||
<xs:sequence>
|
||||
<xs:element name="Contents" nillable="true" type="xs:base64Binary" />
|
||||
<xs:element name="Document" nillable="true" type="tns:DocumentResult.DocumentObject" />
|
||||
<xs:element name="HasContents" type="xs:boolean" />
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:element name="DocumentResult" nillable="true" type="tns:DocumentResult" />
|
||||
<xs:complexType name="DocumentResult.DocumentObject">
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="FileId" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="FileName" nillable="true" type="xs:string" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:element name="DocumentResult.DocumentObject" nillable="true" type="tns:DocumentResult.DocumentObject" />
|
||||
<xs:complexType name="IndexResult">
|
||||
<xs:complexContent mixed="false">
|
||||
<xs:extension base="tns:BaseResult">
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
<MetadataFile FileName="System.Data.xsd" MetadataType="Schema" ID="6c7bdb47-eea4-4d03-bc52-9747c865bbf0" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
<MetadataFile FileName="DigitalData.Modules.Filesystem.xsd" MetadataType="Schema" ID="cfa7fe70-b4f1-4a12-a957-d0134a8e6279" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
<MetadataFile FileName="Message.xsd" MetadataType="Schema" ID="2589e82f-d68f-4843-b153-a80edf895f82" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
<MetadataFile FileName="DigitalData.Services.EDMIService.Messages.xsd" MetadataType="Schema" ID="b87b9d40-54a5-4dc7-b563-1ca220bd70fd" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||
</Metadata>
|
||||
<Extensions>
|
||||
<ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" />
|
||||
|
||||
@ -23,7 +23,6 @@ Namespace EDMIServiceReference
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ScalarResult)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NonQueryResult)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentResultOld)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentResult)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.IndexResult)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.TableResult))> _
|
||||
Partial Public Class BaseResult
|
||||
@ -93,13 +92,9 @@ Namespace EDMIServiceReference
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.BaseResult)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NonQueryResult)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentResultOld)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentResult)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentResult.DocumentObject)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.IndexResult)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(System.DBNull)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentObject)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentListResponse)), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.BaseResponse))> _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentObject))> _
|
||||
Partial Public Class ScalarResult
|
||||
Inherits EDMIServiceReference.BaseResult
|
||||
|
||||
@ -181,121 +176,6 @@ Namespace EDMIServiceReference
|
||||
End Property
|
||||
End Class
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
|
||||
System.Runtime.Serialization.DataContractAttribute(Name:="DocumentResult", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService"), _
|
||||
System.SerializableAttribute()> _
|
||||
Partial Public Class DocumentResult
|
||||
Inherits EDMIServiceReference.BaseResult
|
||||
|
||||
Private ContentsField() As Byte
|
||||
|
||||
Private DocumentField As EDMIServiceReference.DocumentResult.DocumentObject
|
||||
|
||||
Private HasContentsField As Boolean
|
||||
|
||||
<System.Runtime.Serialization.DataMemberAttribute(IsRequired:=true)> _
|
||||
Public Property Contents() As Byte()
|
||||
Get
|
||||
Return Me.ContentsField
|
||||
End Get
|
||||
Set
|
||||
If (Object.ReferenceEquals(Me.ContentsField, value) <> true) Then
|
||||
Me.ContentsField = value
|
||||
Me.RaisePropertyChanged("Contents")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<System.Runtime.Serialization.DataMemberAttribute(IsRequired:=true)> _
|
||||
Public Property Document() As EDMIServiceReference.DocumentResult.DocumentObject
|
||||
Get
|
||||
Return Me.DocumentField
|
||||
End Get
|
||||
Set
|
||||
If (Object.ReferenceEquals(Me.DocumentField, value) <> true) Then
|
||||
Me.DocumentField = value
|
||||
Me.RaisePropertyChanged("Document")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<System.Runtime.Serialization.DataMemberAttribute(IsRequired:=true)> _
|
||||
Public Property HasContents() As Boolean
|
||||
Get
|
||||
Return Me.HasContentsField
|
||||
End Get
|
||||
Set
|
||||
If (Me.HasContentsField.Equals(value) <> true) Then
|
||||
Me.HasContentsField = value
|
||||
Me.RaisePropertyChanged("HasContents")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
|
||||
System.Runtime.Serialization.DataContractAttribute(Name:="DocumentResult.DocumentObject", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService"), _
|
||||
System.SerializableAttribute()> _
|
||||
Partial Public Class DocumentObject
|
||||
Inherits Object
|
||||
Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
|
||||
|
||||
<System.NonSerializedAttribute()> _
|
||||
Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
|
||||
|
||||
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||
Private FileIdField As String
|
||||
|
||||
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||
Private FileNameField As String
|
||||
|
||||
Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData
|
||||
Get
|
||||
Return Me.extensionDataField
|
||||
End Get
|
||||
Set
|
||||
Me.extensionDataField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||
Public Property FileId() As String
|
||||
Get
|
||||
Return Me.FileIdField
|
||||
End Get
|
||||
Set
|
||||
If (Object.ReferenceEquals(Me.FileIdField, value) <> true) Then
|
||||
Me.FileIdField = value
|
||||
Me.RaisePropertyChanged("FileId")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||
Public Property FileName() As String
|
||||
Get
|
||||
Return Me.FileNameField
|
||||
End Get
|
||||
Set
|
||||
If (Object.ReferenceEquals(Me.FileNameField, value) <> true) Then
|
||||
Me.FileNameField = value
|
||||
Me.RaisePropertyChanged("FileName")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Protected Sub RaisePropertyChanged(ByVal propertyName As String)
|
||||
Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
|
||||
If (Not (propertyChanged) Is Nothing) Then
|
||||
propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
End Class
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
|
||||
System.Runtime.Serialization.DataContractAttribute(Name:="IndexResult", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService"), _
|
||||
@ -419,96 +299,6 @@ Namespace EDMIServiceReference
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
|
||||
System.Runtime.Serialization.DataContractAttribute(Name:="DocumentListResponse", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages"& _
|
||||
""), _
|
||||
System.SerializableAttribute()> _
|
||||
Partial Public Class DocumentListResponse
|
||||
Inherits EDMIServiceReference.BaseResponse
|
||||
|
||||
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||
Private DatatableField As System.Data.DataTable
|
||||
|
||||
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||
Public Property Datatable() As System.Data.DataTable
|
||||
Get
|
||||
Return Me.DatatableField
|
||||
End Get
|
||||
Set
|
||||
If (Object.ReferenceEquals(Me.DatatableField, value) <> true) Then
|
||||
Me.DatatableField = value
|
||||
Me.RaisePropertyChanged("Datatable")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
|
||||
System.Runtime.Serialization.DataContractAttribute(Name:="BaseResponse", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages"& _
|
||||
""), _
|
||||
System.SerializableAttribute(), _
|
||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentListResponse))> _
|
||||
Partial Public Class BaseResponse
|
||||
Inherits Object
|
||||
Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
|
||||
|
||||
<System.NonSerializedAttribute()> _
|
||||
Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
|
||||
|
||||
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||
Private ErrorMessageField As String
|
||||
|
||||
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||
Private OKField As Boolean
|
||||
|
||||
<Global.System.ComponentModel.BrowsableAttribute(false)> _
|
||||
Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData
|
||||
Get
|
||||
Return Me.extensionDataField
|
||||
End Get
|
||||
Set
|
||||
Me.extensionDataField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||
Public Property ErrorMessage() As String
|
||||
Get
|
||||
Return Me.ErrorMessageField
|
||||
End Get
|
||||
Set
|
||||
If (Object.ReferenceEquals(Me.ErrorMessageField, value) <> true) Then
|
||||
Me.ErrorMessageField = value
|
||||
Me.RaisePropertyChanged("ErrorMessage")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||
Public Property OK() As Boolean
|
||||
Get
|
||||
Return Me.OKField
|
||||
End Get
|
||||
Set
|
||||
If (Me.OKField.Equals(value) <> true) Then
|
||||
Me.OKField = value
|
||||
Me.RaisePropertyChanged("OK")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Protected Sub RaisePropertyChanged(ByVal propertyName As String)
|
||||
Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
|
||||
If (Not (propertyChanged) Is Nothing) Then
|
||||
propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
|
||||
System.ServiceModel.ServiceContractAttribute([Namespace]:="http://DigitalData.Services.EDMIService", ConfigurationName:="EDMIServiceReference.IEDMIService")> _
|
||||
Public Interface IEDMIService
|
||||
@ -593,11 +383,12 @@ Namespace EDMIServiceReference
|
||||
"onse")> _
|
||||
Function GetDocumentByContainerIdAsync(ByVal ContainerId As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResultOld)
|
||||
|
||||
'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (DocumentImportRequest) von Nachricht "DocumentImportRequest" nicht mit dem Standardwert (ImportFile) übereinstimmt.
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/ImportFile", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/ImportFileResponse")> _
|
||||
Function ImportFile(ByVal FileName As String, ByVal Contents() As Byte, ByVal ObjectStoreId As Long, ByVal DocumentType As String, ByVal RetentionDays As Long) As EDMIServiceReference.DocumentResult
|
||||
Function ImportFile(ByVal request As EDMIServiceReference.DocumentImportRequest) As EDMIServiceReference.DocumentImportResponse
|
||||
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/ImportFile", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/ImportFileResponse")> _
|
||||
Function ImportFileAsync(ByVal FileName As String, ByVal Contents() As Byte, ByVal ObjectStoreId As Long, ByVal DocumentType As String, ByVal RetentionDays As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult)
|
||||
Function ImportFileAsync(ByVal request As EDMIServiceReference.DocumentImportRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentImportResponse)
|
||||
|
||||
'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (DocumentStreamRequest) von Nachricht "DocumentStreamRequest" nicht mit dem Standardwert (GetFileByObjectId) übereinstimmt.
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdResponse")> _
|
||||
@ -606,11 +397,12 @@ Namespace EDMIServiceReference
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdResponse")> _
|
||||
Function GetFileByObjectIdAsync(ByVal request As EDMIServiceReference.DocumentStreamRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentStreamResponse)
|
||||
|
||||
'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Vorgang ListFilesForUser weder in RPC noch in einem Dokument eingeschlossen ist.
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/ListFilesForUser", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/ListFilesForUserResponse")> _
|
||||
Function ListFilesForUser() As EDMIServiceReference.DocumentListResponse
|
||||
Function ListFilesForUser(ByVal request As EDMIServiceReference.ListFilesForUserRequest) As EDMIServiceReference.DocumentListResponse
|
||||
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/ListFilesForUser", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/ListFilesForUserResponse")> _
|
||||
Function ListFilesForUserAsync() As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse)
|
||||
Function ListFilesForUserAsync(ByVal request As EDMIServiceReference.ListFilesForUserRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse)
|
||||
|
||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/NewFileIndex", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/NewFileIndexResponse")> _
|
||||
Function NewFileIndex(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Syskey As String, ByVal LanguageCode As String, ByVal Value As String) As EDMIServiceReference.IndexResult
|
||||
@ -619,6 +411,60 @@ Namespace EDMIServiceReference
|
||||
Function NewFileIndexAsync(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Syskey As String, ByVal LanguageCode As String, ByVal Value As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.IndexResult)
|
||||
End Interface
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
|
||||
System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced), _
|
||||
System.ServiceModel.MessageContractAttribute(WrapperName:="DocumentImportRequest", WrapperNamespace:="http://DigitalData.Services.EDMIService", IsWrapped:=true)> _
|
||||
Partial Public Class DocumentImportRequest
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)> _
|
||||
Public Contents() As Byte
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=1)> _
|
||||
Public DocumentType As String
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=2)> _
|
||||
Public FileName As String
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=3)> _
|
||||
Public ObjectStoreId As Long
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=4)> _
|
||||
Public RetentionDays As Long
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal Contents() As Byte, ByVal DocumentType As String, ByVal FileName As String, ByVal ObjectStoreId As Long, ByVal RetentionDays As Long)
|
||||
MyBase.New
|
||||
Me.Contents = Contents
|
||||
Me.DocumentType = DocumentType
|
||||
Me.FileName = FileName
|
||||
Me.ObjectStoreId = ObjectStoreId
|
||||
Me.RetentionDays = RetentionDays
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
|
||||
System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced), _
|
||||
System.ServiceModel.MessageContractAttribute(WrapperName:="DocumentImportResponse", WrapperNamespace:="http://DigitalData.Services.EDMIService", IsWrapped:=true)> _
|
||||
Partial Public Class DocumentImportResponse
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)> _
|
||||
Public ObjectId As Long
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal ObjectId As Long)
|
||||
MyBase.New
|
||||
Me.ObjectId = ObjectId
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
|
||||
System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced), _
|
||||
@ -661,6 +507,36 @@ Namespace EDMIServiceReference
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
|
||||
System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced), _
|
||||
System.ServiceModel.MessageContractAttribute(IsWrapped:=false)> _
|
||||
Partial Public Class ListFilesForUserRequest
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
|
||||
System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced), _
|
||||
System.ServiceModel.MessageContractAttribute(WrapperName:="DocumentListResponse", WrapperNamespace:="http://DigitalData.Services.EDMIService", IsWrapped:=true)> _
|
||||
Partial Public Class DocumentListResponse
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)> _
|
||||
Public Datatable As System.Data.DataTable
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal Datatable As System.Data.DataTable)
|
||||
MyBase.New
|
||||
Me.Datatable = Datatable
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")> _
|
||||
Public Interface IEDMIServiceChannel
|
||||
Inherits EDMIServiceReference.IEDMIService, System.ServiceModel.IClientChannel
|
||||
@ -788,12 +664,35 @@ Namespace EDMIServiceReference
|
||||
Return MyBase.Channel.GetDocumentByContainerIdAsync(ContainerId)
|
||||
End Function
|
||||
|
||||
Public Function ImportFile(ByVal FileName As String, ByVal Contents() As Byte, ByVal ObjectStoreId As Long, ByVal DocumentType As String, ByVal RetentionDays As Long) As EDMIServiceReference.DocumentResult Implements EDMIServiceReference.IEDMIService.ImportFile
|
||||
Return MyBase.Channel.ImportFile(FileName, Contents, ObjectStoreId, DocumentType, RetentionDays)
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_ImportFile(ByVal request As EDMIServiceReference.DocumentImportRequest) As EDMIServiceReference.DocumentImportResponse Implements EDMIServiceReference.IEDMIService.ImportFile
|
||||
Return MyBase.Channel.ImportFile(request)
|
||||
End Function
|
||||
|
||||
Public Function ImportFileAsync(ByVal FileName As String, ByVal Contents() As Byte, ByVal ObjectStoreId As Long, ByVal DocumentType As String, ByVal RetentionDays As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult) Implements EDMIServiceReference.IEDMIService.ImportFileAsync
|
||||
Return MyBase.Channel.ImportFileAsync(FileName, Contents, ObjectStoreId, DocumentType, RetentionDays)
|
||||
Public Function ImportFile(ByVal Contents() As Byte, ByVal DocumentType As String, ByVal FileName As String, ByVal ObjectStoreId As Long, ByVal RetentionDays As Long) As Long
|
||||
Dim inValue As EDMIServiceReference.DocumentImportRequest = New EDMIServiceReference.DocumentImportRequest()
|
||||
inValue.Contents = Contents
|
||||
inValue.DocumentType = DocumentType
|
||||
inValue.FileName = FileName
|
||||
inValue.ObjectStoreId = ObjectStoreId
|
||||
inValue.RetentionDays = RetentionDays
|
||||
Dim retVal As EDMIServiceReference.DocumentImportResponse = CType(Me,EDMIServiceReference.IEDMIService).ImportFile(inValue)
|
||||
Return retVal.ObjectId
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_ImportFileAsync(ByVal request As EDMIServiceReference.DocumentImportRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentImportResponse) Implements EDMIServiceReference.IEDMIService.ImportFileAsync
|
||||
Return MyBase.Channel.ImportFileAsync(request)
|
||||
End Function
|
||||
|
||||
Public Function ImportFileAsync(ByVal Contents() As Byte, ByVal DocumentType As String, ByVal FileName As String, ByVal ObjectStoreId As Long, ByVal RetentionDays As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentImportResponse)
|
||||
Dim inValue As EDMIServiceReference.DocumentImportRequest = New EDMIServiceReference.DocumentImportRequest()
|
||||
inValue.Contents = Contents
|
||||
inValue.DocumentType = DocumentType
|
||||
inValue.FileName = FileName
|
||||
inValue.ObjectStoreId = ObjectStoreId
|
||||
inValue.RetentionDays = RetentionDays
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).ImportFileAsync(inValue)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
@ -820,12 +719,25 @@ Namespace EDMIServiceReference
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).GetFileByObjectIdAsync(inValue)
|
||||
End Function
|
||||
|
||||
Public Function ListFilesForUser() As EDMIServiceReference.DocumentListResponse Implements EDMIServiceReference.IEDMIService.ListFilesForUser
|
||||
Return MyBase.Channel.ListFilesForUser
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_ListFilesForUser(ByVal request As EDMIServiceReference.ListFilesForUserRequest) As EDMIServiceReference.DocumentListResponse Implements EDMIServiceReference.IEDMIService.ListFilesForUser
|
||||
Return MyBase.Channel.ListFilesForUser(request)
|
||||
End Function
|
||||
|
||||
Public Function ListFilesForUserAsync() As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse) Implements EDMIServiceReference.IEDMIService.ListFilesForUserAsync
|
||||
Return MyBase.Channel.ListFilesForUserAsync
|
||||
Public Function ListFilesForUser() As System.Data.DataTable
|
||||
Dim inValue As EDMIServiceReference.ListFilesForUserRequest = New EDMIServiceReference.ListFilesForUserRequest()
|
||||
Dim retVal As EDMIServiceReference.DocumentListResponse = CType(Me,EDMIServiceReference.IEDMIService).ListFilesForUser(inValue)
|
||||
Return retVal.Datatable
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Function EDMIServiceReference_IEDMIService_ListFilesForUserAsync(ByVal request As EDMIServiceReference.ListFilesForUserRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse) Implements EDMIServiceReference.IEDMIService.ListFilesForUserAsync
|
||||
Return MyBase.Channel.ListFilesForUserAsync(request)
|
||||
End Function
|
||||
|
||||
Public Function ListFilesForUserAsync() As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse)
|
||||
Dim inValue As EDMIServiceReference.ListFilesForUserRequest = New EDMIServiceReference.ListFilesForUserRequest()
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).ListFilesForUserAsync(inValue)
|
||||
End Function
|
||||
|
||||
Public Function NewFileIndex(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Syskey As String, ByVal LanguageCode As String, ByVal Value As String) As EDMIServiceReference.IndexResult Implements EDMIServiceReference.IEDMIService.NewFileIndex
|
||||
|
||||
@ -151,10 +151,10 @@
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ImportFile">
|
||||
<soap12:operation soapAction="http://DigitalData.Services.EDMIService/IEDMIService/ImportFile" style="document" />
|
||||
<wsdl:input>
|
||||
<wsdl:input name="DocumentImportRequest">
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<wsdl:output name="DocumentImportResponse">
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
@ -173,7 +173,7 @@
|
||||
<wsdl:input>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<wsdl:output name="DocumentListResponse">
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
Public Class Constants
|
||||
' Infos about MaxBufferSize and MaxBufferPoolSize
|
||||
' https://social.msdn.microsoft.com/Forums/vstudio/en-US/d6e234d3-942f-4e9d-8470-32618d3f3212/maxbufferpoolsize-vs-maxbuffersize?forum=wcf
|
||||
|
||||
Public Const MAX_RECEIVED_MESSAGE_SIZE = 2147483647 ' 1GB
|
||||
Public Const MAX_BUFFER_SIZE = 2147483647 ' 10MB
|
||||
Public Const MAX_BUFFER_POOL_SIZE = 2147483647 ' 40MB
|
||||
|
||||
Public Const MAX_CONNECTIONS = 500
|
||||
Public Const MAX_ARRAY_LENGTH = 2147483647
|
||||
Public Const MAX_STRING_CONTENT_LENGTH = 2147483647
|
||||
End Class
|
||||
@ -1,200 +0,0 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||
Imports System.ServiceModel
|
||||
Imports System.IO
|
||||
|
||||
Public Class Document
|
||||
Private _logger As Logger
|
||||
Private _logConfig As LogConfig
|
||||
Private _channelFactory As ChannelFactory(Of IEDMIServiceChannel)
|
||||
Private _channel As IEDMIServiceChannel
|
||||
|
||||
''' <summary>
|
||||
''' Creates a new EDMIAPI object
|
||||
''' </summary>
|
||||
''' <param name="LogConfig">LogConfig object</param>
|
||||
''' <param name="ServiceAdress">The full service url to connect to</param>
|
||||
Public Sub New(LogConfig As LogConfig, ServiceAdress As String)
|
||||
_logger = LogConfig.GetLogger()
|
||||
_logConfig = LogConfig
|
||||
|
||||
Try
|
||||
Dim oBinding = Channel.GetBinding()
|
||||
Dim oAddress = New EndpointAddress(ServiceAdress)
|
||||
Dim oFactory = New ChannelFactory(Of IEDMIServiceChannel)(oBinding, oAddress)
|
||||
|
||||
_channelFactory = oFactory
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Connect to the service
|
||||
''' </summary>
|
||||
''' <returns>True if connection was successful, false otherwise</returns>
|
||||
Public Function Connect() As Boolean
|
||||
Try
|
||||
_channel = GetChannel()
|
||||
|
||||
_logger.Debug("Opening channel..")
|
||||
_channel.Open()
|
||||
|
||||
_logger.Info("Connection to Service established!")
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Imports a file by filename
|
||||
''' </summary>
|
||||
''' <param name="FilePath">The filename to import</param>
|
||||
''' <returns>A document object</returns>
|
||||
Public Async Function ImportFileAsync(FilePath As String, Optional [ReadOnly] As Boolean = False, Optional RetentionDays As Integer = 0) As Task(Of DocumentResult)
|
||||
Try
|
||||
Using oStream As New FileStream(FilePath, FileMode.Open)
|
||||
Dim oContents As Byte() = {}
|
||||
Dim oBytesRead = Await oStream.ReadAsync(oContents, 0, oStream.Length)
|
||||
Dim oResult = Await _channel.ImportFileAsync(FilePath, oContents, 1, "WichtigesDokument", RetentionDays)
|
||||
|
||||
Return oResult
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Imports a file by filename
|
||||
''' </summary>
|
||||
''' <param name="FilePath">The filename to import</param>
|
||||
''' <returns>A document object</returns>
|
||||
Public Function ImportFile(FilePath As String) As DocumentResult
|
||||
Try
|
||||
Dim oContents As Byte() = File.ReadAllBytes(FilePath)
|
||||
Dim oInfo As New FileInfo(FilePath)
|
||||
Dim oDocObject = _channel.ImportFile(FilePath, oContents, 1, "WichtigesDokument", 0)
|
||||
Return oDocObject
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''' <summary>
|
||||
'''' Imports a file by filename
|
||||
'''' </summary>
|
||||
'''' <param name="FilePath">The filename to import</param>
|
||||
'''' <returns>A document object</returns>
|
||||
'Public Function ImportFile(FilePath As String) As DocumentResult
|
||||
' Try
|
||||
' Dim oContents As Byte() = File.ReadAllBytes(FilePath)
|
||||
' Dim oInfo As New FileInfo(FilePath)
|
||||
' Dim oName As String = oInfo.Name
|
||||
' Dim oExtension As String = oInfo.Extension.Substring(1)
|
||||
|
||||
' Dim oDocObject = _channel.NewFile(oName, oContents)
|
||||
' Return oDocObject
|
||||
' Catch ex As Exception
|
||||
' _logger.Error(ex)
|
||||
' Throw ex
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
'''' <summary>
|
||||
'''' Imports a file by filename
|
||||
'''' </summary>
|
||||
'''' <param name="FilePath">The filename to import</param>
|
||||
'''' <returns>A document object</returns>
|
||||
'Public Async Function ImportFileAsync(FilePath As String) As Task(Of DocumentResult)
|
||||
' Try
|
||||
' Dim oContents As Byte() = File.ReadAllBytes(FilePath)
|
||||
' Dim oInfo As New FileInfo(FilePath)
|
||||
' Dim oName As String = oInfo.Name
|
||||
' Dim oExtension As String = oInfo.Extension.Substring(1)
|
||||
|
||||
' Dim oDocObject = Await _channel.NewFileAsync(oName, oContents)
|
||||
' Return oDocObject
|
||||
' Catch ex As Exception
|
||||
' _logger.Error(ex)
|
||||
' Throw ex
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
'Public Async Function NewFileIndexAsync(DocObject As DocumentObject, Syskey As String, LanguageCode As String, Value As String) As Task(Of IndexResult)
|
||||
' Try
|
||||
' Dim oResult As IndexResult = Await _channel.NewFileIndexAsync(DocObject, Syskey, LanguageCode, Value)
|
||||
|
||||
' Return oResult
|
||||
' Catch ex As Exception
|
||||
' _logger.Error(ex)
|
||||
' Throw ex
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
'Public Function NewFileIndex(DocObject As DocumentObject, Syskey As String, LanguageCode As String, Value As String) As IndexResult
|
||||
' Try
|
||||
' Dim oResult As IndexResult = _channel.NewFileIndex(DocObject, Syskey, LanguageCode, Value)
|
||||
|
||||
' Return oResult
|
||||
' Catch ex As Exception
|
||||
' _logger.Error(ex)
|
||||
' Throw ex
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
'Public Function GetDocumentByDocumentId(DocumentId As Int64) As DocumentResult
|
||||
' Try
|
||||
' Return _channel.GetDocumentByDocumentId(DocumentId)
|
||||
' Catch ex As Exception
|
||||
' _logger.Error(ex)
|
||||
' Throw ex
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
'Public Function GetDocumentByContainerId(ContainerId As String) As DocumentResult
|
||||
' Try
|
||||
' Return _channel.GetDocumentByContainerId(ContainerId)
|
||||
' Catch ex As Exception
|
||||
' _logger.Error(ex)
|
||||
' Throw ex
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
''' <summary>
|
||||
''' Aborts the channel and creates a new connection
|
||||
''' </summary>
|
||||
Private Sub Reconnect()
|
||||
_logger.Warn("Connection faulted. Trying to reconnect..")
|
||||
|
||||
Try
|
||||
_channel.Abort()
|
||||
_channel = GetChannel()
|
||||
_channel.Open()
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Creates a channel and adds a Faulted-Handler
|
||||
''' </summary>
|
||||
''' <returns>A channel object</returns>
|
||||
Private Function GetChannel() As IEDMIServiceChannel
|
||||
Try
|
||||
_logger.Debug("Creating channel..")
|
||||
Dim oChannel = _channelFactory.CreateChannel()
|
||||
|
||||
AddHandler oChannel.Faulted, AddressOf Reconnect
|
||||
|
||||
Return oChannel
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
@ -72,14 +72,13 @@
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Channel.vb" />
|
||||
<Compile Include="Client\Channel.vb" />
|
||||
<Compile Include="Connected Services\EDMIServiceReference\Reference.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Constants.vb" />
|
||||
<Compile Include="Document.vb" />
|
||||
<Compile Include="Client.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
@ -106,10 +105,10 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse.datasource">
|
||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentImportResponse.datasource">
|
||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||
</None>
|
||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentResult.datasource">
|
||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse.datasource">
|
||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||
</None>
|
||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentResultOld.datasource">
|
||||
@ -133,9 +132,6 @@
|
||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.Filesystem.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Messages.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.wsdl" />
|
||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
@ -160,6 +156,7 @@
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\DataSources\System.Data.DataTable.datasource" />
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is automatically generated by Visual Studio .Net. It is
|
||||
used to store generic object data source configuration information.
|
||||
Renaming the file extension or editing the content of this file may
|
||||
cause the file to be unrecognizable by the program.
|
||||
-->
|
||||
<GenericObjectDataSource DisplayName="DataTable" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TypeInfo>System.Data.DataTable, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</TypeInfo>
|
||||
</GenericObjectDataSource>
|
||||
@ -33,6 +33,8 @@ Public Class EDMIService
|
||||
_username = oUsername
|
||||
_logger = LogConfig.GetLogger()
|
||||
_logger.Debug("New Request by User [{0}]", _username)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function StripDomainFromUsername(UserName As String)
|
||||
@ -313,16 +315,14 @@ Public Class EDMIService
|
||||
''' <summary>
|
||||
''' Imports a file according to ObjectStoreId
|
||||
''' </summary>
|
||||
''' <param name="FileName"></param>
|
||||
''' <param name="Contents"></param>
|
||||
''' <returns></returns>
|
||||
Public Function ImportFile(FileName As String, Contents() As Byte, ObjectStoreId As Int64, DocumentType As String, Optional RetentionDays As Int64 = Nothing) As DocumentResult Implements IEDMIService.ImportFile
|
||||
Public Function ImportFile(Data As Messages.DocumentImportRequest) As Messages.DocumentImportResponse Implements IEDMIService.ImportFile
|
||||
Dim oObjectStore = GlobalState.ObjectStores.
|
||||
Where(Function(s) s.Id = ObjectStoreId).
|
||||
Where(Function(s) s.Id = Data.ObjectStoreId).
|
||||
FirstOrDefault()
|
||||
|
||||
If oObjectStore Is Nothing Then
|
||||
Return New DocumentResult($"Object Store with Id [{ObjectStoreId}] does not exist!")
|
||||
Throw New FaultException($"Object Store with Id [{Data.ObjectStoreId}] does not exist!")
|
||||
End If
|
||||
|
||||
Dim EDMIPath = New EDMI.File.Path(LogConfig, oObjectStore.Path)
|
||||
@ -335,24 +335,23 @@ Public Class EDMIService
|
||||
' and return ObjectStore Path from ObjectStoreId + RelativePath
|
||||
' VWIDB_OBJECTSTORE
|
||||
|
||||
Dim oRelativePath As String = EDMIPath.GetRelativePath(DocumentType, FileName)
|
||||
Dim oAbsolutePath As String = EDMIPath.GetFullPath(DocumentType, FileName)
|
||||
Dim oDirectoryPath = EDMIPath.GetFullPath(DocumentType)
|
||||
Dim oDocument = New DocumentResult.DocumentObject With {.FileName = FileName}
|
||||
Dim oRelativePath As String = EDMIPath.GetRelativePath(Data.DocumentType, Data.FileName)
|
||||
Dim oAbsolutePath As String = EDMIPath.GetFullPath(Data.DocumentType, Data.FileName)
|
||||
Dim oDirectoryPath = EDMIPath.GetFullPath(Data.DocumentType)
|
||||
|
||||
Try
|
||||
Directory.CreateDirectory(oDirectoryPath)
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Return New DocumentResult(ex.Message)
|
||||
Throw New FaultException(ex.Message)
|
||||
End Try
|
||||
|
||||
Try
|
||||
Dim oVersionedFileName As String = Filesystem.GetVersionedFilename(oAbsolutePath)
|
||||
|
||||
_logger.Info("ImportFile: Saving file [{0}] to path [{1}]", FileName, oVersionedFileName)
|
||||
_logger.Info("ImportFile: Saving file [{0}] to path [{1}]", Data.FileName, oVersionedFileName)
|
||||
Using oStream = New FileStream(oVersionedFileName, FileMode.CreateNew)
|
||||
oStream.Write(Contents, 0, Contents.Length)
|
||||
oStream.Write(Data.Contents, 0, Data.Contents.Length)
|
||||
oStream.Flush(True)
|
||||
oStream.Close()
|
||||
End Using
|
||||
@ -367,12 +366,10 @@ Public Class EDMIService
|
||||
|
||||
Dim oObjectId = MSSQL.GetScalarValue(oCommand, "@IDB_OBJ_ID")
|
||||
|
||||
oDocument.FileId = oObjectId
|
||||
|
||||
Return New DocumentResult(oDocument)
|
||||
Return New Messages.DocumentImportResponse() With {.ObjectId = oObjectId}
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Return New DocumentResult(ex.Message)
|
||||
Throw New FaultException(ex.Message)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
@ -427,7 +424,7 @@ Public Class EDMIService
|
||||
|
||||
Public Function ListFilesForUser() As Messages.DocumentListResponse Implements IEDMIService.ListFilesForUser
|
||||
Try
|
||||
Dim oSQL = $"SELECT * FROM VWIDB_DOC_DATA WHERE ADDED_WHO = UPPER('{_username}')"
|
||||
Dim oSQL = $"SELECT * FROM VWIDB_DOC_DATA"
|
||||
Dim oDatatable As DataTable = MSSQL.GetDatatable(oSQL)
|
||||
oDatatable.TableName = "DocumentList"
|
||||
|
||||
|
||||
@ -49,7 +49,8 @@ Interface IEDMIService
|
||||
|
||||
#Region "Document (New)"
|
||||
<OperationContract>
|
||||
Function ImportFile(FileName As String, Contents As Byte(), ObjectStoreId As Int64, DocumentType As String, Optional RetentionDays As Int64 = Nothing) As DocumentResult
|
||||
Function ImportFile(Data As Messages.DocumentImportRequest) As Messages.DocumentImportResponse
|
||||
'Function ImportFile(FileName As String, Contents As Byte(), ObjectStoreId As Int64, DocumentType As String, Optional RetentionDays As Int64 = Nothing) As Messages.DocumentImportResponse
|
||||
|
||||
<OperationContract>
|
||||
Function GetFileByObjectId(Data As Messages.DocumentStreamRequest) As Messages.DocumentStreamResponse
|
||||
|
||||
@ -3,29 +3,30 @@ Imports System.Runtime.Serialization
|
||||
Imports System.ServiceModel
|
||||
|
||||
Namespace Messages
|
||||
<Serializable>
|
||||
<DataContract>
|
||||
<KnownType(GetType(DBNull))>
|
||||
Public MustInherit Class BaseResponse
|
||||
<DataMember>
|
||||
Public Property OK As Boolean
|
||||
<DataMember>
|
||||
Public Property ErrorMessage As String
|
||||
<MessageContract>
|
||||
Public Class DocumentImportRequest
|
||||
<MessageBodyMember>
|
||||
Public Contents() As Byte
|
||||
<MessageBodyMember>
|
||||
Public ObjectStoreId As Long
|
||||
<MessageBodyMember>
|
||||
Public FileName As String
|
||||
<MessageBodyMember>
|
||||
Public DocumentType As String
|
||||
<MessageBodyMember>
|
||||
Public RetentionDays As Long = 0
|
||||
End Class
|
||||
|
||||
Public Sub New()
|
||||
OK = True
|
||||
End Sub
|
||||
|
||||
Public Sub New(ErrorMessage As String)
|
||||
OK = False
|
||||
Me.ErrorMessage = ErrorMessage
|
||||
End Sub
|
||||
<MessageContract>
|
||||
Public Class DocumentImportResponse
|
||||
<MessageBodyMember>
|
||||
Public ObjectId As Long
|
||||
End Class
|
||||
|
||||
<MessageContract>
|
||||
Public Class DocumentStreamRequest
|
||||
<MessageBodyMember>
|
||||
Public ObjectId As Int64
|
||||
Public ObjectId As Long
|
||||
End Class
|
||||
|
||||
<MessageContract>
|
||||
@ -37,9 +38,10 @@ Namespace Messages
|
||||
Public FileContents As Stream
|
||||
End Class
|
||||
|
||||
<MessageContract>
|
||||
<KnownType(GetType(DBNull))>
|
||||
Public Class DocumentListResponse
|
||||
Inherits BaseResponse
|
||||
|
||||
<MessageBodyMember>
|
||||
Public Datatable As DataTable
|
||||
End Class
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user