Hi, I've been getting a 403 error whenever I try and access a REST Service resource set up and published on an active PASOE server. I want to make sure I've got the URI right first of all. The RESTService is called TestLCRService, the Resource is called /Customer, the input parameter in the procedure the GET request is linked to is called pifilter, the query string parameter of this has been named cust-code.So the correct URI is
<computer-name-on-local-network:PASOE-HTTP-Port/TestLCRService/customer/cust-code/1
with the 1 being for the value of the parameter right? I've tried a few variations of this. Am I meant to use ${rest.queryparam['cust-code']} instead? I don't know what to fill in where on that. Thanks in advance.
Hello,
The URL that you are using is missing "rest". This would generally return a 403 error.
You would need "rest" between the web application and the service name.
Example:
oemobiledemo.progress.com/.../Customer
I hope this helps.
Hi [mention:98b1534299774239b816c694c6295179:e9ed411860ed4f2ba0265705b8793d05], how do I know what the web application is called? This is only if you deploy as a web app right? Which I don't think I have done. I have a REST Service attached to my PASOE server called TestLCRService and have tried /TestLCRService/rest/TestLCRService/customer/1 like is recommended here https://knowledgebase.progress.com/articles/Article/How-to-find-the-URI-of-a-REST-service but it still returns 403.
Hi Sanjeev, this does help. By renaming the first term after the <connection> to the project name I now get a 404 error instead of a 403 which i assume is progress? Now I have that as a new problem though haha. As for editing the service, it just brings up the REST Service mapping GUI which doesn't have a sample URI. Though I can see it if I try to make a new REST service with the same name. Thanks, that's useful for future
Hi, the URL I'm using currently is http://<connectionstring>/TestLCR/rest/TestLCRService/customer/1 which I assume is right as I go back to a 403 error if I modify the URI at all.
Here is a screenshot of the REST mapping editor.
Output from browser: Request URL: localhost:8820/.../custom
Hi Sanjeev, thanks for the detailed reply. I had reached the point, before your reply, where if I used http://<connectionstring>/TestLCR/rest/TestLCRService/customer with a file that does what yours does, supposedly just outputting the string entered in, then it instead outputs the URI back out again. If I entered anything after /customer/ I'd get a 404 error. I was using the default executionMode = "singleton" though, using executionMode = "external" didn't work.
The same thing happens when I run your exact code and mapping. Instead of outputting the input string, it outputs a string of the whole URI: http://<connectionstring>/TestLCR/rest/TestLCRService/Customer
OK, thank you very much for your help so far, I really appreciate it!