0

As following Step 7 with SAP S/4HANA Cloud SDK: Secure your Application on SAP Cloud Platform, CloudFoundry and Application programming model I'm able to create Java application exposing OData service and secure it with approuter.

Now I need to connect the odata service to my UI5 application via the approuter endpoint url.

I've created a destination in NEO and tried to connect to the service when generating UI5 template. However, the error 500 Internal server error appears.

How can I connect UI5 app with approuter endpoint url?

UPDATE: Please try to replicate the scenario:

  1. Create an Java application with APM on SAP WebIDE Full stack

  2. Create approuter for this application

  3. Try to create UI5 application with the destination of the approuter.

UPDATE:

  1. It seems I was wrong. The one I need is the url to Java application in MTA file.
  2. I am able to set it in MTA and when deploying to CF, it'll find the odata service exposed by Java application automatically. MTA

Answer: I couldn't find a correct answer. Therefore, I have to include the UI5 application within the same multi-target project. So it can make a call to java module.

Regards,

Tri

Minh Tri Le
  • 91
  • 10
  • Could you provide some more details, i.e. when and where exactly does the error occur, how have you configured your destination, how does your UI5 template look like? – Dennis H Sep 18 '18 at 08:06
  • 2
    Also one more question: the approuter is a Cloud Foundry component, though you've written that you have created a destination in NEO... are you on CF or on NEO? If you're on NEO, you might want to take a look at [step 8 of our blog post series](https://blogs.sap.com/2017/07/18/step-8-with-sap-s4hana-cloud-sdk-secure-your-application-on-sap-cloud-platform-neo/). – Dennis H Sep 18 '18 at 08:09
  • Did you test the destination? – Nandan Chaturvedi Sep 18 '18 at 10:56
  • I'm using SAP WebIDE full stack to develop APM and deploy it to CF. Then I try to connect the odata service exposed by the APM and use it as service url for my UI5 application. – Minh Tri Le Sep 18 '18 at 23:16
  • Have you verified whether the service exposed by the APM (by the way, what is APM?) works on its own, e.g. when you query it with Postman or simply from your browser? – Dennis H Sep 19 '18 at 07:06
  • I can query it with Postman or the browser via approuter. How do you configure a destination with url as the approuter? – Minh Tri Le Sep 20 '18 at 00:37
  • I'm still not entirely sure what you're planning to do. The approuter serves as the single point of entry for your application. So if you have a UI5 frontend application, the approuter should probably point to your UI5 application. Your UI5 application in turn can then directly query your backend application that exposes the OData service. – Dennis H Sep 20 '18 at 08:38
  • I've added steps to replicate the scenario. Can you please try it? – Minh Tri Le Sep 23 '18 at 23:35
  • Hi Tri, I am still missing more details in order to reproduce that. Pls clarify: What does APM stand for in this context? Can you query your OData service running on Neo from your local machine via Postman? Pls share the destination configuration here as well. – Emdee Sep 24 '18 at 06:19
  • Hi Emdee, my scenario is I have custom BO in S/4HANA Cloud and I've generated APM with custom JVM. Now I've created approuter for this APM. After deploying to CF, I'm running the approuter and it takes me to the login page. I use my credentials and am able to query OData service. My problem is now I want to create UI5 with OData service and because the odata service is protected by approuter, how can I configure the destination that UI5 app can use the service. Thanks – Minh Tri Le Sep 24 '18 at 23:28
  • Hi Tri, are you using the S/4HANA Cloud SDK in your scenario? According to your description, you don't, correct? – Emdee Oct 01 '18 at 06:52
  • Hi Emdee, I follow Deep Dive 10 with SAP S/4HANA Cloud SDK: Generating Java VDM for S/4HANA Custom OData Service and use my Custom Business Object. – Minh Tri Le Oct 08 '18 at 02:57
  • Hi Tri, can you kindly share the destination details with us. – Emdee Dec 03 '18 at 08:53
  • Hi Minh Tri Le, have you solved the issue meanwhile? If so, posting an answer on your own would be highly appreciated to help others who find this question. If not, please respond to Emdee's question. Thank you. – Florian Wilhelm Jul 01 '19 at 07:32

0 Answers0