Upload
tranthuan
View
223
Download
0
Embed Size (px)
Citation preview
Providing Web Services in ABAPDr. Susanne Rothaug
SAP NetWeaver Product Management
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
© 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
© 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
© SAP AG 2006, S. Rothaug / 5
Enterprise SOA
Business Processes and User Interaction
Abstraction and Integration
EnterpriseServices
Enterprise Applications
© SAP AG 2006, S. Rothaug / 6
What makes a Services an Enterprise Service
© 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
© 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
© 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
© 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
© 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
© 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
© 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
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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© 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
© SAP AG 2006, S. Rothaug / 24
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
© 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
© 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
© 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
© SAP AG 2006, S. Rothaug / 29
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
© 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?
© 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
© 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
© 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
© SAP AG 2006, S. Rothaug / 35
© 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
© SAP AG 2006, S. Rothaug / 37
THANK YOU FOR YOURATTENTION !
QUESTIONS – SUGGESTIONS – DISCUSSION