Invoking REST from ARC

Hi All,

I have created a _post REST webservice and trying to test it from Chrome ARC.
I tried to pass following URL with the JSON message but getting below error:
URL:
http://localhost:5555/rest/Webservices.REST.OrderConfirmation_Rest:_post

Error:
Access denied for user Administrator on port 5555 -> ‘rest/Webservices.REST.OrderConfirmation_Rest:_post’ from 0:0:0:0:0:0:0:1.

However, when i tried to invoke the URL using invoke, it worked fine.
http://localhost:5555/invoke/Webservices.REST.OrderConfirmation_Rest:_post

I have even set the Execute ACL to Anonymous in this _post service.
Just wondering what config I am missing for using rest.
Any help would be much appreciated.

Thanks,
Amit

Figured out the issue myself.

In case of Invoke, the path of service separated by “.” but in case of using REST it is separated by “/”.

Invoke Call:
http://localhost:5555/invoke/Webservices.REST.OrderConfirmation_Rest:_post

Rest Call:
http://localhost:5555/rest/Webservices/REST/OrderConfirmation_Rest/_post

Hi Amit,

Yes. The directive to be used for REST services is “rest”.

Not always, by default it is rest and if you want to change the name of the REST directive you have to mention the setting in IS extended settings

watt.server.RESTDirective=

Everything works as expected. If you want to call the service as REST, send a POST request and specify “http://localhost:5555/rest/Webservices.REST.OrderConfirmation_Rest” as the URL. IS will call the “…:_post” service automatically (because you issue a POST request). If you send a GET request, IS will call the “…:_get” service.

However, if you call the service via “invoke”, you have – as usual – to specify its full name, i.e. “…:_post”

Hi Amit,

Calling the restful service with URL containing “.” is generally discouraged.

Your URL must contain “/” not “.” For the permission error, you can change the flow service permission as " Anonymous" in order to invoke the service.

Regards,
Jacob B

Change the permission of the flow service to anonymous and call the service like below.

POST http://localhost:5555/rest/(resource path separated by /)

Regards,
Jacob B

Hi Al,

To call REST service, we can follow the below format. http://localhost:5555/rest/Webservices/REST/OrderConfirmation_Rest. No need to give

http://localhost:5555/rest/Webservices/REST/OrderConfirmation_Rest/_post

Thanks,