on 05-30-2012 12:51 PM
Hi guys,
I have a Synchronous Scenario(Webservice to Oracle Database) where I need to validate Sender XML message. In my scenario the Sender is passing the RequestId which is 31 character field. If the RequestId is not proper I have to raise the exception and pass it to sender that the Entered value is not Valid.
To achieve this I am doing the validation at Message Mapping Level using UDF(User Define Function). I able to raise the Exception using UDF and I can see it in SXMB_MONI.
But clients requirement is that they want the Error Message.
How can we pass the Exception from SAP PI to Sender(SOAP UI tool).
Regards,
Gopi
Hi Gopi,
Instead of looking for workarounds, use the standard PI's functionalities for that purpose. In the data type for your sender message, set the max length attribute for the given field (unless this is already done). Then, in the Sender Agreement for your scenario, set "Schema Validation" to "Validation by Adapter". This will make PI automatically check the message payload and report error in case of discrepancies. Read more about schema validation here:
http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ce4bd3a0d7154ee10000000a421937/content.htm
http://help.sap.com/saphelp_nwpi711/helpdata/en/44/0bf1b3ec732d2fe10000000a11466f/frameset.htm
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Greg,
Thanks for your reply it was very helpful.
But I have Specific requirement where I need to do validation at Message Mapping and raise exception if the RequestID value is not of 31 character and to pass on this error message to sender. Could you please help me to resolve this issue.
Regards,
Gopi
currently if field size value is more than 31 chars then set minlength = 31 and max as per the requirement. The below link will be helpful for setting.
http://www.riyaz.net/sap/pi-71-xml-validation-in-integration-engine/525/
Hi Greg/Baskar,
I followed all the steps for XML Validation using Adapter Engine but I am unable to do the Validation. My XML gets processed but it doesn't give any error in SXMB_MONI.
but without success.
Please help.
Regards,
Gopi
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.