OE11.7 PAS rest response

Posted by MalfaitJ on 16-Aug-2018 09:08

Hi all,

I'm currently in the works of moving our current REST service from the 'classic' appserver to the 'new' PAS.
I have a issue with some of my calls that dont return a dataset or table but instead return a simple boolean or integer.

@openapi.openedge.export(type="REST", useReturnValue="false", writeDataSetBeforeImage="false").
@progress.service.resourceMapping(type="REST", operation="read", URI="~{xyuserid}", alias="", mediaType="application/json").
METHOD PUBLIC VOID GetLoginTaken( INPUT XYUserId AS INT64, INPUT Login AS CHARACTER, OUTPUT isTaken AS LOGICAL):

END METHOD.

this results in the following response from the GET

No message body writer has been found for class java.lang.Boolean, ContentType: application/json

Someone who bumped into this before? I would like to keep the calls as is. if nothing else i could wrap them in a table.

Many thanks
Jens

All Replies

Posted by Peter Judge on 16-Aug-2018 11:08

For the rest transport the “read” operations are required to have this signature . <stuff> are values you can change.
 
 
METHOD PUBLIC VOID <read-method-name> (INPUT filter AS CHARACTER,
                                                                                           OUTPUT DATASET <some-dataset>).
 
If you want that signature, use an “invoke” operation.
               
 

This thread is closed