Anda di halaman 1dari 9

Steps for XML Validation by Adapter Engine in PI 7.

1



SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

2009 SAP AG 1


Steps for XML Validation by Adapter Engine in PI 7.1
Applies to:
SAP PI 7.1, eSOA.
Summary
In this article I have shown the steps required to do XML Validation by an Adapter Engine.
.
Author: Hemant Negi
Company: HCL Technologies
Created on: 3 March 2009
Author Bio
Hemant Negi is currently working in PI 7.1 and is associated with HCL-AXON Ltd.
.

Steps for XML Validation by Adapter Engine in PI 7.1



SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

2009 SAP AG 2


Table of Contents

Applies to: ...................................................................................................................................... 1
Summary........................................................................................................................................ 1
Author Bio ...................................................................................................................................... 1
Introduction.................................................................................................................................... 3
Steps............................................................................................................................................ 4
Related Content............................................................................................................................. 8
Disclaimer and Liability Notice....................................................................................................... 9


























Steps for XML Validation by Adapter Engine in PI 7.1



SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

2009 SAP AG 3



Introduction

The XML Validation is the new feature of PI7.1. The XML payload is syntactically validated against the
schema for both Inbound and Outbound message.
The validation of incoming and outgoing PI message payload structure is done against saved Data type.
The schema documentation that make XML schema must be stored in File System of PI root .
The Syntax validation of the incoming message is done in Adapter Engine Level against the XML schema
stored in File System.
In Nut shell the Data type comes ESR the schema for validation are exported from ESR and save File
System of PI (XI) root.

In our implementation most of the interfaces were validated using Validation by Adapter.
The best part of using the Validation at Adapter engine is that it is adapter dependent .i.e. When the Sender
(user) sends the messages if the message does not match with the schema the synchronous response is
send to the sender this is also called Backward Error Handling

The below blog gives a Snap shot for an XSD for Validation by an Adapter Engine.



Payload Request
Request


Response
R
XML
Validati
on
File
System
S
Advance Adapter Engine
Integration Directory
Validation by
Adapter

S>SenderAdapter
R>ReceiverAdapter




Steps for XML Validation by Adapter Engine in PI 7.1



SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

2009 SAP AG 4


Steps

Step1
Export an XSD of the MESSAGE TYPE



The file is saved as VisaDetailsUpdateRequest.Zip in the folder, it is to be noted that the folder should be
accessible by the Remote server where we will hosting the xsd for validation.

Step 2)
Extraction of the Zip file in local folder, here two xsd file are extracted. As shown below.

Rename the Main Schema as VisaDetailsUpdateRequest.xsd. (same as Zip file name )






Steps for XML Validation by Adapter Engine in PI 7.1



SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

2009 SAP AG 5


Step 3)
Connect to the Remote Server where the file needs to host.
Log on to FTP File Server











Steps for XML Validation by Adapter Engine in PI 7.1



SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

2009 SAP AG 6




b) The Tree like Structure as shown below on RHS it is
<SAP installation directory>/<system id>/<instance number>/j2ee/cluster/server0/validation/schema/
Interface>




Expand the Schema folder in RHS. Select the relevant SCW and Interface Name.
<SAP installation directory>/<system id>/<instance number>/j2ee/cluster/server0/validation/schema/<GUID
of software component version to which Service Interface is assigned>/<Repository Namespace of
Service Interface>
It is to be noted that the folder where exported schema needs to be saved (i.e. RHS) the folder should be
like urn~VisaDetailsUpdateRequest



Steps for XML Validation by Adapter Engine in PI 7.1



SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

2009 SAP AG 7





Step 4)
Select the folder on LHS (this is folder where VisaDetailsUpdateRequest.xsd is lying) and double click on
the LHS VisaDetailsUpdateRequest.xsd . The xsd file is copied to the server.

Step 5)
Above all we should enable the Radio Button Validation by Adapter in Sender Agreement in Integration
Directory .







Steps for XML Validation by Adapter Engine in PI 7.1



SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

2009 SAP AG 8


Related Content
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b04bc560-e4e7-2a10-92ab-92dbf097aae1
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/406a97c4-748c-2a10-f2be-cb63c5b0a11f
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d06dff94-9913-2b10-6f82-9717d9f83df1





























Steps for XML Validation by Adapter Engine in PI 7.1



SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

2009 SAP AG 9


Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces
and therefore is not supported by SAP. Changes made based on this information are not supported and can
be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods
suggested in this document, and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content
of this technical article or code sample, including any liability resulting from incompatibility between the
content within this document and the materials and services offered by SAP. You agree that you will not
hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

Anda mungkin juga menyukai