If you have an OData metadata CSDL document and you want to build an OData server from it, you can use the SAP Mobile Services Mobile Backend Tools. SAP Mobile Backend Tools allows the developer to generate an OData services from an OData CSDL file and deploy the service to SAP Business Technology Platform.
In our previous blog post, we know how to add an SAP Mobile Services landscape to Mobile Backend Tools. In order to create a mobile server, you need to create a mobile backend server project first.
Run "MBT: Create Mobile Backend Server Project" command from the Visual Studio Code command palette:
You will be able to see the mobile backend server wizard:
Find an empty directory for the mobile backend server, and specify the location of the OData CSDL document:
Press "OK" button to generate the server:
Click "Open" button to open the mobile backend server project:
Go to the "mobile services" view and click "server1" node:
You will see a mobile backend server config console:
There are 4 buttons you can use with your server:
We will show you how to deploy your mobile backend server to the cloud first. In order to deploy your mobile backend server to the cloud, you need to login to your BTP Cloud Foundry first. Open a terminal and run "cf login" command and ensure you have successfully logged in to the BTP Cloud Foundry at space level.
Click the "Deploy" icon:
In the terminal mobile backend tools will deploy the mobile backend server to BTP Cloud Foundry:
After the server has been successfully deployed, you can test your server in a browser using the application service root URL.
If you have added a mobile services landscape as per the blog post, you can deploy your mobile backend server through the mobile services instances without having to run "cf login". In this blog post, we will also show you how to deploy the server through the "Deploy to Mobile Services" icon:
Click the "Deploy to Mobile Services" button, you will see the mobile services landscape name in the pop up window:
Select this mobile services landscape and press enter key, you will be prompted with an option whether you want to create a mobile destination:
Select "No" because we only want to deploy the service this time, and the deployment is started. Wait until the deployment has been finished:
And then you can test the deployed OData server using your browser:
As a summary, in this blog post we have demonstrated how to generate a mobile backend server using SAP Mobile Services Mobile Backend Tools from an OData CSDL document. We also demonstrated how to deploy the mobile backend server to the SAP BTP Cloud Foundry environment through both the cloud foundry login command and the added mobile services instance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
21 | |
18 | |
11 | |
9 | |
8 | |
8 | |
7 | |
7 | |
5 | |
5 |