Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
FetchVersion outputStream
Matt_Miranda
Has anyone used the FetchVersion function with outputstream instead of filepath? I am having some trouble getting this to work. Any help is appreciated.
Find more posts tagged with
Comments
eLink User
Message from Carsten Kulms via eLinkAttached you find a simple example (Java) that works.It simply fetches a document's content to stdout.No production quality, just a hint.Provided "as is" without warranty of any kind, either expressedor implied, including, but not limited to, the implied warranties ofmerchantability and fitness for a particular purpose. The entire riskasto the quality and performance of the program is with you. Should theprogram prove defective, you assume the cost of all necessary servicing,repair or correction.P.S.: If you see something likeException in thread "main" com.opentext.api.LLUnknownFieldException:LLValue unknown field name: FileAttributesthen an error occured at LES side (possibly wrong call parameters) whichresulted in an incomplete response to the LAPI client.
Janusz_Frydecki
Which language are you using?
Matt_Miranda
I am using ASP.NET with VB.NET codebehind.Thanks.Matt
Janusz_Frydecki
This is the way we do it:Dim oMemStream As New System.IO.MemoryStreamDim returnValue As Byte()Dim StartTime = DateTime.NowDim iStatus As Integer = MyBase.DocumentsAPI.FetchVersion(MyBase.VolumeID, MyBase.NodeID, Me.m_iVersion, New System.IO.BinaryWriter(oMemStream))MyBase.CheckError(iStatus)returnValue = oMemStream.GetBuffer()If your document was a texte document, you could then doDim strValue as String = (New System.Text.ASCIIEncoding).GetString(returnValue)If you want to write to the ASP.NET output streamOutputStream.Write(returnValue, 0, returnValue.Length)OutputStream.Close()
Juzar_Bharmal
It works perfectly