Getting started with GWPA: Prerequisites
In the meantime, as of July 2014, GWPA has been retired.
Please find more information here: SAP Gateway Developer Tools – Bridging the Past, Present and Future
This document is meant to collect all Prerequisites for working with Gateway Productivity Accelerator (GWPA) in one place.
In all tutorials there’s typically a prerequisites section, but it is a bit hard to find a detailed description of all of them.
For your convenience, I am happy to offer a consolidated list of prerequisites.
I try to be as detailed as possible so that interested people, who’d like to get to know GWPA, even if absolutely new to all of it, can do it.
Since there’s lot of stuff, it has to be split in several documents:
Getting started with GWPA: Prerequisites for working with Gateway Productivity Accelerator (focus of this document)
After going through these documents, you’ll be really prepared for doing the tutorials about using GWPA (creating Starter Applications for Android, iOS, JavaSE, etc).
Overview of prerequisites
Below is a list of prerequisites which are required if you want to use GWPA.
The details can be found in the following sections.
General prerequisites are:
|Time||plenty of it|
|Age||No need to have grey hair – you might get it afterwards|
No programming language required - however, basic knowledge of English language (what I call English is my modest repository of English words – or at least words that do sound English in my ears…)
|Patience||Lots of it|
|Hardware||Laptop or similar (no - a smartphone is not sufficient...)|
|OS||Wwindows (or any other which I’m not familiar with)|
|GWPA||The Eclipse plugins to be added to the Eclipse installation|
An existing service to be consumed.
This can be an arbitrary service based on OData, e.g. a demo service provided by Gateway Demo System
If you want to use a toolkit for consumption of OData Services, each one has its specific prerequisites.
ADT (Android Development Tools for Eclipse)
|iOS Toolkit||Mac and so on is needed (I don't know - I'm not a Mac-user)|
|HTML 5 Toolkit|
Java EE tools for Eclipse and
UI5 tools for Eclipse
|Java SE Toolkit||Nothing else is required|
|PHP Toolkit||PHP environment is necessary for running the application|
|Integration Gateway||The "Integration Gateway" designtime tools make sense only if you have an SMP 3.0 server available, where to deploy your artifacts.|
You need an actual SDK (Java SE Development Kit).
E.g. version 7 (but version 6 should be OK as well)
For installing Java go to the following URL
and download the appropriate .exe file.
Which one is appropriate?
For me, it was jdk-7u40-windows-x64.exe, which can be found at http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Under Windows, you may choose either 32-bit or 64-bit, shouldn’t make any difference.
BUT be sure to use it consistently!
This means: if you install Java 64-bit, you have to install Eclipse 64-bit version as well.
(Otherwise you get a JNDI Error on start-up of Eclipse and you won’t know what you’ve done wrong…)
Settings for Java
Typically, when working with Java, you create the following settings in your operating system:
1. create System Variable JAVA_HOME which points to the location of your Java installation.
The location of Java is the root folder. Meaning the directory which contains the subdirectories bin and jre, etc
2. edit PATH variable to point to %JAVA_HOME%\bin
These settings make you more flexible when adding more Java versions to your local file system.
How to create these settings?
For Windows 7, it is done as follows:
Control Panel -> System and Security -> System -> Advanced System Settings -> Advanced -> Environment Variables
In order to check the installation of Java and to verify that Java is working properly, you can proceed as follows:
- open a command shell (navigate to C:\Windows\System32 and double-click on cmd.exe or simply press Windows-Key + R and type cmd)
- in the command shell, type java –version and press the Enter key
- the result of the command: the version of your Java installation is printed to the command shell.
If it doesn’t, you can try rebooting your system.
Eclipse is my favorite environment for programming Java code.
It has a great adoption and a helpful community and there are lots of resources on the internet.
It is fun to write plug-ins for Eclipse.
If you’ve installed 64-bit-Java, you have to install 64-bit-Eclipse (otherwise you can’t start Eclipse, you’ll get an error popup with a JNDI-Error)
NOTE: in order to use GWPA (and this is where we’re heading for), you have to install Eclipse version 4.2.2, which is also known as code-name Juno
Unfortunately, the actual version Kepler is not supported by GWPA. But it doesn’t matter, since you can easily have 2 or more Eclipse installations on your file system (this is described in my Document <em>Eclipse Tips&Tips</em>)
Quick installation instruction:
Download and unzip Eclipse from here: http://www.eclipse.org/downloads/packages/release/juno/sr2
Typically the Eclipse Classic is used. If you plan to write web applications the suitable package would be Eclipse IDE for Java EE Developers.
'Slow’ installation instruction:
See Eclipse Preparation.
Now you should be prepared for installing GWPA (Gateway Productivity Accelerator)
The Gateway Productivity Accelerator is a set of plugins that extend the capabilities of Eclipse.
That's the reason why you install Eclipse first and then add GWPA to it.
Quick installation instruction:
Use this update site: https://tools.hana.ondemand.com/juno
‘Slow’ installation instruction:
After what you’ve learned so far, you should now expect that for installing GWPA, you have to use an update site.
The update site provided by SAP is the following: https://tools.hana.ondemand.com/juno
What to do with the URL?
Within your Eclipse add this URL.
This is done in the Preferences.
Eclipse main menu -> Window -> Preferences -> Install/Update -> Available Software Sites
Enter a meaningful name - this is only for your personal use, so that you can recognize the software site later.
Press OK and leave the preference page.
The actual installation
Now go to Eclipse main menu -> Help -> Install New Software
Next go to “Work With”, expand the drop down and select the software site that you’ve entered above.
After selecting it, the pane below displays the content of the software site.
You see 5 products that are offered by SAP.
Expand the node for GWPA:
You see the features that are part of GWPA.
What are the features about?
Let’s spend a few words about it.
We have tools for OData modelling, provisioning and consuming.
- OData Modeler and Tools Core
This feature is the base, and it is required by all the others.
It contains base functionality, e.g. the library that takes care of executing HTTP requests.
Furthermore, and more interestingly, it contains the tool “OData Modeler”, a graphical editor for modelling OData models.
Find more information in the following blog:
New Gateway Tool - SAP NetWeaver Gateway productivity accelerator
- OData Toolkit for Java Platform, Standard Edition
This toolkit allows to generate a so-called “Starter Application”, which enables you to programmatically use OData services.
With means of a wizard, you generate a Java Project in Eclipse, and you can also generate so-called “proxies”.
Such proxies are Java-classes, which represent OData-"EntityTypes" in an object-oriented manner, and a "Service"-class, that represents the OData Service and provides methods for executing REST-based operations.
Using the “OData Toolkit for Java Platform, Standard Edition” and the proxy classes, you can e.g. write java code in order to have automated tests, or write java-code as a library, that can be used by e.g. a web application.
- Toolkit for Android
Generate a "Starter Application" for Android. Based on a few templates, you’ll get a ready-to-run Android application. Right after finishing the wizard, you can run the generated Android application on an Android device or emulator.
This is nicely explained in the following blogs:
Developing SAP Android Apps is Just a Few Clicks Away
Developing SAP Business Workflow Apps for Android
Please note that prior to using this wizard, you need to be prepared for Android development and install the required Android-software consisting of:
The Android SDK and the eclipse plugins for integrating Android into Eclipse (ADT, Android Development Tools)
But even if you don’t have it prepared, you can install this GWPA-Toolkit first and then the Android environment afterwards.
- Toolkit for HTML5
Generate a Starter Application for HTML5.
Based on a few templates, you’ll get a ready-to-run HTML5 application.
- Toolkit for Integration Gateway
This toolkit is different than the others. It doesn’t generate a "Starter Application" which consumes an OData Service.
In this case, the wizard generates a “Service Implementation” Project.
It is about provisioning, not consuming.
Based on an existing OData model (which is created with the OData Modeler, see 1), it allows to define the data sources which will provide data at runtime.
It also generates an OData service that can be deployed and run on an SMP server (SAP Mobile Platform 3.x).
Refer to this document for more information.
- Toolkit for iOS
The same as 3 but for iOS.
Here’s a blog with nice documentation:
Developing SAP iOS Apps – It’s Simpler Than You Think!
- Toolkit for PHP
Also the same as 3), but for generating PHP applications.
If you install only 1 (OData Modeler and Tools Core), then you’ll be able to work with the model editor, but if you open the other wizards in the OData category, you’ll find them empty.
Don’t wonder about that.
Instead of wondering, refer also to my respective Blog:
The actual installation - continued
Now that you know what features are available, you can go ahead and select the desired check boxes.
Step through the wizard, press finish and restart Eclipse.
Behind the curtain
And since this takes a bit of time, you might spend this time having a look at the GWPA Update Site itself to see what’s behind the curtain.
You have already used the URL for entering it in Eclipse.
But you can also invoke it in the browser and append the names of the archives that are part of an update site.
Try these 2 URLs:
Open the file artifacts.jar.
If the browser refuses to open it, download it and open it with an archiver tool like e.g. Winrar
Inside the archive, you’ll find a description file - artifacts.xml.
It contains a list of the bundles which are available on the update site.
You can search for e.g. com.sap.odata, and you’ll find the plugins which are part of GWPA
The plugins and features are stored in folders at the same level.
Interesting, isn’t it?
If yes (meaning: interesting): continue reading and learning about OSGi in my OSGi document, near here... in SCN.
Now you have installed GWPA and you’re ready to follow all How-To-Guides that you might find in SCN.
Are you really ready?
If you want to try to consume an OData service, you obviously have to have one.
So what you still need is:
-> a Demo Service.
Yes, sounds good: an existing, live and running OData service, which is ready to be consumed and willing to eagerly provide data.
And as usual, there’s already something prepared.
Yes, sounds good.
And it is here.
Here in SCN.
Access Demo Service
You can find a demo service which runs on a demo Gateway system with demo data.
There’s nothing left for me to describe here. You find all required information in the following SCN blogs:
Info about the mentioned demo system and how to access:
You can find a list of sample Gateway services in the following page:
Sample Services SAP Netweaver Gateway Demo System
I recommend to use the demo service ZGWSAMPLE_SRV.
Please refer to this blog for a detailed description: Demo service ZGWSAMPLE_SRV
General information about the SAP NetWeaver Gateway Developer Center:
Note: the Gateway demo system is based on HTTPS, which means that the GWPA-tools which connect to the system have to deal with HTTPS.
This is only possible, if the Java M (which is used by Eclipse) knows the certificate, which is used by the Gateway demo system.
So you have to download this certificate file and import it into your Java VM.
Otherwise you cannot access the system or the service from within the GWPA-tools (you get an "SSL-handshake" error)
Find a good description here: Configuring SSL Connection to SAP Systems in SAP NetWeaver Gateway Productivity Accelerator
In Eclipse, configure a connection to the demo system as depicted here:
We tend to forget that there’s a world outside of SCN…
The OData homepage offers some sample services as well.
then navigate to ->ecosystem->Sample Services
select e.g. http://services.odata.org/OData/OData.svc
Several more separate blogs would be required here.
They need to be provided in the future…
It is about the following prerequisites:
Everything you need to know to develop Android applications is obviously very well described on the Android web site.
Much material can be found there (This is the homepage: http://developer.android.com/index.html)
And of course on the internet.
And of course in SCN…
For example, my Android Preparation document, which is meant for Android newbees.
If you use iOS, you probably know what you need…
The generated Starter Application for HTML5, can be run directly in the browser (disable web security in Chrome).
You might as well install a reverse proxy (e.g. xampp) and copy the generated HTML 5 application there, and then run it.
Those of you working with PHP know much better than me what you need;-)
Which is useful, because you can specify the server in Eclipse.
GWPA installation: https://tools.hana.ondemand.com/#gateway
GWPA update site to be entered in Eclipse: https://tools.hana.ondemand.com/juno
GWPA official documentation: https://help.neo.ondemand.com/gateway_gwpa/frameset.htm
Gateway Service Consumption System: http://scn.sap.com/docs/DOC-40986
Sample Services http://scn.sap.com/docs/DOC-31221
OData reference: http://www.odata.org/
OData sample service: e.g. http://services.odata.org/OData/OData.svc/