SlideShare a Scribd company logo
GW100 SAP NetWeaver Gateway
Gateway Service Consumption
May 2012




                              INTE
                                  RNA
                                     L
Objectives



                          At the end of this chapter, you will understand:
                          Ÿ  The general principles of consuming a Gateway Service
                          Ÿ  Creation of OData proxy objects
                          Ÿ  Creating an iPhone Application to Consume a Gateway Service
                          Ÿ  Consumption of Gateway Services using Java Server Pages and
                              JavaScript + HTML5




©  2012 SAP AG. All rights reserved.                                                        2
Agenda

u    Gateway Service Consumption Overview
u    Creating OData Proxy Objects
u    Using the Gateway Developer Tool for XCode – Building an iPhone App
u    Consumption Exercises – Java Server Pages, JavaScript




 ©  2012 SAP AG. All rights reserved.                                       3
Agenda

u    Gateway Service Consumption Overview
u    Creating OData Proxy Objects
u    Using the Gateway Developer Tool for XCode – Building an iPhone App
u    Consumption Exercises – Java Server Pages, JavaScript




 ©  2012 SAP AG. All rights reserved.                                       4
My Gateway Service Works… Now What?



                                 Once you’ve built a working Gateway Service,
                                the next step is to create an application that can
                                             consume this service.



                                          OK, so how do I that?



                                            There are many possibilities.
                             For instance, you could develop an application for a mobile
                                   client using the Sybase Unwired Platform (SUP),
                             or you could use a wide variety of programming languages
                                          and freely available OData libraries.


©  2012 SAP AG. All rights reserved.                                                       5
Gateway Service Consumption – Where to Start?

Since the application that consumes a Gateway Service executes outside the scope
of an SAP system, you will first need to choose a programming environment.




You are free to choose any programming environment with which you are
comfortable… SAP places no restrictions on how Gateway services are to be
consumed.
In this course, we will focus on two possible consumption options:
•  Java Server Pages
•  JavaScript (using the SAPUI5 libraries)
©  2012 SAP AG. All rights reserved.                                           6
Gateway Service Consumption – General Principles

No matter what programming
language you choose, you
should obtain at the very
least, an OData SDK for your
chosen language.
Many OData SDKs are
available from the developers
section of the odata.org
website.
However, SAP offers some
proxy generation tools that
help accelerate application
development.




©  2012 SAP AG. All rights reserved.               7
Agenda

u    Gateway Service Consumption Overview
u    Creating OData Proxy Objects
u    Using the Gateway Developer Tool for XCode – Building an iPhone App
u    Consumption Exercises – Java Server Pages, JavaScript




 ©  2012 SAP AG. All rights reserved.                                       8
Gateway Service Consumption – Proxy Generation

Six different tools are available for creating OData proxy objects, five of which are
written by SAP.
               Language                            Tool Shipped As              Proxy Object Created
Java                          Oracle      Eclipse plug-in                     Manually at design time
PHP                           PHP Group Eclipse plug-in                       Manually at design time
Visual C#                     Microsoft   Visual Studio 2010 project template Manually at design time
Objective C                   Apple       Stand alone tool                    Manually at design time
JavaScript                    ECMA        Object within SAPUI5 library        Implicitly at runtime
Flash                         Adobe       Flash Builder plug-in from Adobe    Manually at design time

The generated OData proxy object acts as the interface to the SAP NetWeaver
Gateway system, and hides many of the lower level details of the OData protocol.
All of these plug-ins can be downloaded from the SAP Community Network page
http://scn.sap.com/community/netweaver-gateway à Developer Tools
The SAPUI5 JavaScript library can also be downloaded from SCN.

©  2012 SAP AG. All rights reserved.                                                                    9
Gateway Proxy Generation – Eclipse (Java or PHP)




                                                                SAP NetWeaver
                                                                  Gateway




In Eclipse Helios (3.6) or Indigo (3.7), a Gateway proxy object is created by
selecting a project of type “SAP NetWeaver Gateway” à “Proxy Generation” at
design time.
This functionality is installed as a plug-in for Eclipse.
©  2012 SAP AG. All rights reserved.                                            10
Gateway Proxy Generation – Eclipse (Java or PHP)




                                                                SAP NetWeaver
                                                                  Gateway




In Eclipse Helios (3.6) or Indigo (3.7), a Gateway proxy object is created by
selecting a project of type “SAP NetWeaver Gateway” à “Proxy Generation” at
design time.
This functionality is installed as a plug-in for Eclipse.
©  2012 SAP AG. All rights reserved.                                            11
Gateway Proxy Generation – Visual Studio 2010 (C#)




                                                                  SAP NetWeaver
                                                                    Gateway




In Visual Studio 2010, a Gateway proxy object is created by selecting project of type
“SAP Web Application” at design time.
This functionality is installed as a plug-in for Visual Studio.

©  2012 SAP AG. All rights reserved.                                               12
Gateway Proxy Generation – Visual Studio 2010 (C#)




                                                                  SAP NetWeaver
                                                                    Gateway




In Visual Studio 2010, a Gateway proxy object is created by selecting project of type
“SAP Web Application” at design time.
This functionality is installed as a plug-in for Visual Studio.

©  2012 SAP AG. All rights reserved.                                               13
Gateway Proxy Generation – Flash Builder ≥4.5 (MXML)




                                                                   SAP NetWeaver
                                                                     Gateway




In Flash Builder ≥4.5, a Flex Project is created and then you select Data à
“Connect to Data/Service Type” à “SAP Gateway”.
This functionality is installed as a plug-in for Flash Builder.

©  2012 SAP AG. All rights reserved.                                           14
Gateway Proxy Generation – XCode (Objective C)


                                                                  Generated
                                                                 XCode Project


                                                                SAP NetWeaver
                                                                  Gateway




The SAP NetWeaver Gateway developer tool for XCode is a stand-alone tool that
connects to a Gateway server and generates an XCode project.
This project is then opened in XCode and can be edited as required.

©  2012 SAP AG. All rights reserved.                                             15
Gateway Proxy Generation – XCode (Objective C)


                                                                  Generated
                                                                 XCode Project


                                                                SAP NetWeaver
                                                                  Gateway




The SAP NetWeaver Gateway developer tool for XCode is a stand-alone tool that
connects to a Gateway server and generates an XCode project.
This project is then opened in XCode and can be edited as required.

©  2012 SAP AG. All rights reserved.                                             16
Gateway Proxy Generation – SAPUI5 (JavaScript+HTML5)




                                                                    SAP NetWeaver
                                                                      Gateway




At design time, you create an sap.ui.model.odata.ODataModel object.
At runtime, the OData object is created automatically.
This functionality is contained both in plug-ins and libraries referenced by your
SAPUI5 Project.
©  2012 SAP AG. All rights reserved.                                                17
Agenda

u    Gateway Service Consumption Overview
u    Creating OData Proxy Objects
u    Using the Gateway Developer Tool for XCode – Building an iPhone App
u    Consumption Exercises – Java Server Pages, JavaScript




 ©  2012 SAP AG. All rights reserved.                                       18
Creating a Basic iPhone Application – 1/11




When you run the SAP NetWeaver Gateway developer tool for XCode, you are first
asked whether you want to create just a proxy object, or a proxy object wrapped in
a basic application.
The demo application being built here will show first a list of Airports.
The user then selects an airport and will be shown a list of flights departing from
that airport.
Finally, the user can select an individual flight to see its bookings.

©  2012 SAP AG. All rights reserved.                                                  19
Creating a Basic iPhone Application – 2/11




Before using the proxy generator tool, you must first configure it to point to the
installed OData SDK and at least one Gateway server.
Press ⌘, (Command comma) to display the configuration screen.

©  2012 SAP AG. All rights reserved.                                                 20
Creating a Basic iPhone Application – 3/11




Enter the application name and press Browse




©  2012 SAP AG. All rights reserved.          21
Creating a Basic iPhone Application – 4/11




Once you have selected a system, a list of available Gateway services will be
displayed. Press OK, to use the selected service, then Next.



©  2012 SAP AG. All rights reserved.                                            22
Creating a Basic iPhone Application – 5/11




We now must construct the screens the application will use.
Give the first screen a title (“Airports” in this case) and press the plus sign in the
bottom right corner to add fields to this screen.

©  2012 SAP AG. All rights reserved.                                                     23
Creating a Basic iPhone Application – 6/11




Knowing that our application will start by providing a list of Airports, we choose
this entity set from the drop down list.
We then choose the appropriate fields from this entity set that we wish to display.
GeoCoordinates is omitted because it is based on a Complex Type.
©  2012 SAP AG. All rights reserved.                                                  24
Creating a Basic iPhone Application – 7/11




Now add a second page by clicking on the plus sign in the bottom left corner.
The second page will show only those flights departing from the airport selected on
the first screen.

©  2012 SAP AG. All rights reserved.                                              25
Creating a Basic iPhone Application – 8/11




Notice now that the dropdown list no longer displays entity sets. This is because
the first screen uses the Airports entity set; therefore, we can only use fields
available from the navigation paths belonging to Airports.
In this case, we are interested in the DepartingFlights navigation path.
©  2012 SAP AG. All rights reserved.                                                26
Creating a Basic iPhone Application – 9/11




As with the Flights page, a third page is added for Bookings and fields are added
as seen earlier.
This completes the design process for the screen fields, so we can now press
Finish.
©  2012 SAP AG. All rights reserved.                                           27
Creating a Basic iPhone Application – 10/11




After defining where you want the generated XCode project to be stored, you now
use XCode to open that project.
At this point you could simply run the application or you use the coding as the
starting point for your own custom application.
©  2012 SAP AG. All rights reserved.                                              28
Creating a Basic iPhone Application – 11/11




The application can then be run in the iOS simulator within XCode.




©  2012 SAP AG. All rights reserved.                                 29
Agenda

u    Gateway Service Consumption Overview
u    Creating OData Proxy Objects
u    iPhone App Creation
u    Consumption Exercises – Java Server Pages, JavaScript




 ©  2012 SAP AG. All rights reserved.                         30
Hands-on Exercise




Exercise 14
Consume a Gateway Service Using Java
Server Pages



©  2012 SAP AG. All rights reserved.   31
Hands-on Exercise




Exercise 15
Consume a Gateway Service Using the
SAPUI5 JavaScript Libraries (Read-only)



©  2012 SAP AG. All rights reserved.      32
Summary



                          You should now understand:
                          Ÿ  The general principles of consuming a Gateway Service
                          Ÿ  Creation of OData proxy objects
                          Ÿ  Creation of an iPhone Application to Consume a Gateway Service
                          Ÿ  Consumption of Gateway Services using Java Server Pages and
                              JavaScript + HTML5




©  2012 SAP AG. All rights reserved.                                                           33
© 2012 SAP AG. All rights reserved


No part of this publication may be reproduced or transmitted in any form or for any purpose   Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal
without the express permission of SAP AG. The information contained herein may be             Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services
changed without prior notice.                                                                 mentioned herein as well as their respective logos are trademarks or registered trademarks
                                                                                              of Business Objects Software Ltd. Business Objects is an SAP company.
Some software products marketed by SAP AG and its distributors contain proprietary
software components of other software vendors.                                                Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft     products and services mentioned herein as well as their respective logos are trademarks or
                                                                                              registered trademarks of Sybase, Inc. Sybase is an SAP company.
Corporation.
                                                                                              All other product and service names mentioned are the trademarks of their respective
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x,
                                                                                              companies. Data contained in this document serves informational purposes only. National
System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/
                                                                                              product specifications may vary.
VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server,
PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER,                         The information in this document is proprietary to SAP. No part of this document may be
OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP,                     reproduced, copied, or transmitted in any form or for any purpose without the express prior
RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent        written permission of SAP AG.
Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of   This document is a preliminary version and not subject to your license agreement or any
IBM Corporation.                                                                              other agreement with SAP. This document contains only intended strategies, developments,
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.          and functionalities of the SAP® product and is not intended to be binding upon SAP to any
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered    particular course of business, product strategy, and/or development. Please note that this
                                                                                              document is subject to change and may be changed by SAP at any time without notice.
trademarks of Adobe Systems Incorporated in the United States and/or other countries.
                                                                                              SAP assumes no responsibility for errors or omissions in this document. SAP does not
Oracle is a registered trademark of Oracle Corporation.
                                                                                              warrant the accuracy or completeness of the information, text, graphics, links, or other items
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.                   contained within this material. This document is provided without a warranty of any kind,
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are          either express or implied, including but not limited to the implied warranties of
trademarks or registered trademarks of Citrix Systems, Inc.                                   merchantability, fitness for a particular purpose, or non-infringement.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World               SAP shall have no liability for damages of any kind including without limitation direct, special,
Wide Web Consortium, Massachusetts Institute of Technology.                                   indirect, or consequential damages that may result from the use of these materials. This
                                                                                              limitation shall not apply in cases of intent or gross negligence.
Java is a registered trademark of Sun Microsystems, Inc.
                                                                                              The statutory liability for personal injury and defective products is not affected. SAP has no
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for        control over the information that you may access through the use of hot links contained in
technology invented and implemented by Netscape.                                              these materials and does not endorse your use of third-party Web pages nor provide any
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer,           warranty whatsoever relating to third-party Web pages.
StreamWork, and other SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP AG in Germany and other
countries.




 ©  2012 SAP AG. All rights reserved.                                                                                                                                                     34

More Related Content

PDF
SAP NetWeaver Gateway - Gateway Service Consumption
PDF
NetWeaver Gateway- Introduction to REST
PPTX
Introduction to SAP Gateway and OData
PDF
SAP NetWeaver Gateway - RFC & BOR Generators
PDF
Autodesk Technical Webinar: SAP NetWeaver Gateway Part 2
PDF
NetWeaver Gateway- Introduction to OData
PDF
NetWeaver Gateway- Service Builder
PPTX
OData and the future of business objects universes
SAP NetWeaver Gateway - Gateway Service Consumption
NetWeaver Gateway- Introduction to REST
Introduction to SAP Gateway and OData
SAP NetWeaver Gateway - RFC & BOR Generators
Autodesk Technical Webinar: SAP NetWeaver Gateway Part 2
NetWeaver Gateway- Introduction to OData
NetWeaver Gateway- Service Builder
OData and the future of business objects universes

What's hot (20)

PDF
SAP Integration with Red Hat JBoss Technologies
PDF
Oracle APEX勉強会 - 認証と認可の実装を学ぶ
PPTX
OData - The Universal REST API
PPTX
OData Fundamental
PPTX
Sap java connector / Hybris RFC
PDF
Develop Your First Mobile Application with Portal on Device
PDF
SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...
PDF
Accessing Your Existing SAP NetWeaver Portal on Mobile Device
PDF
SAP HANA Cloud Platform Community BOF @ Devoxx 2013
PDF
Burns jsf-confess-2015
PDF
SAP NetWeaver Portal, mobile edition – Overview
PDF
Oracle ADF Architecture TV - Design - Architecting for ADF Mobile Integration
PDF
SAP HANA Cloud Platform: The void between your Datacenter and the Cloud
PDF
Building beacon-enabled apps with Oracle MCS
PDF
The Mobile Enterprise in Action: Managing Business Processes from Your Mobile...
ODP
Sap webinar-briefing-sep-2013-final
PDF
Boost Your Content Strategy for REST APIs
PDF
SAP NetWeaver Portal Portfolio (2012)
PDF
Oracle ADF Architecture TV - Design - ADF BC Application Module Design
PPTX
Let's Talk Mobile
SAP Integration with Red Hat JBoss Technologies
Oracle APEX勉強会 - 認証と認可の実装を学ぶ
OData - The Universal REST API
OData Fundamental
Sap java connector / Hybris RFC
Develop Your First Mobile Application with Portal on Device
SAP NetWeaver Portal OnDevice - Consuming your SAP NetWeaver Portal On Mobile...
Accessing Your Existing SAP NetWeaver Portal on Mobile Device
SAP HANA Cloud Platform Community BOF @ Devoxx 2013
Burns jsf-confess-2015
SAP NetWeaver Portal, mobile edition – Overview
Oracle ADF Architecture TV - Design - Architecting for ADF Mobile Integration
SAP HANA Cloud Platform: The void between your Datacenter and the Cloud
Building beacon-enabled apps with Oracle MCS
The Mobile Enterprise in Action: Managing Business Processes from Your Mobile...
Sap webinar-briefing-sep-2013-final
Boost Your Content Strategy for REST APIs
SAP NetWeaver Portal Portfolio (2012)
Oracle ADF Architecture TV - Design - ADF BC Application Module Design
Let's Talk Mobile
Ad

Viewers also liked (10)

PDF
Christmas2012
DOCX
Linked lists
DOCX
PPTX
sentido del tacto
PDF
Psa 230-redrafted
PPTX
SALUD MATERNA
DOCX
PDF
ORIGEN Y EVOLUCION DE LA RED
PDF
SAP HANA Cloud Platform Expert Session - SAP HANA Cloud Platform Analytics
PPTX
Digital fundraising input
Christmas2012
Linked lists
sentido del tacto
Psa 230-redrafted
SALUD MATERNA
ORIGEN Y EVOLUCION DE LA RED
SAP HANA Cloud Platform Expert Session - SAP HANA Cloud Platform Analytics
Digital fundraising input
Ad

Similar to NetWeaver Gateway- Gateway Service Consumption (20)

DOCX
PDF
SAP NetWeaver Cloud Platform - Virtual Bootcamp Introduction - Part 1
PDF
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
PDF
Java Development Company | Xicom
PDF
SAP NetWeaver Gateway - Introduction
PDF
44779e8c 5b7c-0010-82c7-eda71af511fa
PPTX
Cloud development technology sharing (BlueMix premier)
PPTX
Top 10 PWA Frameworks in 2020
PDF
Javantura v4 - Support SpringBoot application development lifecycle using Ora...
PDF
Sap integration with_j_boss_technologies
PDF
Web(abap introduction)
PPTX
SAP Inside Track Singapore 2014
PDF
Java keynote preso
PPTX
Unit1- OOPJ Chapter-1 Object Oriented Programming JAVA.pptx
PDF
A dummies guide to native, html5 and hybrid mobile apps
PPTX
SAP Kapsel Plugins For Cordova
PDF
SAP NetWeaver Cloud Platform - Virtual Bootcamp - Part 2
PDF
Z sap boe-2016-techws-04_vs_fiori-app-with-eclipseluna-accessing-zsap-system
PDF
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
PPTX
Dirigible @ Skyscanner
SAP NetWeaver Cloud Platform - Virtual Bootcamp Introduction - Part 1
Simple Open Source Java Cloud App Stack with Guice, Hibernate, Jersey and Vaadin
Java Development Company | Xicom
SAP NetWeaver Gateway - Introduction
44779e8c 5b7c-0010-82c7-eda71af511fa
Cloud development technology sharing (BlueMix premier)
Top 10 PWA Frameworks in 2020
Javantura v4 - Support SpringBoot application development lifecycle using Ora...
Sap integration with_j_boss_technologies
Web(abap introduction)
SAP Inside Track Singapore 2014
Java keynote preso
Unit1- OOPJ Chapter-1 Object Oriented Programming JAVA.pptx
A dummies guide to native, html5 and hybrid mobile apps
SAP Kapsel Plugins For Cordova
SAP NetWeaver Cloud Platform - Virtual Bootcamp - Part 2
Z sap boe-2016-techws-04_vs_fiori-app-with-eclipseluna-accessing-zsap-system
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
Dirigible @ Skyscanner

More from SAP PartnerEdge program for Application Development (20)

PDF
SUSE Technical Webinar – Get started with creating Lumira CVOM extensions -- ...
PDF
SUSE Technical Webinar – Get started with creating Design Studio extensions -...
PDF
SUSE Technical Webinar: Build HANA Apps in the Framework of the SAP and SUSE ...
PDF
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
PDF
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
PDF
SUSE Technical Webinar: Build B1 apps in the Framework of the SAP and SUSE Ca...
PDF
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
PDF
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
PDF
SUSE Technical Webinar: Introduction to Business Intelligence - the SAP and S...
PDF
SUSE Technical Webinar: Build Cloud Apps with SAP HANA Cloud Platform
PDF
Partner with SAP to Develop Mobile apps and capture the Mobile Market Opportu...
PDF
Microsoft Technical Webinar: SAP Mobile Platform for Windows 8 and Windows Ph...
PDF
Microsoft Technical Webinar - New devices for Windows 8 and Windows Phone 8, ...
PDF
Autodesk Technical Webinar: SAP Business One
PDF
Microsoft Technical Webinar: Doing more with MS Office, SharePoint and Visual...
PDF
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - S...
PDF
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - P...
PDF
Autodesk Technical Webinar: SAP HANA in-memory database
PDF
Autodesk Technical Webinar: SAP NetWeaver Gateway Part 3
SUSE Technical Webinar – Get started with creating Lumira CVOM extensions -- ...
SUSE Technical Webinar – Get started with creating Design Studio extensions -...
SUSE Technical Webinar: Build HANA Apps in the Framework of the SAP and SUSE ...
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
SUSE Technical Webinar: Build B1 apps in the Framework of the SAP and SUSE Ca...
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
SUSE Technical Webinar: Introduction to Business Intelligence - the SAP and S...
SUSE Technical Webinar: Build Cloud Apps with SAP HANA Cloud Platform
Partner with SAP to Develop Mobile apps and capture the Mobile Market Opportu...
Microsoft Technical Webinar: SAP Mobile Platform for Windows 8 and Windows Ph...
Microsoft Technical Webinar - New devices for Windows 8 and Windows Phone 8, ...
Autodesk Technical Webinar: SAP Business One
Microsoft Technical Webinar: Doing more with MS Office, SharePoint and Visual...
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - S...
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - P...
Autodesk Technical Webinar: SAP HANA in-memory database
Autodesk Technical Webinar: SAP NetWeaver Gateway Part 3

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
MYSQL Presentation for SQL database connectivity
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
PPT
Teaching material agriculture food technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
Cloud computing and distributed systems.
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Assigned Numbers - 2025 - Bluetooth® Document
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Spectroscopy.pptx food analysis technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
MYSQL Presentation for SQL database connectivity
The AUB Centre for AI in Media Proposal.docx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf
Teaching material agriculture food technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Network Security Unit 5.pdf for BCA BBA.
A comparative analysis of optical character recognition models for extracting...
Cloud computing and distributed systems.
Machine learning based COVID-19 study performance prediction
Programs and apps: productivity, graphics, security and other tools
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Reach Out and Touch Someone: Haptics and Empathic Computing

NetWeaver Gateway- Gateway Service Consumption

  • 1. GW100 SAP NetWeaver Gateway Gateway Service Consumption May 2012 INTE RNA L
  • 2. Objectives At the end of this chapter, you will understand: Ÿ  The general principles of consuming a Gateway Service Ÿ  Creation of OData proxy objects Ÿ  Creating an iPhone Application to Consume a Gateway Service Ÿ  Consumption of Gateway Services using Java Server Pages and JavaScript + HTML5 ©  2012 SAP AG. All rights reserved. 2
  • 3. Agenda u  Gateway Service Consumption Overview u  Creating OData Proxy Objects u  Using the Gateway Developer Tool for XCode – Building an iPhone App u  Consumption Exercises – Java Server Pages, JavaScript ©  2012 SAP AG. All rights reserved. 3
  • 4. Agenda u  Gateway Service Consumption Overview u  Creating OData Proxy Objects u  Using the Gateway Developer Tool for XCode – Building an iPhone App u  Consumption Exercises – Java Server Pages, JavaScript ©  2012 SAP AG. All rights reserved. 4
  • 5. My Gateway Service Works… Now What? Once you’ve built a working Gateway Service, the next step is to create an application that can consume this service. OK, so how do I that? There are many possibilities. For instance, you could develop an application for a mobile client using the Sybase Unwired Platform (SUP), or you could use a wide variety of programming languages and freely available OData libraries. ©  2012 SAP AG. All rights reserved. 5
  • 6. Gateway Service Consumption – Where to Start? Since the application that consumes a Gateway Service executes outside the scope of an SAP system, you will first need to choose a programming environment. You are free to choose any programming environment with which you are comfortable… SAP places no restrictions on how Gateway services are to be consumed. In this course, we will focus on two possible consumption options: •  Java Server Pages •  JavaScript (using the SAPUI5 libraries) ©  2012 SAP AG. All rights reserved. 6
  • 7. Gateway Service Consumption – General Principles No matter what programming language you choose, you should obtain at the very least, an OData SDK for your chosen language. Many OData SDKs are available from the developers section of the odata.org website. However, SAP offers some proxy generation tools that help accelerate application development. ©  2012 SAP AG. All rights reserved. 7
  • 8. Agenda u  Gateway Service Consumption Overview u  Creating OData Proxy Objects u  Using the Gateway Developer Tool for XCode – Building an iPhone App u  Consumption Exercises – Java Server Pages, JavaScript ©  2012 SAP AG. All rights reserved. 8
  • 9. Gateway Service Consumption – Proxy Generation Six different tools are available for creating OData proxy objects, five of which are written by SAP. Language Tool Shipped As Proxy Object Created Java Oracle Eclipse plug-in Manually at design time PHP PHP Group Eclipse plug-in Manually at design time Visual C# Microsoft Visual Studio 2010 project template Manually at design time Objective C Apple Stand alone tool Manually at design time JavaScript ECMA Object within SAPUI5 library Implicitly at runtime Flash Adobe Flash Builder plug-in from Adobe Manually at design time The generated OData proxy object acts as the interface to the SAP NetWeaver Gateway system, and hides many of the lower level details of the OData protocol. All of these plug-ins can be downloaded from the SAP Community Network page http://scn.sap.com/community/netweaver-gateway à Developer Tools The SAPUI5 JavaScript library can also be downloaded from SCN. ©  2012 SAP AG. All rights reserved. 9
  • 10. Gateway Proxy Generation – Eclipse (Java or PHP) SAP NetWeaver Gateway In Eclipse Helios (3.6) or Indigo (3.7), a Gateway proxy object is created by selecting a project of type “SAP NetWeaver Gateway” à “Proxy Generation” at design time. This functionality is installed as a plug-in for Eclipse. ©  2012 SAP AG. All rights reserved. 10
  • 11. Gateway Proxy Generation – Eclipse (Java or PHP) SAP NetWeaver Gateway In Eclipse Helios (3.6) or Indigo (3.7), a Gateway proxy object is created by selecting a project of type “SAP NetWeaver Gateway” à “Proxy Generation” at design time. This functionality is installed as a plug-in for Eclipse. ©  2012 SAP AG. All rights reserved. 11
  • 12. Gateway Proxy Generation – Visual Studio 2010 (C#) SAP NetWeaver Gateway In Visual Studio 2010, a Gateway proxy object is created by selecting project of type “SAP Web Application” at design time. This functionality is installed as a plug-in for Visual Studio. ©  2012 SAP AG. All rights reserved. 12
  • 13. Gateway Proxy Generation – Visual Studio 2010 (C#) SAP NetWeaver Gateway In Visual Studio 2010, a Gateway proxy object is created by selecting project of type “SAP Web Application” at design time. This functionality is installed as a plug-in for Visual Studio. ©  2012 SAP AG. All rights reserved. 13
  • 14. Gateway Proxy Generation – Flash Builder ≥4.5 (MXML) SAP NetWeaver Gateway In Flash Builder ≥4.5, a Flex Project is created and then you select Data à “Connect to Data/Service Type” à “SAP Gateway”. This functionality is installed as a plug-in for Flash Builder. ©  2012 SAP AG. All rights reserved. 14
  • 15. Gateway Proxy Generation – XCode (Objective C) Generated XCode Project SAP NetWeaver Gateway The SAP NetWeaver Gateway developer tool for XCode is a stand-alone tool that connects to a Gateway server and generates an XCode project. This project is then opened in XCode and can be edited as required. ©  2012 SAP AG. All rights reserved. 15
  • 16. Gateway Proxy Generation – XCode (Objective C) Generated XCode Project SAP NetWeaver Gateway The SAP NetWeaver Gateway developer tool for XCode is a stand-alone tool that connects to a Gateway server and generates an XCode project. This project is then opened in XCode and can be edited as required. ©  2012 SAP AG. All rights reserved. 16
  • 17. Gateway Proxy Generation – SAPUI5 (JavaScript+HTML5) SAP NetWeaver Gateway At design time, you create an sap.ui.model.odata.ODataModel object. At runtime, the OData object is created automatically. This functionality is contained both in plug-ins and libraries referenced by your SAPUI5 Project. ©  2012 SAP AG. All rights reserved. 17
  • 18. Agenda u  Gateway Service Consumption Overview u  Creating OData Proxy Objects u  Using the Gateway Developer Tool for XCode – Building an iPhone App u  Consumption Exercises – Java Server Pages, JavaScript ©  2012 SAP AG. All rights reserved. 18
  • 19. Creating a Basic iPhone Application – 1/11 When you run the SAP NetWeaver Gateway developer tool for XCode, you are first asked whether you want to create just a proxy object, or a proxy object wrapped in a basic application. The demo application being built here will show first a list of Airports. The user then selects an airport and will be shown a list of flights departing from that airport. Finally, the user can select an individual flight to see its bookings. ©  2012 SAP AG. All rights reserved. 19
  • 20. Creating a Basic iPhone Application – 2/11 Before using the proxy generator tool, you must first configure it to point to the installed OData SDK and at least one Gateway server. Press ⌘, (Command comma) to display the configuration screen. ©  2012 SAP AG. All rights reserved. 20
  • 21. Creating a Basic iPhone Application – 3/11 Enter the application name and press Browse ©  2012 SAP AG. All rights reserved. 21
  • 22. Creating a Basic iPhone Application – 4/11 Once you have selected a system, a list of available Gateway services will be displayed. Press OK, to use the selected service, then Next. ©  2012 SAP AG. All rights reserved. 22
  • 23. Creating a Basic iPhone Application – 5/11 We now must construct the screens the application will use. Give the first screen a title (“Airports” in this case) and press the plus sign in the bottom right corner to add fields to this screen. ©  2012 SAP AG. All rights reserved. 23
  • 24. Creating a Basic iPhone Application – 6/11 Knowing that our application will start by providing a list of Airports, we choose this entity set from the drop down list. We then choose the appropriate fields from this entity set that we wish to display. GeoCoordinates is omitted because it is based on a Complex Type. ©  2012 SAP AG. All rights reserved. 24
  • 25. Creating a Basic iPhone Application – 7/11 Now add a second page by clicking on the plus sign in the bottom left corner. The second page will show only those flights departing from the airport selected on the first screen. ©  2012 SAP AG. All rights reserved. 25
  • 26. Creating a Basic iPhone Application – 8/11 Notice now that the dropdown list no longer displays entity sets. This is because the first screen uses the Airports entity set; therefore, we can only use fields available from the navigation paths belonging to Airports. In this case, we are interested in the DepartingFlights navigation path. ©  2012 SAP AG. All rights reserved. 26
  • 27. Creating a Basic iPhone Application – 9/11 As with the Flights page, a third page is added for Bookings and fields are added as seen earlier. This completes the design process for the screen fields, so we can now press Finish. ©  2012 SAP AG. All rights reserved. 27
  • 28. Creating a Basic iPhone Application – 10/11 After defining where you want the generated XCode project to be stored, you now use XCode to open that project. At this point you could simply run the application or you use the coding as the starting point for your own custom application. ©  2012 SAP AG. All rights reserved. 28
  • 29. Creating a Basic iPhone Application – 11/11 The application can then be run in the iOS simulator within XCode. ©  2012 SAP AG. All rights reserved. 29
  • 30. Agenda u  Gateway Service Consumption Overview u  Creating OData Proxy Objects u  iPhone App Creation u  Consumption Exercises – Java Server Pages, JavaScript ©  2012 SAP AG. All rights reserved. 30
  • 31. Hands-on Exercise Exercise 14 Consume a Gateway Service Using Java Server Pages ©  2012 SAP AG. All rights reserved. 31
  • 32. Hands-on Exercise Exercise 15 Consume a Gateway Service Using the SAPUI5 JavaScript Libraries (Read-only) ©  2012 SAP AG. All rights reserved. 32
  • 33. Summary You should now understand: Ÿ  The general principles of consuming a Gateway Service Ÿ  Creation of OData proxy objects Ÿ  Creation of an iPhone Application to Consume a Gateway Service Ÿ  Consumption of Gateway Services using Java Server Pages and JavaScript + HTML5 ©  2012 SAP AG. All rights reserved. 33
  • 34. © 2012 SAP AG. All rights reserved No part of this publication may be reproduced or transmitted in any form or for any purpose Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal without the express permission of SAP AG. The information contained herein may be Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services changed without prior notice. mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase, Inc. Sybase is an SAP company. Corporation. All other product and service names mentioned are the trademarks of their respective IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, companies. Data contained in this document serves informational purposes only. National System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/ product specifications may vary. VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, The information in this document is proprietary to SAP. No part of this document may be OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, reproduced, copied, or transmitted in any form or for any purpose without the express prior RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent written permission of SAP AG. Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of This document is a preliminary version and not subject to your license agreement or any IBM Corporation. other agreement with SAP. This document contains only intended strategies, developments, Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. and functionalities of the SAP® product and is not intended to be binding upon SAP to any Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered particular course of business, product strategy, and/or development. Please note that this document is subject to change and may be changed by SAP at any time without notice. trademarks of Adobe Systems Incorporated in the United States and/or other countries. SAP assumes no responsibility for errors or omissions in this document. SAP does not Oracle is a registered trademark of Oracle Corporation. warrant the accuracy or completeness of the information, text, graphics, links, or other items UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. contained within this material. This document is provided without a warranty of any kind, Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are either express or implied, including but not limited to the implied warranties of trademarks or registered trademarks of Citrix Systems, Inc. merchantability, fitness for a particular purpose, or non-infringement. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World SAP shall have no liability for damages of any kind including without limitation direct, special, Wide Web Consortium, Massachusetts Institute of Technology. indirect, or consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence. Java is a registered trademark of Sun Microsystems, Inc. The statutory liability for personal injury and defective products is not affected. SAP has no JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for control over the information that you may access through the use of hot links contained in technology invented and implemented by Netscape. these materials and does not endorse your use of third-party Web pages nor provide any SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, warranty whatsoever relating to third-party Web pages. StreamWork, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. ©  2012 SAP AG. All rights reserved. 34