on 09-25-2017 2:51 PM
Hello Community,
I'm developing a Java Service for the Sap Cloud Platform. It has a Servlet which overrides the doGet-Method and the doPost-Method. The Java Service is deployed on SCP.
I want to call this Servlet by making GET and POST-Requests from a SAPUI5 application to the Service. The SAPUI5 application is developed with the WebIDE and then also deployed on SCP. When starting the SAPUI5 application from the WebIDE its GET- and POST-Requests actually reach the Servlet on the deployed Java Service and everything works as intended, however after I deploy the SAPUI5 application to SCP and run it from there it receives a 404 error when making the GET-Request and a 405 error (Method not allowed) when making the POST-Request.
I have created a destination on SCP which points to the Java Service URL and use it in neo-app.json of the SAPUI5 application.
Any ideas why it works from the WebIDE but won't work after deployment?
Edit (additional information):
The requests are done by a sap.m.UploadCollection-Control (the Url is set in the uploadUrl attribute):
<UploadCollection id="UploadCollection" uploadUrl="/MyService/attachments/" ...>
Entry in neo-app.json:
{
"path": "/MyService/attachments/",
"target": {
"type": "destination",
"name": "MyService_Attachments"
},
"description": "MyService Attachments"
}
Destination Configuration in SCP Cockpit:
Name: MyService_Attachments
Type: HTTP
Description: MyService Attachments
URL: https://<JavaApplication><AccountName>.hana.ondemand.com/MyService/attachments
Proxy Type: Internet
Authentication: AppToAppSSO
<- Additional Properties ->
TrustAll: true
WebIDEEnabled: true
WebIDESystem: My Service
I just found the problem and fixed it.
The app which accesses the Servlet is placed inside a Launchpad app which will open the app (and other apps).
After deployment of the individual apps the 'neo-app.json' of the Launchpad app is used, so I just had to define my Destination in there as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.