on 11-26-2018 7:27 AM
Hello Experts,
We generated a OData service using OData service generator. We followed the steps mentioned in the blog
https://blogs.sap.com/2018/09/28/how-to-build-your-mobile-odata-service-from-scratch/
We tried to create a "Automatic instance generation" card type by consuming the service created by Odata service generator. For card creation, we followed the steps mentioned in the blog
While we tried to download the card in mobile, we are getting the below error in the log
An error occured contacting the odata service at SalesOdataGenCard. The returned error was //ODATAPROXY/OdataGenSOITem/SalesOrders - OdataGenSOITem.
While we performed OData Application destination test under connectivity section of mobile cards, we could see the Metadata getting loaded.
Kindly help us here and provide suggestions.
muralidaran.shanmugham2 jitendrakumar.kansal bill.froelich midhun.vp
Regards,
Tharini
Hi
If I understood your description correct you can see data in the mobile services when you open the destination, but the card does not fetch data. Could it be that you added the destination in Mobile Cards pointing to the root of the service?
the destinations in Mobile cards should point to the host url. and the query Url should be relative to the host.
So your destination is: https://hcpms-pXXXXXXXXtrial.hanatrial.ondemand.com
and your query URL is: /mobileservices/origin/hcpms/ESPM.svc/v2/SalesOrderHeaders?$top=3&$expand=Items
find more details in the help: https://help.sap.com/viewer/38dbd9fbb49240f3b4d954e92335e670/Cloud/en-US/2621c40788484b979fd64e67780...
Sami
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
can you try the following please. Take the Metadata.xml from the sample service (https://hcpms-pXXXXXXXXtrial.hanatrial.ondemand.com/SampleServices/ESPM.svc/$metadata) and generate the service from there.
This should then get you a working OData service now if you add three salesOrders the salesOrder template should work out of the box if you point it against that. If you have this working you can than slowly modify and redeploy the service to get to your model.
Sami
Hi,
This is not an error I have seen before. If your destination is correctly configured to point to your deployed service (from Mobile Backend Generator), and you can see the metadata this is a good sign.
The one thing that comes to mind is. During the card creation are you replacing the "sample data" that you get by default from the sample service, to a json payload to get one entity from your actual service?
Also are you correctly configuring the query URL to your service?
Last question: Where are you deploying your Mobile Backend Service, is it NEO or CF? Also are you using Mobile Services to create the Mobile Card in NEO or CF?
thanks,
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin,
1. We have not created the
card from Samples, we used 'User defined template' and had our own simple
sample data .json file
2. Yes the query is valid, this is validated by the check button as well
3. The Mobile Backend service is deployed in Neo, also the mobile service to
create Mobile cards is also on Neo
Regards,
Tharini
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
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.