Not Implemented (501) while invoking a method on server.

Posted by mishras on 04-May-2018 00:54

I am trying to implement a basic role based application using KUIB.

I am following document given below.

https://community.progress.com/community_groups/openedge_kendo_ui_builder/w/openedgekendouibuilder/2939.how-to-implement-user-roles-in-kendo-ui-builder-2-1-with-an-openedge-backend

But i am getting the Error:

Exception raised for PUT localhost:8800/.../GetRoles Entity=Customer_1747; Operation=OpenEdge.Web.DataObject.MappedOperation_1513: PUT svc:SportsService v1.0.0 uri:Customer/GetRoles: type:Class ; name:Progress.Lang.Object, type-of:Progress.Lang.Object, fn:, numargs:2, num-schemas:0, name:

Error(s) raised:
Not Implemented (501)

Caused by:
Unable to find class method for OpenEdge.Web.DataObject.MappedOperation_1513: PUT svc:SportsService v1.0.0 uri:Customer/GetRoles: type:Class ; name:Progress.Lang.Object, type-of:Progress.Lang.Object, fn:, numargs:2, num-schemas:0, name: (0)

SendExceptionError status: 501 (Not Implemented)

My catlog includes the following:

"operations": [{
                    "name": "GetRoles",
                    "path": "\/GetRoles",
                    "useBeforeImage": false,
                    "type": "invoke",
                    "verb": "put",
                    "params": [
                        {
                            "name": "clientID",
                            "type": "REQUEST_BODY"
                        },
                        {
                            "name": "allowedRoles",
                            "type": "RESPONSE_BODY"
                        }
                    ]


All Replies

Posted by Anil Kumar on 04-May-2018 05:14

Hi,


Can you please check if the catalog (.json) file has an entry related to this new method (INVOKE).

After adding the INVOKE method (GetRoles) we need to regenerate (Defined Services -> Edit Service -> Finish the dialog) the service in PDS OE such that it adds this new method to service (followed by an entry in the catalog file).

Hope this helps.

Thanks and Regards,
Anil Kumar

Posted by egarcia on 04-May-2018 06:32

> Error(s) raised:

> Not Implemented (501)

> Caused by:

> Unable to find class method for OpenEdge.Web.DataObject.MappedOperation_1513:

The error message seems to indicate that the method "GetRoles" is not found in the Business Entity.

Make sure that that the Business Entity has been deployed and the server is using it.

PDSOE generally would unload the session to remove a previously loaded BE.

You could try to manually re-start the PASOE instance to use the updated BE.

I hope this helps.

Posted by mishras on 09-May-2018 00:05

Hi Anil,

I tried that previously and failed.

Thank you for you feedback.

Regards,

Sudeep Mishra

Posted by mishras on 09-May-2018 00:13

Hi egarcia,

I tried what you suggested. I got the same error.

But as i was altering the code in the method, i changed the OUTPUT param as given below:

METHOD PUBLIC VOID GetRoles(INPUT clientID AS CHARACTER, OUTPUT allowedRoles AS CHARACTER):


By changing the the type of allowedRoles to CHARACTER from CHARACTER Array, I was able to invoke the method successfully.

So i returned a comma seperated string to the frontend.

With a little effort, i was able to assign roles from the backend.

Thanks and Regards,
Sudeep Mishra.

Posted by egarcia on 09-May-2018 05:42

Hello,

Thank you for sharing your findings. This helped to identify the issue.

The issue that you are running into is because the .gen file does not include the EXTENT keyword for the allowRoles field.

There is a bug report for this issue already logged and it expected to be fixed in 11.7.3.

The definition in the .gen file should look like the following:

{

                       "ablName": "allowedRoles",

                       "ablType": "CHARACTER EXTENT",

                       "ioMode": "OUTPUT",

                       "msgElem": {

                           "type": "field",

                           "name": "allowedRoles"

                       }

                   }

Please change back the method definition to use EXTENT and manually update the .gen file.

In this way, the getUserRolesFromServer() method should work fine since it expects the response to be an array.

I hope this helps.

Thank you and regards,

Edsel

Posted by mishras on 09-May-2018 06:20

Hi Edsel,

Edited the .gen file after updating the ABL Service.

Still getting the same error.

Regards,

Sudeep Mishra

Posted by egarcia on 11-May-2018 00:12

The change to the .gen file should have solved the mismatch with the EXTENT parameter.

Perhaps, there is a mismatch between the version of the files that are being used.

Re-starting the server and making sure that the right version of files is used might help.

I would suggest to contact Technical Support if you need someone to assist you on looking at this issue.

(I would like help and do screen-sharing but I am busy at the moment.)

Thank you and regards.

This thread is closed