SOA consumption on Android
h1. Introduction Even though SAP offers a wide range of software and features there are always use-cases which cannot be covered by standard software. In these cases this blog should you give an idea how a mobile client can consume an SAP enterprise service. The coding shown here runs on an Android device, but it might be possible to adapt the code to run on other mobile platforms as well. The complete code can be downloaded from SVN on code exchange https://cw.sdn.sap.com/cw/groups/soaonandroid (https://cw.sdn.sap.com/cw/groups/soaonandroid). Please get it there to have a look into it while reading this blog. h1. Prerequisites In this blog I assume that the reader is familiar with Android Development as well as SOA web services. The most important steps will be explained, but not every single line of code. h1. Overview The final application looks like this:
It has two input fields, one for the material number and one for quantity. Upon pressing the “Send Order!” button a web service is called to create the purchase order (PO). Once the order is created it shows an alert dialog with the PO:
In addition to the main screen above there is a preferences screen:



Using REST Web Services with the JSON format would be much more efficient than SOAP Web Services. The size of the SOAP payload is just too big in a mobile scenario where bandwidth is limited.
Regards,
Pierre
Unfortunately SAP ERP does not currently support REST, only SOAP which makes this a problem. A new platform called "Project Gateway" will be released shortly (and some are already using - DUET) which enables REST.
I know that SAP does not support REST but nothing prevents you from creating your own REST Web Services on a SAP system (ABAP or Java). The first blog on this topic was posted on SDN in 2004, we don't have to wait for Project Gateway.
Regards,
Pierre
you are absolutely right about your comments. We only want to show the options you have in case something prevents you from implementing your own REST services. It is all about choices customers should have to pick whatever they would like to use.
Regards, Jochen
why so aggressive? Why not ask the OP, who provided a nice piece of work on the consumption of an already exisiting service, if he had bad experience with performance of the service, with the performance of XML parsing on the device, etc ...
Regarding the bandwidth, the size of any single image of our daily favourite nude lady is way larger than the average enterprise service's payload. And do we care? - Nope, time solves this problem and time has already come to many places.
anton