SAP NetWeaver Gateway - Gateway Service Consumption
 

SAP NetWeaver Gateway - Gateway Service Consumption

on

  • 3,284 views

 

Statistics

Views

Total Views
3,284
Views on SlideShare
3,284
Embed Views
0

Actions

Likes
1
Downloads
76
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

SAP NetWeaver Gateway - Gateway Service Consumption SAP NetWeaver Gateway - Gateway Service Consumption Presentation Transcript

  • SAP NetWeaver GatewayGateway Service ConsumptionMay 2012 A Branded Service provided by SAP Customer Solution Adoption
  • 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© 2012 SAP AG. All rights reserved. 2
  • Agenda Gateway Service Consumption Overview Creating OData Proxy Objects Using the Gateway Developer Tool for XCode – Building an iPhone App Demo© 2012 SAP AG. All rights reserved. 3
  • Agenda Gateway Service Consumption Overview Creating OData Proxy Objects Using the Gateway Developer Tool for XCode – Building an iPhone App Demo© 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 scopeof an SAP system, you will first need to choose a programming environment.You are free to choose any programming environment with which you arecomfortable… SAP places no restrictions on how Gateway services are to beconsumed.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 PrinciplesNo matter what programminglanguage you choose, youshould obtain at the veryleast, an OData SDK for yourchosen language.Many OData SDKs areavailable from the developerssection of the odata.orgwebsite.However, SAP offers someproxy generation tools thathelp accelerate applicationdevelopment.© 2012 SAP AG. All rights reserved. 7
  • Agenda Gateway Service Consumption Overview Creating OData Proxy Objects Using the Gateway Developer Tool for XCode – Building an iPhone App Demo© 2012 SAP AG. All rights reserved. 8
  • Gateway Service Consumption – Proxy GenerationSix different tools are available for creating OData proxy objects, five of which arewritten by SAP. Language Tool Shipped As Proxy Object CreatedJava Oracle Eclipse plug-in Manually at design timePHP PHP Eclipse plug-in Manually at design time GroupVisual C# Microsoft Visual Studio 2010 project template Manually at design timeObjective C Apple Stand alone tool Manually at design timeJavaScript ECMA Object within SAPUI5 library Implicitly at runtimeFlash Adobe Flash Builder plug-in from Adobe Manually at design timeThe generated OData proxy object acts as the interface to the SAP NetWeaverGateway 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 pagehttp://scn.sap.com/community/netweaver-gateway  Developer ToolsThe 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 GatewayIn Eclipse Helios (3.6) or Indigo (3.7), a Gateway proxy object is created byselecting a project of type “SAP NetWeaver Gateway”  “Proxy Generation” atdesign time.This functionality is installed as a plug-in for Eclipse.© 2012 SAP AG. All rights reserved. 10
  • Gateway Proxy Generation – Visual Studio 2010 (C#) SAP NetWeaver GatewayIn 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. 11
  • Gateway Proxy Generation – Flash Builder ≥4.5 (MXML) SAP NetWeaver GatewayIn 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. 12
  • Gateway Proxy Generation – XCode (Objective C) Generated XCode Project SAP NetWeaver GatewayThe SAP NetWeaver Gateway developer tool for XCode is a stand-alone tool thatconnects 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. 13
  • Gateway Proxy Generation – SAPUI5 (JavaScript+HTML5) SAP NetWeaver GatewayAt 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 yourSAPUI5 Project.© 2012 SAP AG. All rights reserved. 14
  • Agenda Gateway Service Consumption Overview Creating OData Proxy Objects Using the Gateway Developer Tool for XCode – Building an iPhone App Demo© 2012 SAP AG. All rights reserved. 15
  • Creating a Basic iPhone Application – 1/11When you run the SAP NetWeaver Gateway developer tool for XCode, you are firstasked whether you want to create just a proxy object, or a proxy object wrapped ina 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 fromthat airport.Finally, the user can select an individual flight to see its bookings.© 2012 SAP AG. All rights reserved. 16
  • Creating a Basic iPhone Application – 2/11Before using the proxy generator tool, you must first configure it to point to thePress ⌘, (Command comma) to display the configuration screen.installed OData SDK and at least one Gateway server.© 2012 SAP AG. All rights reserved. 17
  • Creating a Basic iPhone Application – 3/11Enter the application name and press Browse© 2012 SAP AG. All rights reserved. 18
  • Creating a Basic iPhone Application – 4/11Once you have selected a system, a list of available Gateway services will bedisplayed. Press OK, to use the selected service, then Next.© 2012 SAP AG. All rights reserved. 19
  • Creating a Basic iPhone Application – 5/11We 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 thebottom right corner to add fields to this screen.© 2012 SAP AG. All rights reserved. 20
  • Creating a Basic iPhone Application – 6/11Knowing that our application will start by providing a list of Airports, we choosethis 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. 21
  • Creating a Basic iPhone Application – 7/11Now 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 onthe first screen.© 2012 SAP AG. All rights reserved. 22
  • Creating a Basic iPhone Application – 8/11Notice now that the dropdown list no longer displays entity sets. This is becausethe first screen uses the Airports entity set; therefore, we can only use fieldsavailable from the navigation paths belonging to Airports.In this case, we are interested in the DepartingFlights navigation path.© 2012 SAP AG. All rights reserved. 23
  • Creating a Basic iPhone Application – 9/11As with the Flights page, a third page is added for Bookings and fields are addedas seen earlier.This completes the design process for the screen fields, so we can now pressFinish.© 2012 SAP AG. All rights reserved. 24
  • Creating a Basic iPhone Application – 10/11After defining where you want the generated XCode project to be stored, you nowuse XCode to open that project.At this point you could simply run the application or you use the coding as thestarting point for your own custom application.© 2012 SAP AG. All rights reserved. 25
  • Creating a Basic iPhone Application – 11/11The application can then be run in the iOS simulator within XCode.© 2012 SAP AG. All rights reserved. 26
  • Agenda Gateway Service Consumption Overview Creating OData Proxy Objects iPhone App Creation Demo© 2012 SAP AG. All rights reserved. 27
  • 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© 2012 SAP AG. All rights reserved. 28