Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos

Introduction

XML Validation is one of the new capabilities in SAP NetWeaver Process Integration 7.1. Many XML based industry standards like Rosettanet, CIDX, PIDX, etc. have specified the requirement to validate XML messages at various stages of message processing. This feature is highly demanded by customers and hence has been delivered as a major capability with SAP NetWeaver Process Integration 7.1.

XML validation allows you to check the structure of a PI message payload. You can validate the payload of both inbound and outbound messages. The structure check is performed using saved data types (XSD or DTD's). This feature can be used for both A2A and B2B integration.

Overview

image

All inbound and outbound messages are validated against the data types (XSD or DTD’s) in the Enterprise Services Repository. To validate the structure of a PI message payload, you should export the schemas from the ESR and save them in the file system of PI.

When processing a PI message, the structure check can be performed at the sender adapter or at the Integration Engine. You activate the validation in the collaboration agreement. Incoming messages can be validated either at the sender adapter or the Integration Engine. However, outgoing messages can only be validated at the Integration Engine.

Validation in the Sender Adapter

When an inbound message enters the sender adapter, the adapter converts this message into a PI message. The payload of this message can be validated against the configured schema, which is stored in the file system. If the structure of the payload differs from the definition of the data type provided for comparison, message processing is stopped.

When validation fails, the adapter sends a (synchronous or asynchronous) response to the sender of the message, informing it about the structure error. This is referred to as Backward-error handling. The industry-specific adapters inform the sender asynchronously, as required by the RNIF protocol and the CIDX protocol. Only the sender adapter supports backward error handling.

All sender adapters (including non-SAP adapters) can perform XML validation.

Validation in the Integration Engine

In inbound and outbound processing, validation of the PI message payload takes place as a pipeline step of the Integration Engine. If the structure of the message payload does not match the saved definition of the data type, an error description is generated. The error description contains status information and a list of all structure errors. In this case, message processing is stopped. The message is set to error status and an error report is saved.

The Integration Engine supports Forward-Error handling. In forward error handling, the sender of the message is not automatically informed of the structure error. The message is set to error status and an administrator can process the message further using the Runtime Workbench. The administrator can resend the message by correcting the payload or skip the validation step.

Configuration

 

You define whether and where the validation of the PI message payload takes place in the respective collaboration agreement. In a sender agreement, you can choose between validation in the sender adapter or the Integration Engine. If validation takes place in the adapter, a response is sent to the sender when an error occurs.

In the receiver agreement, you can configure the validation in the Integration Engine. If validation takes place in the Integration Engine, the message is set to error status and can be processed by the administrator in the Runtime Workbench in the case of an error.

Administration

Monitoring and administration takes place in message monitoring of the Runtime Workbench or the NetWeaver Administrator and in the Integration Engine.

The messages that have an error status following validation can be processed further by an administrator in the Runtime Workbench. The administrator can resend messages and skip the validation step.

8 Comments