You are on page 1of 37

Providing Web

Services in ABAP
Dr. Susanne Rothaug
SAP NetWeaver Product Management
Enterprise SOA and Web Service Technology
Web Service Creation: Inside-out approach
Web Service Creation: Outside-In approach
Outlook to Web Services in the next SAP
NetWeaver release
SOA Is Great, But Not Enough

ENTERPRISE SERVICES CAPTURE BUSINESS SEMANTICS


AND REPRESENT A “COMMON LANGUAGE OF BUSINESS”

SOA + ES = Enterprise SOA

© SAP AG 2006, S. Rothaug / 3


Aspects of Enabling Enterprise Services

Service enabling consists of two aspects:


„ From a technology perspective, the SAP system has to support
communication based on the Web Services standards stack
„ From an application perspective, the SAP system has to provide
meaningful services to prospective client applications

Application Services: Web Services Technologies:


ABAP XML
Java XSD
Web-based WSDL
Standard SOAP
Custom BPEL4WS
SAP
Application

© SAP AG 2006, S. Rothaug / 4


Enterprise SOA

Business Processes and User Interaction

Enterprise
Services
Abstraction and Integration

Enterprise Applications

© SAP AG 2006, S. Rothaug / 5


What makes a Services an Enterprise Service

© SAP AG 2006, S. Rothaug / 6


Web Services Overview: Definition

WEB SERVICES are


SELF CONTAINED
and SELF DESCRIBING
APPLICATION FUNCTIONALITIES
that can be
PROCESSED
through
OPEN INTERNET STANDARDS

© SAP AG 2006, S. Rothaug / 7


Web Services Overview: The Nature of Web Services

Web Services

act like a black-box that may require input and deliver


a result

work on top of any communication technology stack

can be published, discovered and invoked based on open


technology standards

work in synchronous and asynchronous scenarios

facilitate integration within an enterprise as well as cross


enterprises

© SAP AG 2006, S. Rothaug / 8


Web Services Overview: The Paradigm

UDDI
Registry

2 Direct WSDL exchange 1


„Discover Web service „Create Web service
„Develop Client App „ Create WSDL
„ Publish WSDL (opt.)

WSDL
Web Document
Service

Web service
Consumer

SOAP Business
Functionality

3 „ Web service Execution Web service Provider

© SAP AG 2006, S. Rothaug / 9


Web Services Overview: WSDL Overview

Web Service Description Language


Describes the basic characteristics of a Web service
„ Supported operations and their data format e.g. xCBL Order
„ Supported protocols e.g. SOAP
„ Network address e.g. http://a.com/order

Further information
„ Working Group: http://www.w3.org/2002/ws/desc/
„ Specification: http://www.w3.org/TR/wsdl12/

© SAP AG 2006, S. Rothaug / 10


Web Services Technology Overview:
Providing Web Services based on Open Standards

WS
… … …
Consumer ESR
UDDI

SOAP
WSDL

Web service

Web Service
Runtime Development Environments

Service Definition

ABAP
XI Server
BAPI
Java Class

RFC
EJB

Standard
Proxy

Interfaces

Business
Application
SAP NetWeaver Java

© SAP AG 2006, S. Rothaug / 11


Web Services Technology Overview:
Consuming Web Services based on Open Standards

Business ESR
Functionality UDDI

Web service Provider


WSDL
SOAP

Web Service
Development Environments
Web service Web Service
Runtime

Web Service Proxy ABAP

Web Service
Consumer Application
SAP NetWeaver Java

© SAP AG 2006, S. Rothaug / 12


Web Services Technology Overview:
Value Added Web Services with XI

“Mediated”
Web services
with Routing, Adapter 3rd Party
Mapping and BPM

Web service SOAP SAP NetWeaver Adapter SAP System


Client Integration Server XI Protocol
or SOAP

Web service SOAP


SAP NetWeaver
Client Application Server
≥ 6.40

Point-to-Point
“Basic” Web services

© SAP AG 2006, S. Rothaug / 13


Enterprise SOA and Web Service Technology
Web Service Creation: Inside-out approach
Web Service Creation: Outside-In approach
Outlook to Web Services in the next SAP
NetWeaver release
Creating a Web Service
in less than ONE minute

1
Implement • No Web service specific programming
Business Application • New or existing applications
• Defines standard interfaces
• Well known programming models

WS Configuration 2
WS Definition Generate
• Wizard based approach
Service Interface/Virtual
Web Service • Based on preconfigured profiles
Interface • Based on abstract behavior
• Available for ABAP & Java

3
Activate /
• Deployment in Java
Deploy Web Service
• Activation in ABAP

© SAP AG 2006, S. Rothaug / 15


The Service Definition Wizard

„ Out-of-the-box Web services


enablement of SAP solutions

„ Allows to expose an existing


endpoint as a Web Service with
a few mouse-clicks

„ Only shows the most important


settings in the wizard

„ Default values (profiles) for other


settings

„ Hides technical details

„ Implicitly creates all necessary


objects

© SAP AG 2006, S. Rothaug / 16


Web Service Entities – Service Interface

The Service Interface is the interface visible to clients


(via WSDL, UDDI,…)

„ It provides abstraction from concrete implementation (=endpoint)


„ It allows to publish a “view” on existing implementations as Web Service
Interfaces, i.e. renaming, hiding of parameters/methods, default values
„ It allows to define how the Web Service Interface is represented in the
SOAP message
„ Is created as an entity of its own on the Java stack
„ Can be found on the “Interface” tab of the Service Definition on the ABAP stack

© SAP AG 2006, S. Rothaug / 17


Web Service Entities – Interface
<SOAP-ENV:Envelope> Response
<SOAP-ENV:Envelope> Request <SOAP-ENV:Body>
<SOAP-ENV:Body> <rpl:getHomeAddressResponse>
<ns1:getHomeAddress> <rpl:Response>
<ns1:Employee>1001</ns1:Employee> <tns:street>10 Main Street</tns:street>
</ns1:getHomeAddress> <tns:city>Ottawa</tns:city>
</SOAP-ENV:Body> <tns:province>Ontario</tns:province>
</SOAP-ENV:Envelope> <tns:country>CAN</tns:country>
</rpl:Response>
</rpl:getHomeAddressResponse>
Rename Rename </SOAP-ENV:Body>
methods parameters Provide default values and
</SOAP-ENV:Envelope>
hide parameters

getHomeAddress
Employee Default Value street city province country
(I) HM (O) (O) (O) (O)

Virtual
Interface

getEmployeePrivateAddress

i_employee i_address e_street e_city e_county e_country


ID (I) _type(I) (O) (O) (O) (O)
Implementation
Layer

© SAP AG 2006, S. Rothaug / 18


Web Service Entities – Definition

A Web service definition is the assignment of behavior


to a Web Service Interface via features

Motivation
„ A Web service is not only described by its interface but also by its behavior with
respect to
– stateless/stateful communication,
– transactional behavior,
– security requirements

Idea
„ describe this kind of behavior via abstract features
„ assign technical protocols to these abstract features in the Web service
configuration
„ Example:
– Feature: Stateful
– Technical Protocols: Stateful via HTTP-Cookies,
Stateful via URL-Extensions

© SAP AG 2006, S. Rothaug / 19


Web Service Entities – Service Definition

Benefits
„ The same Web Service
Definition can be deployed
to various application
servers which may differ in
their technical capabilities
„ Web Service Consumer
implementations do not
depend on technical
server information
– Clients are generated
based on implementation-
independent Web Service
definitions
– Technical details are
configured separately in
the Web Service Client
Runtime

© SAP AG 2006, S. Rothaug / 20


Web Service Entities – Configuration

A Web Service Configuration is the assignment of


technical protocols to abstract features

„ Based on the Web Service capabilities of the


specific SAP NetWeaver Application Server
„ Configuration of additional Web Service Runtime features
– Logging, Tracing, Monitoring
– Security Roles
„ Deployment as usual
– SDM deployment in Java

© SAP AG 2006, S. Rothaug / 21


The Web Service Homepage …

„ … is available for each deployed


Web Service

„ … shows the documentation for


the Web Service

„ … allows to retrieve WSDL


descriptions in different styles

„ … offers testing capabilities

„ … can be used to test SAP and


non-SAP Web services

„ … is a JSP page which requires


the Java stack to be installed

© SAP AG 2006, S. Rothaug / 22


Two basic Ways of Developing an Interface

Inside-Out
„ Start of implementation in the backend system
„ Interface semantics pre-defined, directly reflect implementation
„ Drawback: Implementation details are visible in the interface

Outside-In
„ Central design of interfaces that make business sense in
SAP XI Integration Repository
„ Using global data types
„ Reference to Governance Process for PIC
„ Generation of proxies from abstractly modeled interface
„ Implementation of “glue code” between proxy and business function
„ Implementation can be changed without changes in interface

© SAP AG 2006, S. Rothaug / 23


© SAP AG 2006, S. Rothaug / 24
Enterprise SOA and Web Service Technology
Web Service Creation: Inside-out approach
Web Service Creation: Outside-In approach
Outlook to Web Services in the next SAP
NetWeaver release
Two basic Ways of Developing an Interface

Inside-Out
„ Start of implementation in the backend system
„ Interface semantics pre-defined and reflects directly implementation
„ Drawback: Implementation details are visible in the interface

Outside-In
„ Central design of interfaces that make business sense in
SAP XI Integration Repository
„ Using global data types
„ Reference to Governance Process for PIC
„ Generation of proxies from abstractly modeled interface
„ Implementation of “glue code” between proxy and business function
„ Implementation can be changed without changes in interface

© SAP AG 2006, S. Rothaug / 26


Inside-out and Outside-in Web Services

Modeling Implementation Web Service


Execution

Inside-out: Existing
expose existing Implementation
Run
implementation Web WS
BAPI, Service
RFC Definition Client
Wizard

ESR New
Implementation
Outside-in: Run
model interface Message
Web
WS
first, then add Service
Interface XI Server Proxy Definition Client
implementation Wizard

Generate /
Implement

XI Integration Builder SAP NW AS

© SAP AG 2006, S. Rothaug / 27


Outside-in Web Services

Major steps
„ Interface Modeling in Enterprise Services Repository (ESR)
„ Proxy generation in backend
„ Implementation of application logic
„ Web Service creation
„ optional: Configuration of the Web Service

NW AS
NW AS NW AS NW AS
Enterprise ABAP
ABAP ABAP ABAP
Services Transaction
Transaction Transaction Transaction
Repository SE80 /
SPROXY SE80 WSCONFIG
WSADMIN

Modeling Proxy Implementation Service Service


Generation Creation Configuration

© SAP AG 2006, S. Rothaug / 28


© SAP AG 2006, S. Rothaug / 29
Enterprise SOA and Web Service Technology
Web Service Creation: Inside-out approach
Web Service Creation: Outside-In approach
Outlook to Web Services in the next SAP
NetWeaver release
The Services Registry

ESR
MODEL METADATA
CONSUMER ƒ Service Interfaces
TOOLS ƒ Operations
ƒ Data Types
ƒ ...
Which services are modeled or
implemented in the landscape?
Which services can be invoked
in the landscape?
Where to publish the invocable
service endpoints?
CONSUMER PROVIDER

CONSUMER
CONSUMER SERVICE
SERVICE
APPLICATION
APPLICATION INVOCATION SERVICE IMPLEMENTATION
IMPLEMENTATION
ENDPOINT

© SAP AG 2006, S. Rothaug / 31


The Services Registry

Key Benefits
SOA
„ UDDI 3.0 based
„ Documentation ES Repository

– Diagrams, annotations
„ Naming standards and classifications
„ Service evolution and versioning
„ Taxonomy search
„ Keyword search services
„ Service management and governance
„ Procedures for backend publications Services
Registry
„ Procedures for client development
„ Service configuration
ES Repository

© SAP AG 2006, S. Rothaug / 32


Services Registry

ESR

SERVICE DEFINITIONS
CONSUMER
TOOLS SERVICES
REGISTRY n ce
e
fer
e
R
SERVICE MODEL
SERVICE MODEL
PUBLICATIONS
PUBLICATIONS SOA
DISCOVER PUBLISH

SERVICE DEFINITION
SERVICE DEFINITION
PUBLICATIONS
PUBLICATIONS

CONSUMER PROVIDER

R
SERVICE ENDPOINT
SERVICE ENDPOINT

ef
PUBLICATIONS

er
PUBLICATIONS

en
ef
er

ec
en
e c
CONSUMER
CONSUMER SERVICE
SERVICE
APPLICATION
APPLICATION INVOCATION SERVICE IMPLEMENTATION
IMPLEMENTATION
ENDPOINT

© SAP AG 2006, S. Rothaug / 33


ESR and Services Registry

Registry
ESR „ Yellow pages of Services
„ Add deployment information (i.e.
endpoint)
„ Manage services
Services
Registry „ Ease of consumption: Browse, discover,
and use services.

ES Repository

Repository
„ Definition of Processes and
Services.
„ Service Metadata
„ Central modeling and design
environment

© SAP AG 2006, S. Rothaug / 34


© SAP AG 2006, S. Rothaug / 35
Summary

„ The enterprise service-oriented architecture, SAP’s


approach for building service-oriented business
applications utilizes Web Services as vital part of its
communication and integration strategy

„ SAP’s rich business functionality, in conjunction with


state-of-the-art technology, enables you to establish
cross-company business processes as an integrated
part of your development efforts based on Web Services

„ SAP NetWeaver offers an easy, convenient way to build


Web services

© SAP AG 2006, S. Rothaug / 36


THANK YOU FOR YOUR
ATTENTION !

QUESTIONS – SUGGESTIONS – DISCUSSION

© SAP AG 2006, S. Rothaug / 37

You might also like