cancel
Showing results for 
Search instead for 
Did you mean: 

Impoarted Archive File read

Former Member
0 Kudos

Dear All

Can we read a file(xsd schema etc) kept in imported archive using a Java mapping program which is kept in the same zipped folder.

This is required as we need to do xsd validations of the incoming message.

Thanks

Sourabh

Accepted Solutions (1)

Accepted Solutions (1)

former_member181985
Active Contributor
0 Kudos

Check this link: [http://www.theserverside.com/discussions/thread.tss?thread_id=31925]

URL myURL = this.getClass().getClassLoader().getResource("YourXML.xml");

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

Its best to keep it in the IA itself.

former_member181985
Active Contributor
0 Kudos

Not sure. Give a try.

You can also put the schema file in the JRE directory in the PI Server (as we can access JAVA_HOME directory dynamically). No hardcoding for file path.