PI 7.1: XML Validation in Integration Engine
In PI 7.1 validation functionality is available, so now with the help of PI 7.1 we can validate our incoming and outgoing messages in IE as well as in AAE corresponding to their structure i.e. XSD or DTD. This article describes XML Validation in the IE. In my next article, I will demonstrate how we can validate XML messages and message header in AAE.
There are couple of presentations on SDN, that’s tell about validation functionality in PI 7.1, but this article is posted in order to demonstrate the steps which are required to achieve it practically.
When we talk about XML validation in IE, then our incoming messages are validated corresponding to their schemas that are stored in File system. In PI 7.1 new Pipeline steps are introduced (“XML Validation Inbound Channel Request” and “XML Validation Outbound Channel Request”) to achieve validation.

If validation fails (Inbound side or Outbound side), then message processing will be stopped. Example, if we validate our incoming messages in IE and if invalid XML entered in IE then processing will fails in second step i.e XML Validation Inbound Channel Request”. In previous versions these messages fails in “Request Messaging Mapping” step.
So if validation fails in IE, Error description will be visible in MONI. It gives detailed error description and all structure errors information’s.
Important: If validation performed in IE, then sender will not get information about the failed structures. Administrator will look on these messages and can take further actions. In case of validation in AAE, adapter can send the error message to the sender.
“Fault Messages, Receipt Acknowledgement, Exceptions are not validated”.
Following steps demonstrate how we achieve the incoming XML validation in IE.
1. Design your objects in the ESR.

2. Configure your objects in the ID.

3. Required to validate incoming messages by IE, so check the option “Validation by Integration Engine” in Sender Agreement.

4. Create appropriate directory structure where we have to save our structure (xsd).
\usr\sap\<system id>\SYS\global\xi\runtime_server\<A>\<B>\<C>\<D>\<E>\<F>
A - validation
B - schema
C - GUID of the SWCV where service interface reside.
D - Repository Namespace where Service Interface is created.
E - Service Interface Name
F - Repository Namespace where Message Type or External Definition is assigned.
Note: if your ESR namespace contains special character then do replace it with “~” in folder name.
If namespace is http://farooq.com/XI/FileToFile then folder name should be
http~farooq.com~XI~FileToFile
Export schema from the ESR and save it in folder “F” with name <<RootElementOfMessageType>>.xsd. So in this case it is MT_File_Sender.xsd

5. Testing of the Scenario.
In this example, all designed values for source MT are mandatory. What happen if ZIP tag is missing in sender message or payload.

In XML document ZIP is missing

Message fail in IE and message processing stopped. The Error description is appropriate for the administrators.

Similarly we can validate outgoing messages in IE by selecting an option “Validation by Integration Engine” in Receiver Agreement.
Farooq Farooqui is an SAP NetWeaver PI Consultant with Cognizant, India. He holds SAP PI Certification and has previously worked with majors like Accenture and Atos Origin.



Harish says:
March 29th, 2009 at 8:18 am
Excellent article.. Keep posting,,,
Chakrapani says:
April 4th, 2009 at 8:38 pm
Hi there
I have recently installed and configured PI 7.1
I have creaated a software component in SLD.When i go to,Enterprise service Builder,i dont see any option to import a software component from SLD,which i used to do in both XI 3.0 and PI 7.0
I would really appreciate if you could help me ASAP.
Thanks in advance.
Phani says:
April 7th, 2009 at 3:57 pm
Hi,
in Enterprise service Builder click on Create object button -> in that you can find WorkAreas expand that WorkArea… there you can find option software commponent verion………there you can find the option import from SLD.
If you still cant find then reply back.
Regards,
Phani
Chakrapani says:
April 7th, 2009 at 9:29 pm
Hi phani
thank u so much for your prompt reply.
I m having several issues with PI 7.1
I would appreciate if you could give me your email id,so that i can send you all my problems.
thanku so much for your kind help
Phani says:
April 8th, 2009 at 5:29 pm
Hi,
my id phani2084@gmail.com