cancel
Showing results for 
Search instead for 
Did you mean: 

Storing image file via Hyland services API

Chris_Montgomer
Champ in-the-making
Champ in-the-making

Hello,

We currently use the Hyland Services API in our Java application to store and retrieve documents.  We currently store PDF, Excel and XML files.  We have a new requirement for storing image files, and for ease of use would like to be able to import these to OnBase via the API.  However, when trying to store an image (GIF or TIF), I'm getting an exception thrown (see below).

We just upgraded our test environment to version 11 SP1.  I am able to import an image to the document type using the OnBase Web Client sucessfully, so I believe the document type configuration is valid.  I have ensured that the fileTypeID is the ID for "Image File Format" (2).

The "List`1 filePaths" part of the error has me stumped, because the document bytes are passed in, not a file path.  Has anyone encountered this error, or know what my issue may be? 

Thanks,

Chris Montgomery

Event Type:         Error

Event Source:     Hyland Application Server

Event Category: None

Event ID:              0

Date:                    11/3/2011

Time:                    12:46:17 PM

User:                    N/A

Computer:           BOSONBASET

Description:

 

 

1) Exception Information

*********************************************

Exception Type: System.Runtime.InteropServices.SEHException

ErrorCode: -2147467259

Message: External component has thrown an exception.

Data: System.Collections.ListDictionaryInternal

TargetSite: DMCOREX.OBXPropertyBag ProcessArchivalTokenEx(System.Object)

HelpLink: NULL

Source: Hyland.Public.Services

 

StackTrace Information

*********************************************

   at DMCOREX.IOBXStorageProvider.ProcessArchivalTokenEx(Object varArchivalToken)

   at Hyland.Public.Services.Module.archiveEx(IOBXSession session, ArchivalToken token, List`1 filePaths)

   at Hyland.Public.Services.Module.ArchiveDocumentEx(ArchivalToken token, List`1 filePaths)

   at Hyland.Public.Services.Core.storeDocument()

13 REPLIES 13

Victor_Pudelsk3
Champ on-the-rise
Champ on-the-rise

if you have the OnBase Diagnostics Console and can run that when you recreate the erro rthat would be the most helpful to try to diagnose this issue.

Chris_Montgomer
Champ in-the-making
Champ in-the-making

This posting is for the sake of closure on this item.  This issue was resolved when we made some changes in the Desktop Client.  We had evidently missed something in the install of version 11.  According to API support "Hyland Services is not dependent on the Desktop Client, but it does use some of the same legacy DLLs that the Desktop does. ...  They aren’t supposed to be related, but the common core that they share probably got reinstalled when [you] set up the Desktop. If something was missing or incorrectly registered from the original install, that could fix it."

And yes, Hyland Services is not in active development because it is someday going to be deprecated, but it is still being supported.

Sarah_Doyle
Champ in-the-making
Champ in-the-making

Hi Chris,

I just posted a problem in the wrong place - under core - anyway we are using the hyland services java api for our portal and I see in your post you are uploading excel - do you also retreive with the api? The excel file seems to get corrupted when we do this - every other method of retreiving the doc seems to work okay - java web client , thick and activex web. Any idea what could be going wrong?  

Thanks,

Sarah Doyle, Benjamin Moore Paints

Chris_Montgomer
Champ in-the-making
Champ in-the-making

Hi Sarah,

We had not retrieved the Excel documents via the API before, but I just did a test retrieval on one that I had stored previously, and it came back no problem.  When we first set up our app, however, we had some problems retrieving XML documents until we changed the "contentType" parameter to "Native Format," as in this snippet:

IRequest request = (IRequest)Factory.CreateObject(IRequest.class); request.SetServiceProvider(OnBaseConstants.ONBASE_SERVICE_PROVIDER);

request.SetName(OnBaseConstants.COMMAND_GET_DOCUMENT_DATA);

request.AddParameter("docID", documentId);

request.AddParameter("contentType", "Native Format");

request.AddParameter("render-properties", true);

request.AddParameter("render-keywords", true);

request.AddParameter("render-keywordrecords", true);

request.AddParameter("render-data", true);

It's been a few years, so I don't remember exactly what was happening when retrieving the XML, but perhaps that is something you can investigate in your code.

HTH,

Chris

Sarah_Doyle
Champ in-the-making
Champ in-the-making

We tried the native format with no luck - so the code you used today for excel is basically the same as above?

Thanks for getting back to me!