cancel
Showing results for 
Search instead for 
Did you mean: 

JAVA Mapping Schema Validation

Former Member
0 Kudos

Hi everybody,

we use :

http://help.sap.com/saphelp_nw04/helpdata/en/c4/e1343e8c7f6329e10000000a114084/frameset.htm

for schema-validation.

saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", "./xsd_example/xsd/example.xsd");

We have doubts if the XSD could be resided in the imported archives?

We get the error:

Caused by: com.sap.engine.lib.xml.util.NestedException: [location : null] ERROR : "./xsd_example/xsd/example.xsd (No such file or directory)

Any ideas?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi, we got it:

saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", this.getClass().getClassLoader()

.getResourceAsStream("Myxsd.xsd"));

former_member181985
Active Contributor
0 Kudos

Hi,

Yes it is possible.

Use Packaging of your objects for Java Class files and this XSD.

And you can call this XSD within java program by giving exact path to the XSD in that package.

Thanks,

Gujjeti

Edited by: Praveen Gujjeti on Apr 16, 2008 11:16 AM