[Progress Communities] [Progress OpenEdge ABL] Forum Post: Upload file to REST (Data Object WebSpeed service)

Status
Not open for further replies.
J

jts-law

Guest
We are using OE 11.7.2 on Windows 7 and Server 2012R2 (both 64 bit) and have a REST API using a Data Object WS service for a Kendo UI Builder app. Our app needs to be able to upload a file for processing and I'm struggling to figure out how to implement this on the backend. Since I'm not sure what the signature of the POST method should be, I've been trying different things and nothing works. The latest trial is the following: @openapi.openedge.export(type="REST", useReturnValue="false", writeDataSetBeforeImage="false"). @progress.service.resourceMapping(type="REST", operation="create", URI="", alias="", mediaType="application/octet-stream"). METHOD PUBLIC VOID UploadAcctCat(INPUT mpEntity AS OpenEdge.Net.MultipartEntity): MESSAGE "Received " mpEntity:Size " parts". /* Save contents to a temp file for processing... */ END METHOD. /* UploadAcctCat */ When my KUIB app tries calling this URI, I get the following in the oepas1.agent.log: [18/01/25@09:31:41.622-0600] P-014160 T-013292 1 AS-9 LogMgrWrtr [OE.W.DO.DOH.UI ERROR] Exception raised for POST localhost:8810/.../UploadProfitAcctCat; Entity=UploadProfitAcctCat_4126; Operation=OpenEdge.Web.DataObject.MappedOperation_3508: POST svc:UI v1.0.0 uri:UploadProfitAcctCat: type:Class ; name:progress.Lang.Object, type-of:progress.Lang.Object, fn:, numargs:3, num-schemas:0, name: [18/01/25@09:31:41.622-0600] P-014160 T-013292 1 AS-9 LogMgrWrtr Error(s) raised: [18/01/25@09:31:41.622-0600] P-014160 T-013292 1 AS-9 LogMgrWrtr Unsupported object type: OpenEdge.Net.MultipartEntity (0) [18/01/25@09:31:41.653-0600] P-014160 T-013292 1 AS-9 LogMgrWrtr [OE.W.DO.DOH.UI ERROR] Error writing exception [18/01/25@09:31:41.653-0600] P-014160 T-013292 1 AS-9 LogMgrWrtr Error(s) raised: [18/01/25@09:31:41.653-0600] P-014160 T-013292 1 AS-9 LogMgrWrtr Unsupported object type: Progress.Lang.AppError (0) Any thoughts on how to implement a file upload backend REST service? Louis Winter

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