how to enable web services reliable messaging (ws...

15
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2010 SAP AG 1 How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM Applies to: SAP NetWeaver Composition Environment 7.2 Summary This article provides guidelines on how to enable, configure and monitor Web Services Reliable Messaging (WS-RM), for web services or service endpoints, exposed by start or intermediate message events in a SAP NetWeaver BPM process model. Author: Susan Thomas Company: SAP Labs India Created on: 27 October 2010 Author Bio Susan Thomas joined SAP Labs India in 2001 and has garnered experience in different areas such as Visual Composer (VC) and Business Process Management (BPM). She had contributed to NetWeaver Composition Environment in various roles starting from being a developer to an architect. Since 2009, Susan has been contributing to Net Weaver CE BPM runtime development and currently provides support to CE BPM customers as part of development support and helps in NetWeaver CE adoption.

Upload: buiquynh

Post on 28-Apr-2018

233 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 1

How to Enable Web Services

Reliable Messaging (WS-RM) for

Service Endpoints in BPM

Applies to:

SAP NetWeaver Composition Environment 7.2

Summary

This article provides guidelines on how to enable, configure and monitor Web Services Reliable Messaging (WS-RM), for web services or service endpoints, exposed by start or intermediate message events in a SAP NetWeaver BPM process model.

Author: Susan Thomas

Company: SAP Labs India

Created on: 27 October 2010

Author Bio

Susan Thomas joined SAP Labs India in 2001 and has garnered experience in different areas such as Visual Composer (VC) and Business Process Management (BPM). She had contributed to NetWeaver Composition Environment in various roles starting from being a developer to an architect. Since 2009, Susan has been contributing to Net Weaver CE BPM runtime development and currently provides support to CE BPM customers as part of development support and helps in NetWeaver CE adoption.

Page 2: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 2

Table of Contents

Web Service Reliable Messaging and BPM ....................................................................................................... 3

Relevance of WS-RM ...................................................................................................................................... 3

Scenario .......................................................................................................................................................... 3

This is the overview of the message trigger used in the sample process ...................................................... 4

Steps to enable WS-RM for BPM Message Events ........................................................................................ 5

1. Edit the service interface ....................................................................................................................... 5

2. Add the UsingPolicy tag......................................................................................................................... 6

3. Add the policy definition ......................................................................................................................... 7

4. Apply Policy on the operation ................................................................................................................ 8

5. Re-import the WSDL, build and deploy the Process Composer DC. .................................................... 9

6. [Optional] Verify and customize the configuration ............................................................................... 10

7. Monitoring the messages..................................................................................................................... 11

Conclusion: ....................................................................................................................................................... 13

Related Content ................................................................................................................................................ 14

Copyright........................................................................................................................................................... 15

Page 3: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 3

Web Service Reliable Messaging and BPM

In SAP NetWeaver BPM Process Modelling, events are used to indicate a process start, end and a delay for a certain period or a wait in flow due to an external event. Events are also used to represent the interaction between different processes. Message triggers are used in BPM for modelling a start, an intermediate and end events. Message triggers can be configured to send synchronous or asynchronous messages.

Relevance of WS-RM

In case of asynchronous messages in BPM, the standard SOAP protocol used does not guarantee the delivery of all messages. The WS-RM protocol provides reliable delivery of asynchronous messages using the SOAP protocol. Reliable messaging, in general, enables a sequence of asynchronous messages sent from the consumer systems to be tracked by the provider system. If any of the messages do not arrive, the provider requests the missing message to be re-sent.

Benefits of enabling WS-RM in BPM: 1. Avoid losing messages due to runtime and / or technical errors. 2. Guarantees retry of the message delivery in case of failure after a configured interval. 3. Successful and failed messages remain in the message queue. 4. In case of failure after the stipulated retries, the messages can be resent manually. 5. Message payload is not lost in case of failure of delivery.

Scenario

You have modelled a service endpoint (message) in a BPM Process Composer DC based on a WSDL and intend to enable reliable messaging on the service endpoint and configure it as per your requirement.

The following sample process has a modelled message trigger configured for the start event.

Page 4: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 4

This is the overview of the message trigger used in the sample process

Page 5: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 5

Steps to enable WS-RM for BPM Message Events

1. Edit the service interface

In the Project Explorer, double click the .wsdl file to edit the service interface.

Page 6: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 6

2. Add the UsingPolicy tag

Add the following snippet in the WSDL definition section, if not already defined:

<ns1:UsingPolicy

xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/09/policy"

wsdl:required="true" />

Page 7: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 7

3. Add the policy definition

Add the following policy definition to the definition section where &PolicyId should be replaced with an unique identifier for the policy definition.

<ns2:Policy xmlns:ns2="http://schemas.xmlsoap.org/ws/2004/09/policy"

ns3:Id="&PolicyId" xmlns:ns3="http://docs.oasis-open.org/wss/2004/01/oasis-200401-

wss-wssecurity-utility-1.0.xsd">

<ns4:enableCommit xmlns:ns4="http://www.sap.com/NW05/soap/features/commit/">true

</ns4:enableCommit>

<ns5:enableWSRM

xmlns:ns5="http://www.sap.com/NW05/soap/features/wsrm/">true</ns5:enableWSRM>

<ns6:enableBlocking xmlns:ns6="http://www.sap.com/NW05/soap/features/blocking/">

false </ns6:enableBlocking>

<ns7:required xmlns:ns7="http://www.sap.com/NW05/soap/features/transaction/">

yes </ns7:required>

</ns2:Policy>

Page 8: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 8

4. Apply Policy on the operation

Apply the policy on the operation that defines your service endpoint in the portType definition section by adding a policy reference. Add the following policy reference where &PolicyId is the unique id defined in the previous step.

<ns6:PolicyReference xmlns:ns6="http://schemas.xmlsoap.org/ws/2004/09/policy"

URI="#&PolicyId" />

Page 9: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 9

5. Re-import the WSDL, build and deploy the Process Composer DC.

Use “Reimport” in the context menu to reimport the service interface.

Page 10: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 10

6. [Optional] Verify and customize the configuration

Verify the endpoints in the SAP AS JAVA’s Administration page by navigating to SOA Administration -> Application and Scenario Communication -> Single Service Administration

or http://<host>:<port>/nwa/ssadmin

Set the relevant options to configure WS-RM for the service definition in the messaging tab.

Note: The messaging tab shall be available only if WS-RM is successfully enabled for the service definition at design

time and deployed. In order to customize the service endpoint configuration, follow the instructions mentioned

here: Configuring Individual Web Services

Page 11: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 11

7. Monitoring the messages

WS-RM is now configured for your modelled service endpoint. SOA message monitoring in JAVA Application Server's NetWeaver Administrator (NWA) is used to search for Web service messages that were sent or received on your system as described below.

SOA Management Monitoring Message Monitoring

Page 12: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 12

In the “View Message Content” link, we can see the message and payload details. The resend button facilitates manual resending of message without losing the payload.

A sample message content with payload given below.

Page 13: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 13

Conclusion:

SAP BPM currently does not ensure reliable handling of message events. Though enabling WS-RM for message endpoints in BPM, especially to the start event, comes up with a performance overhead, it also adds reliability to the process management.

Note: There is currently no dedicated tool and validation functionality available to support the manual modification of

the WSDL files. Make sure to follow the given instructions with greatest care.

Using WS-RM has performance impact. The protocol requires additional database persistency and acknowledgments being exchanged between senders and receivers.

SAP Net Weaver BPM support WS-RM 1.0, not WS-RM 1.1. To set up communication with for example with SAP Net Weaver Process Integration, use the PI WS adapter version 7.10. In AS ABAP you can select the WS-RM version in transaction SOAMANAGER

WS-RM cannot be used for local transport in one physical system

Page 14: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 14

Related Content

Understanding Intermediate Events, Asynchronous Message Receipt and Correlation in NetWeaver BPM 7.20

Web Services Reliable Messaging

Configuring Web Services Reliable Messaging

Configuring Individual Web Services

Monitoring

BPM Troubleshooting Guide

Page 15: How to Enable Web Services Reliable Messaging (WS …a248.g.akamai.net/n/248/420835/962e054405bf486f0771e9d235cb90172c4...SAP COMMUNITY NETWORK SDN ... How to Enable Web Services Reliable

How to Enable Web Services Reliable Messaging (WS-RM) for Service Endpoints in BPM

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 15

Copyright

© Copyright 2011 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, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.

Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.

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.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, 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 other countries.

Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.

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.