Mais conteúdo relacionado Semelhante a W8/WP8 App Dev for SAP, Part 1A: Service Development with NetWeaver Gateway Service Builder (20) Mais de SAP PartnerEdge program for Application Development (20) W8/WP8 App Dev for SAP, Part 1A: Service Development with NetWeaver Gateway Service Builder3. © 2012 SAP AG. All rights reserved. 3
SAP NetWeaver Gateway Service Builder
The SAP NetWeaver Gateway
Service Builder provides a tool to
centrally display and create the
definition of an OData Service.
Runtime artifacts (model provider
class, data provider class, model
and service)
OData artifacts (entity set, entity
type and properties)
Used data sources and models
Models can be created based on
EDMX-Modeling.
The modeling environment follows
a project based approach, all
relevant data is consolidated in
this projects.
4. © 2012 SAP AG. All rights reserved. 4
Service Generation
Gateway Service Builder - development flow
Service
Definition
Data Model Definition
Service Implementation
(Code based or mapping)
Gateway
Backend
(SEGW)
Service Registration
and Hub Activation
Gateway Server
(/IWFND/MAINT_SERVICE)
5. © 2012 SAP AG. All rights reserved. 5
Gateway Service Builder - development flow in detail
OData Service
Definition in
SEGW
Declarative
Model
Definition*
Import
Data Model
(EDMX)
Import DDIC/
RFC/BOR
Interface*
Redefine
Data Source
Service
(GenIL, SPI, B
W Easy
Query, MDX)Code-Based Implementation*
Code-Based Extensions*
Data Model
Definition
(MPC)
Service
Implementation
(DPC)
Map RFC/BOR
Operation*
Service Registration
and Hub Activation
Service
Maintenance
Include
Gateway
Service*
* Repeatable
within
one service
Service Generation
Data Model Definition
Service Implementation
(Code based or mapping)
6. © 2012 SAP AG. All rights reserved. 6
Entity Data Model – Overview
An Entity Data Model (EDM) describes the organisation and relationship of the data resources within a
particular business scenario.
Entity Sets are instances of entity types and can be accessed as follows:
• http://<host>/<ServiceRoot>/SalesOrderItems
• http://<host>/<ServiceRoot>/<Products
Association: Relationship
between two entity types
An Entity Type is built from
one or more properties
Navigation implements an
association
Entity Type: EDM basic
building block. Represents
specific business object
At least one property must
be nominated as a key field
8. © 2012 SAP AG. All rights reserved. 8
Agenda
Data Model Definition
Declarative model definition
Import data model (EDMX)
Import DDIC
Import RFC/BOR Interface
Service implementation
Code based implementation
Code based extensions
Mapping of RFC/BOR operations
Service registration
Gateway Hub
Gateway Backend
9. © 2012 SAP AG. All rights reserved. 9
Gateway Service Builder – Modeling
OData Service
Definition in
SEGW
Declarative
Model
Definition*
Import
Data Model
(EDMX)
Import DDIC/
RFC/BOR
Interface*
Redefine
Data Source
Service
(GenIL, BOL, S
PI, BW Easy
Query, MDX)Code-Based Implementation*
Code-Based Extensions*
Data Model
Definition
(MPC)
Service
Implementation
(DPC)
Map RFC/BOR
Operation*
Service Registration
and Hub Activation
Service
Maintenance
Include
Gateway
Service*
* Repeatable
within
one service
10. © 2012 SAP AG. All rights reserved. 10
Gateway Service Builder – outside in approach
OData Service
Definition in
SEGW
Declarative
Model
Definition*
Import
Data Model
(EDMX)
Import DDIC/
RFC/BOR
Interface*
Redefine
Data Source
Service
(GenIL, BOL, S
PI, BW Easy
Query, MDX)Code-Based Implementation*
Code-Based Extensions*
Data Model
Definition
(MPC)
Service
Implementation
(DPC)
Map RFC/BOR
Operation*
Service Registration
and Hub Activation
Service
Maintenance
Include
Gateway
Service*
* Repeatable
within
one service
11. © 2012 SAP AG. All rights reserved. 11
Gateway Service Builder – Leveraging Data Dictionary
OData Service
Definition in
SEGW
Declarative
Model
Definition*
Import
Data Model
(EDMX)
Import DDIC/
RFC/BOR
Interface*
Redefine
Data Source
Service
(GenIL, BOL, S
PI, BW Easy
Query, MDX)Code-Based Implementation*
Code-Based Extensions*
Data Model
Definition
(MPC)
Service
Implementation
(DPC)
Map RFC/BOR
Operation*
Service Registration
and Hub Activation
Service
Maintenance
Include
Gateway
Service*
* Repeatable
within
one service
12. © 2012 SAP AG. All rights reserved. 12
Gateway Service Builder – Leverage RFC/BOR interfaces
OData Service
Definition in
SEGW
Declarative
Model
Definition*
Import
Data Model
(EDMX)
Import DDIC/
RFC/BOR
Interface*
Redefine
Data Source
Service
(GenIL, BOL,
SPI, BW Easy
Query, MDX)Code-Based Implementation*
Code-Based Extensions*
Data Model
Definition
(MPC)
Service
Implementation
(DPC)
Map RFC/BOR
Operation*
Service Registration
and Hub Activation
Service
Maintenance
Include
Gateway
Service*
* Repeatable
within
one service
13. © 2012 SAP AG. All rights reserved. 13
Demo – RFC/BOR Generator
14. © 2012 SAP AG. All rights reserved. 14
ERP or Business Suite
Gateway Service
Registered Service
Name
Registered Model
Name
Service Builder – Result
Extension
Class
Data
Provider
Class
Extension
Class
Model
Provider
Class
External
Service Name
15. © 2012 SAP AG. All rights reserved. 15
Service Builder – runtime artifacts
ABAP classes for
- Model definition
- Service implementation
Service registration in the backend
Demo
17. © 2012 SAP AG. All rights reserved. 17
A custom Gateway Service is always developed on top of the Gateway backend AddOns.
In order to expose our new Gateway Service to the outside world, we must create an entry in the
Service Catalogue on the Gateway Hub server.
Gateway Service Catalogue (Hub Deployment)
ERP or Business Suite
Gateway Service
Registered
Service
Data
Provider
Class
Registered
Model
Model
Provider
Class
Gateway Hub
Gateway
Server
AddOns
Gateway Service Catalogue
External
Name
External
Name
Gateway
Backend
AddOns
18. © 2012 SAP AG. All rights reserved. 18
Gateway service registration on the hub
SEGW has created a
• Data Provider Class and a
• Model Provider Class
• plus extension classes
These classes must be
• registered and
• activated
in the Hub system
Demo
Notas do Editor Value Proposition / Theme = (why should a customer care) Noit‘s time toactivatetheservice SEGW has created four ABAP classes and have registered them in the backend.Now, we must register the Technical Service Name in the Hub SEGWhascreated 4 classse:Data Provider Base Class (ZCL_ZCD204_EPM_DEMO_DPC)Data Provider Extension Class (ZCL_ZCD204_EPM_DEMO_DPC_EXT)Model Provider Base Class (ZCL_ZCD204_EPM_DEMO_MPC)Model Provider Extension Class (ZCL_ZCD204_EPM_DEMO_MPC_EXT)Registered Model (ZCD204_EPM_DEMO_MDL)Registered Service (ZCD204_EPM_DEMO_SRV) Component IW_SCS is only needed if you create Gateway Services that use screen scraping.It is entirely possible for all the Gateway Add-On Components to be installed in a single server; however, this installation arrangement is only recommended for test and development scenarios. For all productive scenarios, it is recommended that a separate Gateway Hub server is installed.