[Fixed]Call REST Service on CSP Gateway Server
Hello,
I have a DB server (ser-app-db) where cache is installed as server.
I have a Web server (ser-app-w) where cache is installed as web server and configured as CSP gateway.
I followed the configuration guide (https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...) and ser-app-w perfectly display the CSP and CLS pages.
But that's not working for my REST service, for exemple with the REST sample:
http://ser-app-db/csp/samples/docserver/request(GET): work and show the request
http://ser-app-w/csp/samples/docserver/request(GET): return a 404.
Can someone help me ?
Thanks
Sébastien
since every installation of Caché has it's gateway I'm not clear what you did by
" configured as CSP gateway. "
with no manual change the gateway always talks to your local server ser-app-w
From CSPgatewayMgmt on ser-app-w you should check access to ser-app-db
Hello Robert,
Yes the gateway on ser-app-w is configured to access server ser-app-db.
It works for the cps and cls files, example:
http://ser-app-db/csp/samples/test.csp --> http://ser-app-w/csp/samples/test.csp
http://ser-app-db/csp/samples/test.cls --> http://ser-app-w/csp/samples/test.cls
But it's not working with a web application link like:
http://ser-app-db/csp/samples/docserver/request --> http://ser-app-w/csp/samples/docserver/request
Thanks,
Sébastien
Hi,
i guess you need to add a wildcard * mapping handler to webserver /cspgateway configuration to pass extension-less requests to the caché-server as well. What webserver are you using? IIS or apache?
ah, you are trying with /csp/samples/docserver. Be aware that for security reasons this web-app is by default *disabled*. If you wanna use it you need to *enable* it.
Hi Bernd,
Yes /csp/samples/docserver is enabled in web application and work on the ser-app-db server. But is not working on the ser-app-w server.
I use IIS, i'm not sur to understand where do you want I use the wildcard ?
Thanks,
Sébastien
see here: "Registering Additional File Types with CSP" and "Mapping the CSP File Extensions" right before.
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
Thanks a lot Bernd,
Adding the wildcard in the Handler Mappings was the solution.
Great :)
Thanks,
Have a good day
Sébastien
For the record, this was answered to the satisfaction of the OP by [@Bernd Mueller] in his 28 July 2017 comment, where he wrote:
Pls. don't forget to mark your question as "answered" on Developer Community,
please click the checkmark alongside the answer you (as author of the question) accept