Skip to Content
avatar image
Former Member

JAVA Mapping Schema Validation

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 16, 2008 at 09:14 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 16, 2008 at 09:41 AM

    Hi, we got it:

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

    .getResourceAsStream("Myxsd.xsd"));

    Add comment
    10|10000 characters needed characters exceeded