on 10-15-2012 4:16 PM
Hello All,
I am planning to use XML validation in PI7.31 (PO), but i am having a doubt related to error handling. Suppose PO picks the XML file from FTP server,and if the xsd validation fails at AEX then what will sender FTP will receive? I have read that sender will recieve a synchronous reponse but in which format?
Please help.
Regards
Vasant
Hope this information help you to understand how XML Validation works:
During runtime, the target adapter translates an inbound message into the required XI message. The range of adapter functions allows the system to compare the payload to a configured schema. The adapter calls a central component for syntax validation, which calls an XML schema validation engine.
Even when the Integration Engine checks the XML structure, the data types come from the Enterprise Services Repository. They must be exported by the ESR and copied into the file system. For the inbound and outbound processing of messages, XML validation is a new step in the pipeline. Whenever the structure of a message does not fit the stored schema, the Integration Engine creates an error description containing status information and a list of all structure errors. The error report is
saved. The message is given an error status. The sender is not automatically notified when a message is validated in the Integration Server. The Integration Server makes the message persistent and can trigger an alert. An administrator can continue to process the message using the Runtime Workbench and can restart the process, if necessary.
The message payload is not semantically checked in either of these procedures In a sender agreement, you can choose between validation in the sender adapter or validation in the Integration Engine. When validation takes place in the adapter, a synchronous response is sent to the sender in the event of an error.
To configure the XML validation Proceed as follows:
1. For XML validation, you must save the required schemas from the Enterprise Services Repository in the file system by creating the following directory structure.
Create the following directory for validation on the Integration Server in the <sysdir> /xi/runtime_server directory. /validation/schema/<GUID
for the software component version, to which the service interface is assigned>/<Repository namespace of the service interface>
Create the following directory for validation on the central and decentralized Adapter Engine in the <SAP Installation directory>/<System ID>/<Instance number>//j2ee/cluster/server0 directory for non-cluster installation of AS Java: /validation/schema/<GUID of the software component version, to which the service interface is assigned>/<Repository namespace of the service interface>.
Best Regards
Rodrigo P-.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rodrigo,
I am able to get my xml validation work, but i want to check the feasibility of below lines from SAP HELP:
If the structure of the payload differs from the definition of the data type provided for comparison, message processing is stopped. The adapter sends a synchronous response to the sender of the message
How this sync response will work??
Regards!!
the response is an automatic response which is send to the sender system notifing about the error in the schema and the segment/field where the schema is wrong. you cannot change or edit it.
also rememben that en in case of AAE the system does not persist the message,it trigger an alert. however in the schema validation take place in the Integration engine the message is persisted and no alert is trigger (unless you configure it)
Rgds
Rodrigo P-.
Vasant,
take a look to this link y think it could clarify your doubts
http://help.sap.com/saphelp_nwpi711/helpdata/en/44/0bf1b3ec732d2fe10000000a11466f/content.htm
Best Regards
Hi Vasant,
You really want to use this feature, i had some performance issues while implementing the same in PI 7.1 , but tsome improvements made in PI 7.3 but not sure about performance.
If you are using validtaion at Adapter Engine level then you will see error at adapter level because the validation works at sender agreement level and the error descript visible at adapter monitoring.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I will be using ICO, so planning to do the validation at adapter level but i have read that the sender will receive a synchronous response if validation fails but now sure what kind of response and how?
Suppose if i dont do the XML validation, then i have to do the validation while doing mapping and if something is invalid (like a string is more than 2 character long, date is not valid date etc) then i have to create an error file with that invalid record only and process rest of the records? Do you think its a good option?
Regards!!
XML Validation might cause some performance issues. As Raja pointed out, I do have some interfaces in PI 7.1 and they cause some performance issues. You can use java mapping and validate all the fields and you can construct error file for the invalid fields and rest could be constructed as output of target message and send it. There is no problem with it. It is another feasible approach.
Hi Vasant,
I love the option of validating the records at UDF level.You can pass the records to target only if they satisfy the conditions of validation else suppress the values.You can check this discussion on this http://scn.sap.com/thread/3239062 .
Regards
Anupam
Hi,
But i dont want to suppress the records, infact i have to create an error file with all the invalid records. So suppose, there will be 100 records and out of them 5 are invalid, so i have to create an error file with 5 invalid records and rest all needs to be passed (i will opt this method, if i dont use xml validation).
I am planning to use multimapping concept to achieve this??
Regards!!
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.