cancel
Showing results for 
Search instead for 
Did you mean: 

Incoming XML validation in UDF

mayur_patel6
Participant
0 Kudos

Hello Expert,

I am trying to do a simple XML structure validation in my User Defined Library. All I need to check is if the XML structure is valid if it is not then I have to throw a custom error message in my logs. I know that PI within itself does the validation but I am not sure how to catch that exception and write in the my choice of Location and/or Category.

Thanks for your help.

Thanks,

Mayur

Accepted Solutions (0)

Answers (2)

Answers (2)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Patel,

You need to write some big code to validate XML,in UDF u can genarates logs my urself,we can rise exceptions.

But if you want genarate own logs and place it in to other place(FTP not in XI) I think its not possible.

one of my requirement i tried to genarate logs for catching all message mapping exceptions in to one text file place it in to Clinet Ftp server,but i am unable to do that one.i tried different ways.

Better approach is Java Mapping.

Regards,

Raj

Former Member
0 Kudos

You can have a look at the below blogs

/people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping

/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping

/people/valery.silaev/blog/2007/05/15/fast-return-with-java-exceptions

/people/udi.dahan/blog/2007/03/27/errors-exceptions-and-asynchronous-web-services

There are other blogs/articles too on SDN

Just search for them

Thanks

Aamir

mayur_patel6
Participant
0 Kudos

Hi Aamir,

I did find couple of them when I was doing my searching. But, I am not too sure if they would help me. I am trying to avoid creating a Java file and import it as a jar in ESR. I was hoping if there is a simple way of catching any parser exception right from an ESR User Defined Function.

Thanks,

Mayur