Slides

238199551 sap-net weaver

Description
1. SAP NetWeaver How-To Guide How To... Use SOA Configuration to Call RFCs and Web Services from within SAP NetWeaver BPM Applicable Releases: SAP NetWeaver Composition…
Categories
Published
of 80
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
  • 1. SAP NetWeaver How-To Guide How To... Use SOA Configuration to Call RFCs and Web Services from within SAP NetWeaver BPM Applicable Releases: SAP NetWeaver Composition Environment 7.2 Topic Area: Development and Composition Capability: Composition Version 1.0 March 2010
  • 2. © Copyright 2010 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, OpenPower and PowerPC are trademarks or registered trademarks of IBM Corporation. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. These materials are provided “as is” without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within these materials. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages. SAP NetWeaver “How-to” Guides are intended to simplify the product implementation. While specific product features and procedures typically are explained in a practical business context, it is not implied that those features and procedures are the only approach in solving a specific business problem using SAP NetWeaver. Should you wish to receive additional information, clarification or support, please refer to SAP Consulting. Any software coding and/or code lines / strings (“Code”) included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent. Disclaimer Some components of this product are based on Java™. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components. Any Java™ Source Code delivered with this product is only to be used by SAP’s Support Services and may not be modified or altered in any way.
  • 3. Document History Document Version Description 1.00 First official release of this guide
  • 4. Typographic Conventions Type Style Description Example Text Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options. Cross-references to other documentation Example text Emphasized words or phrases in body text, graphic titles, and table titles Example text File and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools. Example text User entry texts. These are words or characters that you enter in the system exactly as they appear in the documentation. <Example text> Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system. EXAMPLE TEXT Keys on the keyboard, for example, F2 or ENTER. Icons Icon Description Caution Note or Important Example Recommendation or Tip
  • 5. Table of Contents 1. Introduction .......................................................................................................................... 1 2. SAP NetWeaver BPM process example ............................................................................ 2 3. Prerequisites ........................................................................................................................ 3 4. Process instantiation Web service .................................................................................... 4 4.1 Create a Service Group project .................................................................................... 4 4.2 Import the process start Web service ........................................................................... 5 4.3 Configure the process start Web service ..................................................................... 7 4.4 Configure the Services Registry ................................................................................... 9 4.5 Configure the Java Provider System .......................................................................... 11 4.6 Define Java User Account Settings ............................................................................ 13 4.7 Business Scenario Configuration ............................................................................... 17 5. ABAP Web service............................................................................................................. 21 5.1 Publish the ABAP Web service to the Service Registry ............................................. 21 5.2 Import the ABAP Web service into the BPM process ................................................. 23 5.3 Configure the Automated Activity ............................................................................... 24 5.4 Configure the ABAP Provider System ........................................................................ 25 5.5 Define the ABAP User Account Settings .................................................................... 26 5.6 Business Scenario Configuration ............................................................................... 28 6. PI Web service ................................................................................................................... 29 6.1 Publish the PI Web service to the Service Registry ................................................... 29 6.2 Import the PI Web service into the BPM process ....................................................... 32 6.3 Configure the Automated Activity ............................................................................... 34 6.4 Configure the PI Provider System .............................................................................. 35 6.5 Define the PI User Account Settings .......................................................................... 37 6.6 Business Scenario Configuration ............................................................................... 39 7. Third Party Web service .................................................................................................... 40 7.1 Publish the third party Web service to the Service Registry ...................................... 40 7.2 Import the third party Web service into the BPM process .......................................... 42 7.3 Configure the Automated Activity ............................................................................... 44 7.4 Configure the third party Provider System ................................................................. 46 7.5 Define the third party User Account Settings ............................................................. 48 7.6 Business Scenario Configuration ............................................................................... 48 8. Integrating WebDynpro and CAF ..................................................................................... 49 8.1 Product list CAF Web service ..................................................................................... 49 8.2 Process instantiation using WebDynpro ..................................................................... 51
  • 6. 8.3 Import the CAF Web service into WebDynpro ........................................................... 52 8.4 Import the process start Web service into WebDynpro .............................................. 53 9. Execute the process .......................................................................................................... 55 10. ABAP RFC .......................................................................................................................... 56 10.1 Import the RFC into the BPM process ........................................................................ 56 10.2 Define the RFC Service Group ................................................................................... 57 10.3 Perform the RFC SOA Configuration ......................................................................... 59 11. (Optional) Application Communication ........................................................................... 62 11.1 Configure the Provided Services ................................................................................ 63 11.2 Configure the Consumer Services.............................................................................. 64 12. Appendix ............................................................................................................................ 65 12.1 PI Configuration .......................................................................................................... 65 12.2 BPM process start Web service ................................................................................. 70 12.3 Process Context ......................................................................................................... 72
  • 7. How To... Use SOA Configuration to call RFCs and Web Services from within SAP NetWeaver BPM 1. Introduction This How-To Guide uses the new SOA Configuration approach to configure different providers and consumers and therefore does not make use the traditional Destination approach. Since there could potentially be thousands of service providers and consumers which interact with each other a more advanced configuration approach are needed to manage the services. SOA Configuration first aims to simplify the configuration steps of large amounts of services, second it provides an automatic configuration and finally allow for role separation. Developers can define the configuration options during design time and then after deployment administrators can do the final assignment. This How-To Guide consists of several different scenarios that follow the steps outlined below. First all services are published to the Service Registry from where they will be imported into the SAP NetWeaver Developer Studio. Automated Activities represent Web services and are mapped to Service Groups. Communication Profiles enforce the method of authentication that providers stipulate and User Accounts can be used to map Service Users to specific Provider Systems. Finally a Business Scenario is used to encapsulate the consumer and provider configuration settings for the entire example scenario. March 2010 1
  • 8. How To... Use SOA Configuration to call RFCs and Web Services from within SAP NetWeaver BPM 2. SAP NetWeaver BPM process example The order process described in this How-To Guide includes 2 user interfaces, 5 Web service and one RFC (Remote function call). Each service is individually discussed and builds on each other to produce the completed process as shown below. The initial order form makes use of a Java Web service to display a list of products to include in the order; the order information is submitted to the process start Web service whereupon the process starts. The order information will then move through various automate activities that in turn calling Web services in different back end systems. First an ABAP Web service is called to retrieve the customer zip code information so that the third party external .Net Web service can return movie listings within a the customers zip code. Simultaneously the order is created in an ABAP back end system via a PI Web service. During the last step an audit trial consisting of the order information is stored in an ABAP system via a direct RFC call. All the Web services are published to the Services Registry and they enforce at least Basic Authentication. March 2010 2
  • 9. How To... Use SOA Configuration to call RFCs and Web Services from within SAP NetWeaver BPM 3. Prerequisites The following is a list of prerequisites in order to get this scenario to work  SAP NetWeaver Composition Environnent 7.2  SAP NetWeaver Process Integration 7.1 and higher  SAP NetWeaver 7.0 EhP1 Ensure you have the following configured  Enterprise Services Registry  Functional PI Web service  Functional ABAP Web service  Functional ABAP Remote Function Call (RFC)  Functional Third Party .Net Web service Additionally knowledge of the following development tools are requested  Java WebDynpro  SAP NetWeaver Business Process Management (BPM)  Composite Application Framework (CAF) March 2010 3
  • 10. How To... Use SOA Configuration to call RFCs and Web Services from within SAP NetWeaver BPM 4. Process instantiation Web service A BPM processes consist of a mandatory Web service that starts the process. During this exercise you will learn how to import a Web services Description Language (WSDL) document into the BPM process and assign it to the process start event; then perform the necessary SOA configuration settings so that the process start Web service endpoints are exposed. 4.1 Create a Service Group project ... 1. Create a Service Group Configuration project To be able to reuse Service Groups in multiple consumer applications, you have to share these Service Groups in a uniform location. You create and share Service Groups in Service Group configuration development components (DCs). Using Service Groups you ensure that service references in different client applications are grouped together and will be configured to use the same provider at runtime. Proceed to create the Service Group Development Component project called soa/sg. You can create Service Groups that are referred by multiple services in the same development component (DC) in which you create the consumer application. These Service Groups are private for the consumer and therefore cannot be reused by other consumer applications. 2. Create a dependency from the BPM project to the Service Group project After you have created a Process Composer project called soa/bpm proceed to add a dependency to the Service Group project created in the previous step. This will allow the BPM project to have access to the Service Groups within the Service Group project; any new Service Groups defined within the BPM project can then be stored within the Service Group project. March 2010 4
  • 11. How To... Use SOA Configuration to call RFCs and Web Services from within SAP NetWeaver BPM For optimal re-use the suggested approach is to add the Service Group development component project to its own software component. 4.2 Import the process start Web service ... 1. Import the WSDL file into the Business Process This step assumes that you have access to the meta-data of an abstract asynchronous Web service. Refer to the appendix for the complete WSDL document; it consists of only input parameters that are made up of a header structure and a collection of items. To import the WSDL file expand the Service Interface folder > right click > select Import WSDL. You can import abstract WSDL documents from either the local file system, Enterprise Services Repository or the Services Registry. For more information on how to start BPM processes, visit http://help.sap.com/saphelp_nwce72/helpdata/en/62/a6d7ac03994e0796c6b949c8952547/frameset.htm 2. Create a Service Group A Service Group represents the provider from a consumer point of view. The tools of the SAP NetWeaver Developer Studio capture information about the provider systems and group the services, which can be invoked on the same provider system in the Service Groups. While running the WSDL import wizard you will be asked information about Service Groups. At this point you can either re-use or create a new Service Group. Service Groups will be mapped to specific back end systems so it makes sense to assign the Service Group an appropriate logical name. Proceed to create a new Service Group; in the example below we named the Service Group LOCALHOST_J2EE. Remember to select the previously created Service Group project, later on when you perform the SOA configuration tasks you will map this Service Group to a March 2010 5
  • 12. How To... Use SOA Configuration to call RFCs and Web Services from within SAP NetWeaver BPM specific back end provider system. In the case of the process start Web service the provider system will be the local BPM server. Notice the Service Interface Order_Si that will be used throughout this How-To Guide and is used for the Web service that starts the process. 3. Verify the Service Group within Service References The Service Reference entity represents the information about services consumed in a uniform way across consumer applications developed using different tools such a WebDynpro or Business Process Management. The system collects information about the port type (service endpoint interface) and authentication of the Web service under a single entity called service reference. For each service reference, you specify the authentication level with which the consumer application consumes the respective service. You can select one
  • We Need Your Support
    Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

    Thanks to everyone for your continued support.

    No, Thanks