37
Providing Web Services in ABAP Dr. Susanne Rothaug SAP NetWeaver Product Management

Providing Web Services in ABAP

  • Upload
    ssahdal

  • View
    355

  • Download
    5

Embed Size (px)

Citation preview

Page 1: Providing Web Services in ABAP

Providing Web Services in ABAPDr. Susanne Rothaug

SAP NetWeaver Product Management

Page 2: Providing Web Services in ABAP

Enterprise SOA and Web Service TechnologyWeb Service Creation: Inside-out approachWeb Service Creation: Outside-In approachOutlook to Web Services in the next SAP NetWeaver release

Page 3: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 3

SOA Is Great, But Not Enough

ENTERPRISE SERVICES CAPTURE BUSINESS SEMANTICSAND REPRESENT A “COMMON LANGUAGE OF BUSINESS”

SOA + ES = Enterprise SOA

Page 4: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 4

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 stackFrom an application perspective, the SAP system has to provide meaningful services to prospective client applications

SAPApplication

Application Services:ABAP

JavaWeb-based

StandardCustom

Web Services Technologies:XMLXSDWSDLSOAPBPEL4WS

Page 5: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 5

Enterprise SOA

Business Processes and User Interaction

Abstraction and Integration

EnterpriseServices

Enterprise Applications

Page 6: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 6

What makes a Services an Enterprise Service

Page 7: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 7

Web Services Overview: Definition

WEB SERVICES are

SELF CONTAINED

and SELF DESCRIBING

APPLICATION FUNCTIONALITIES

that can be

PROCESSED

through

OPEN INTERNET STANDARDS

Page 8: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 8

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

Page 9: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 9

Web Services Overview: The Paradigm

Web Service

Consumer

UDDIRegistry

Create Web serviceCreate WSDLPublish WSDL (opt.)

Web service ProviderW

eb s

ervi

ce

WSDLDocument

BusinessFunctionality

1

3

2Discover Web serviceDevelop Client App

Web service Execution

SOAP

Direct WSDL exchange

Page 10: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 10

Web Services Overview: WSDL Overview

Describes the basic characteristics of a Web serviceSupported operations and their data format e.g. xCBL OrderSupported protocols e.g. SOAPNetwork address e.g. http://a.com/order

Further informationWorking Group: http://www.w3.org/2002/ws/desc/Specification: http://www.w3.org/TR/wsdl12/

Web Service Description Language

Page 11: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 11

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

StandardInterfaces

Service Definition

BA

PI

EJB

Java

Cla

ss

XI S

erve

r Pr

oxy

SAP NetWeaver

WSConsumer … ……

SOAP

WSDL

Web service

Development Environments

ABAP

Java

Web Service Runtime

Business Application

RFC

ESRUDDI

Page 12: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 12

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

Web Service Consumer Application

SAP NetWeaver

WSDL

Web serviceDevelopment Environments

ABAP

Java

Web Service Runtime

Web Service Proxy

Web service Provider

BusinessFunctionality

Web Service

SOA

P

ESRUDDI

Page 13: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 13

Web serviceClient

Web Services Technology Overview: Value Added Web Services with XI

Web serviceClient

SAP NetWeaverApplication Server

≥ 6.40SOAP

SAP NetWeaverIntegration Server

Point-to-Point“Basic” Web services

“Mediated”Web serviceswith Routing,

Mapping and BPM

SOAP

XI Protocolor SOAP

SAP System

3rd Party

Adapter

Adapter

Page 14: Providing Web Services in ABAP

Enterprise SOA and Web Service TechnologyWeb Service Creation: Inside-out approachWeb Service Creation: Outside-In approachOutlook to Web Services in the next SAP NetWeaver release

Page 15: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 15

Creating a Web Servicein less than ONE minute

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

2• Wizard based approach• Based on preconfigured profiles• Based on abstract behavior• Available for ABAP & Java

3• Deployment in Java• Activation in ABAP

Implement Business Application

WS Configuration

WS Definition

Service Interface/VirtualInterface

GenerateWeb Service

Activate /Deploy Web Service

Page 16: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 16

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

Page 17: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 17

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 valuesIt allows to define how the Web Service Interface is represented in the SOAP messageIs created as an entity of its own on the Java stackCan be found on the “Interface” tab of the Service Definition on the ABAP stack

Page 18: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 18

Web Service Entities – Interface

VirtualInterface

ImplementationLayer

i_employeeID (I)

i_address_type(I)

e_street(O)

getEmployeePrivateAddress

e_city(O)

e_county(O)

e_country(O)

<SOAP-ENV:Envelope><SOAP-ENV:Body>

<ns1:getHomeAddress><ns1:Employee>1001</ns1:Employee>

</ns1:getHomeAddress></SOAP-ENV:Body>

</SOAP-ENV:Envelope>

<SOAP-ENV:Envelope><SOAP-ENV:Body>

<rpl:getHomeAddressResponse><rpl:Response>

<tns:street>10 Main Street</tns:street><tns:city>Ottawa</tns:city><tns:province>Ontario</tns:province><tns:country>CAN</tns:country>

</rpl:Response></rpl:getHomeAddressResponse>

</SOAP-ENV:Body></SOAP-ENV:Envelope>

street (O)

city (O)

province (O)

country(O)

getHomeAddress

Request

Employee (I)

Response

Rename methods

Rename parameters

Default ValueHM

Provide default values and hide parameters

Page 19: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 19

Web Service Entities – Definition

A Web service definition is the assignment of behavior to a Web Service Interface via features

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

Ideadescribe this kind of behavior via abstract featuresassign technical protocols to these abstract features in the Web service configurationExample:– Feature: Stateful

– Technical Protocols: Stateful via HTTP-Cookies, Stateful via URL-Extensions

Page 20: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 20

Web Service Entities – Service Definition

BenefitsThe same Web Service Definition can be deployed to various application servers which may differ in their technical capabilitiesWeb 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

Page 21: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 21

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 ServerConfiguration of additional Web Service Runtime features– Logging, Tracing, Monitoring– Security Roles

Deployment as usual– SDM deployment in Java

Page 22: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 22

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

Page 23: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 23

Two basic Ways of Developing an Interface

Inside-OutStart of implementation in the backend systemInterface semantics pre-defined, directly reflect implementationDrawback: Implementation details are visible in the interface

Outside-InCentral design of interfaces that make business sense in SAP XI Integration RepositoryUsing global data typesReference to Governance Process for PICGeneration of proxies from abstractly modeled interfaceImplementation of “glue code” between proxy and business functionImplementation can be changed without changes in interface

Page 24: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 24

Page 25: Providing Web Services in ABAP

Enterprise SOA and Web Service TechnologyWeb Service Creation: Inside-out approachWeb Service Creation: Outside-In approachOutlook to Web Services in the next SAP NetWeaver release

Page 26: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 26

Two basic Ways of Developing an Interface

Inside-OutStart of implementation in the backend systemInterface semantics pre-defined and reflects directly implementationDrawback: Implementation details are visible in the interface

Outside-InCentral design of interfaces that make business sense in SAP XI Integration RepositoryUsing global data typesReference to Governance Process for PICGeneration of proxies from abstractly modeled interfaceImplementation of “glue code” between proxy and business functionImplementation can be changed without changes in interface

Page 27: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 27

Inside-out and Outside-in Web Services

Modeling

SAP NW ASXI Integration Builder

Generate / Implement

Implementation Web Service Execution

Existing Implementation

BAPI,RFC

ESR

MessageInterface XI Server Proxy

New Implementation

Run Web

Service Definition

Wizard

RunWeb

Service Definition

Wizard

Inside-out: expose existingimplementation WS

Client

WS Client

Outside-in: model interfacefirst, then addimplementation

Page 28: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 28

Outside-in Web Services

Major stepsInterface Modeling in Enterprise Services Repository (ESR)Proxy generation in backendImplementation of application logicWeb Service creationoptional: Configuration of the Web Service

EnterpriseServices

Repository

NW AS ABAP

TransactionWSCONFIG

NW AS ABAP

TransactionSE80 /

WSADMIN

NW AS ABAP

TransactionSPROXY

NW AS ABAP

TransactionSE80

Service Configuration

Service Creation

Proxy Generation

Modeling Implementation

Page 29: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 29

Page 30: Providing Web Services in ABAP

Enterprise SOA and Web Service TechnologyWeb Service Creation: Inside-out approachWeb Service Creation: Outside-In approachOutlook to Web Services in the next SAP NetWeaver release

Page 31: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 31

The Services Registry

ESR

CONSUMERAPPLICATIONCONSUMER

APPLICATIONSERVICE

IMPLEMENTATIONSERVICE

IMPLEMENTATIONSERVICEENDPOINT

INVOCATION

PROVIDERCONSUMER

CONSUMER TOOLS

MODEL METADATAService InterfacesOperationsData Types...

Which services are modeled or implemented in the landscape?Which services can be invoked in the landscape?Where to publish the invocableservice endpoints?

Page 32: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 32

The Services Registry

SOA

ES Repository

Key BenefitsUDDI 3.0 basedDocumentation

– Diagrams, annotationsNaming standards and classificationsService evolution and versioningTaxonomy searchKeyword search servicesService management and governanceProcedures for backend publicationsProcedures for client developmentService configuration

Services Registry

ES Repository

Page 33: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 33

Services Registry

CONSUMERAPPLICATIONCONSUMER

APPLICATIONSERVICE

IMPLEMENTATIONSERVICE

IMPLEMENTATIONSERVICEENDPOINT

INVOCATION

PROVIDERCONSUMER

CONSUMER TOOLS SERVICES

REGISTRY

SERVICE MODELPUBLICATIONS

SERVICE MODELPUBLICATIONS

SERVICE DEFINITIONPUBLICATIONS

SERVICE DEFINITIONPUBLICATIONS

SERVICE ENDPOINTPUBLICATIONS

SERVICE ENDPOINTPUBLICATIONS

PUBLISHDISCOVER

Refer

ence

ReferenceReference

SOA

ESR

SERVICE DEFINITIONS

Page 34: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 34

ESR and Services Registry

Services Registry

ES Repository

RepositoryDefinition of Processes and Services. Service MetadataCentral modeling and design environment

Registry Yellow pages of ServicesAdd deployment information (i.e. endpoint)Manage servicesEase of consumption: Browse, discover, and use services.

ESR

Page 35: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 35

Page 36: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 36

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 withstate-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

Page 37: Providing Web Services in ABAP

© SAP AG 2006, S. Rothaug / 37

THANK YOU FOR YOURATTENTION !

QUESTIONS – SUGGESTIONS – DISCUSSION