cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Mapping Exceptions to Sender(SOAP UI tool)

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184681
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

former_member184681
Active Contributor
0 Kudos

This is exactly what Schema Validation does, assuming that you set minLength = 31 and maxLength = 31 in the data type.

Regards,

Greg

baskar_gopalakrishnan2
Active Contributor
0 Kudos

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.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d026d253-3108-2c10-69a0-a5460fc1f...

http://www.riyaz.net/sap/pi-71-xml-validation-in-integration-engine/525/

Former Member
0 Kudos

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.

     I followed http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d06dff94-9913-2b10-6f82-9717d9f83...

but without success.

Please help.

Regards,

Gopi