Skip to Content

CREATE operation using SAP Mobile Platform 3.0.3

Dear All,

There were a lot of speculation of that POST was not supported with SMP 3.0.3 and will be supported with PL02.

I with my friend, Jitendra Kansal figured out that it even works with SMP 3.0.3

The scenario we are testing are using SOAP Web Services.

Step 1.

Create an OData Model of your name choice.

Thing to note here is that we need to define all the input parameters of the Web Services as Keys.

This can be done by selecting a particular entity field and click on Properties tab and make Key as true.

It would be something like this

Screen Shot 2014-08-06 at 11.47.12 PM.png

Step 2 : Implement the service by right clicking on the Yourname.odata file and select Implement Service. This will create Yourname.odatasrv file.

Right click on the Yourname.odatasrv and choose Select Datasource. From the EntitySet select your Entity Set and choose operation as Create. Select the type of Datasource. Since we are using a Soap Service we choose SOAP Service as the Data source.

Screen Shot 2014-08-06 at 11.52.20 PM.png

Add the properties for the Operation like Endpoint, Port name, Operation name etc and click finish.

Step 3. Right Click on the Create Operation and choose Define Request Mapping

Map your entity sets with the fields.

Screen Shot 2014-08-06 at 11.56.09 PM.png

Similarly do the Response mapping and deploy the project on the SMP Server.

Step 4.  Go to the Advanced Rest Client on Chrome

give your url http://localhost:8080/gateway/odata/sap/NameofProject;v=1/MethodName

Choose GET

In the header section add a new header

x-csrf-token and value as fetch

Screen Shot 2014-08-07 at 12.00.16 AM.png

Click on Send. It will get you a X-CSRF-TOKEN in the response header.

Screen Shot 2014-08-07 at 12.01.13 AM.png

Copy this token.

Now click on the POST Radio button

For the x-csrf-token paste the value returned from the previous operation

Add a new header value Content-Type and choose value as application/xml

Screen Shot 2014-08-07 at 12.07.08 AM.png

In the Payload section add the below body

<?xml version=”1.0″ encoding=”UTF-8″?>

<atom:entryxmlns:atom=”” xmlns:d=”” xmlns:m=”“>

<atom:content type=”application/xml”>














</content> </entry>

To verify if the payload is properly formatted or not go to the below site and paste your payload and check.

Free Online XML Formatter –

Once its successful, paste the properly formatted payload and click on Send.

It will post the record in the database.

I hope this helps,


Best Regards,

Rakshit Doshi

Be the first to leave a comment
You must be Logged on to comment or reply to a post.