[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Sending PDF to REST service

Status
Not open for further replies.
G

goo

Guest
Could you explain what I am doing wrong here? serverside: BLOCK-LEVEL ON ERROR UNDO, THROW. DEFINE INPUT PARAMETER ipDocumentId AS CHARACTER NO-UNDO. /*Either rowid or base64encoded filename*/ DEFINE OUTPUT PARAMETER mFile AS MEMPTR NO-UNDO. DEFINE VARIABLE ridDocumentId AS ROWID NO-UNDO. DEFINE VARIABLE oArkiv AS CLASS server.oo.BusinessLogic.Arkivhandler NO-UNDO. ridDocumentId = TO-ROWID(ipDocumentId) NO-ERROR. IF ERROR-STATUS:ERROR OR ridDocumentId = ? THEN DO: oArkiv = NEW server.oo.BusinessLogic.Arkivhandler(). mFile = oArkiv:getFileFromDisk(ipDocumentId). MESSAGE '--->mpFile:size:' GET-SIZE(mFile) VIEW-AS ALERT-BOX. END. CATCH eAny AS Progress.Lang.Error : MESSAGE 'Feilet i ' PROGRAM-NAME(1) ' ' eAny:GetMessage(1) VIEW-AS ALERT-BOX. END CATCH. FINALLY: set-size(mFile) = 0. END. Client side (PASOE Appserver calling another appserver): METHOD PUBLIC memptr getDocumentById(input ipDocumentId as char): def var hServer as handle no-undo. hServer = JBoxSession:Instance:AppServerHandle. MESSAGE 'before.....mpCall' VIEW-AS ALERT-BOX. run download_bydocumentid.p on hServer (input ipDocumentid, output mpFile). MESSAGE 'after ...mpCall....:size:' get-size(mpFile) VIEW-AS ALERT-BOX. return mpFile. CATCH eAny AS Progress.Lang.Error : ASSIGN hasError = TRUE MessageStatus = eAny:GetMessage(1) . END CATCH. END METHOD. I get no error, but get-size gives 0, why?? serverside gives me: [20/02/03@13:40:41.390+0100] P-005728 T-005748 1 AS -- (Procedure: 'download_bydocumentid.p' Line:27) inne i download_bydocumentid.p [20/02/03@13:40:41.402+0100] P-005728 T-005748 1 AS -- (Procedure: 'download_bydocumentid.p' Line:37) --->mpFile:size: 111877

Continue reading...
 
Status
Not open for further replies.
Top