cancel
Showing results for 
Search instead for 
Did you mean: 

failed to call destination from custom client project

rfqsolt
Explorer
0 Kudos

Hi Expert,

i tried to call hanadb on cloud from metadata using custom client project but i got this error message, so what should i do to make this odata open service call work?

fyi, i'm not changing anything, just create-client from .mdkproject and try to run without debugging, but got this error since it's called hanadb destination from metadata i guess.

Accepted Solutions (0)

Answers (2)

Answers (2)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Muhammad Rifqi

Mobile Services acts as a proxy for your backend. MDK client talks to Mobile Services to get access to your backend service.

Your MDK app should know where to connect to, that is where you need to first configure a destination in Mobile Services cockpit (as Bill mentioned) pointing to your OData service. In Mobile Services cockpit, Mobile Applications> Native/Hybrid> click on your app id > Connectivity (check documentation). Make OData application test. Once you access data successfully, reload the SAP WebIDE, open service file under Services folder >Refresh object. When you see success message, re-deploy metadata (right click on webide project > deploy & activate). Once done, re-launch your custom MDK client, you should get AppUpdate pop-up and initialize the app data service.

rfqsolt
Explorer
0 Kudos

I'm sorry for the misunderstanding that happened, and thanks to you and bill for your explanation. this is the result for ping my service on my mobile services.

as you can see there is no problem with it, even when i deployed my metadata project to mobile services, it worked fine with this service and MDK Mobile App from SAP, there is no error when calling my service. So what i'm trying to do is, this debugging tutorial, that need to run metadata project on VSCode with emulator, but once i tried to run like on 5.2 i got the error message like i screenshot on my question. hope this help you guys to understand. Thank you

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Please try the Odata test button (to the left of the Ping) and verify you can retrieve the metadata from your service and also click Next to pull up data from the Entities. If both of those are returning data correctly that is the verification that your connection to the backend service is correctly configured and working. Then you should be able to connection your MDK application to this destination.

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

The MDK application utilizes the Mobile Services destination. You will need to configure a destination in Mobile Services to point to your HANA db odata endpoint with appropriate SSO Mechanism for your service. You can use the OData test in Mobile Connectivity of your application to verify access to the odata service before attempting from your MDK application. That should resolve any not found issue.

rfqsolt
Explorer
0 Kudos

actually there is no problem if i deploy from WEBIDE, but i run this using MDK Client, you can't use destination while you're using MDK Client, so how to configure destination in .mdkproject?

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Just to confirm, when you refer to deploy from WebIDE you are referring to the MDK Deploy and Activate command to take your MDK metadata and deploy to your Mobile Services App Update.

The destination is always configured in Mobile Services and just referred to by name in your MDK metadata service file.