T
Tim Hutchens
Guest
Ruben, You may also consider modifying the REST annotations in your application so that both input parameters can be interpreted separately by the method being called. I think this is possible, but it might depend on how you are creating your REST service. Look for "@progress.service.resourceMapping" on this page: knowledgebase.progress.com/.../How-does-Progress-interpret-the-annotations-created-in-the-Business-Entity-methods . My examples are based on building a class that inherits from the Business Entity class. If you have full control of the REST API (both server and client), you have options like the one below to work with. You may also look up the WEB transport which gives you a lot more flexibility over how your API URI structure works. I can't guarantee the code below works, but am including it in case it points you in a direction that might help. Essentially, the class file would have something like this at the top. @progress.service.resource FILE(name="Customer", URI="/Customer", schemaName="ds_customer", schemaFile="Apps/AppServer/customer.i"). Then in the read method, you would have something like this: @progress.service.resourceMapping(type="REST", operation="read", URI="/~{custno~}/~{dossierno~}", alias="", mediaType="application/json"). METHOD PUBLIC VOID ReadCustomer( INPUT custno AS CHARACTER, INPUT dossierno AS CHARACTER, OUTPUT DATASET ds_customer): DEFINE VARIABLE filter AS CHARACTER NO-UNDO. /* code to build filter based on custno and dossierno. */ SUPER:ReadData(filter). END METHOD.
Continue reading...
Continue reading...