OK .. found the problem ..

It is turnin out that the sequence of the schemaSource _IS_ important. If I change my code to say:

InputStream[] sources = {
this.getClass().getResourceAsStream( "/V5_5_0/schemas.xmlsoap.org.xml" )
this.getClass().getResourceAsStream( "/V5_5_0/REL-5-MM7-1-2.xsd" ),
};


... then things work as expected. ( e.g.: The parser no longer tries to obtain the SOAP schema from http://scheams.xmlsoap.org )

Can anyone else confirm this?


Jesus M. Salvo Jr. wrote:

Minor corrections:


Jesus M. Salvo Jr. wrote:

JAXP + Xerces 2.2.1

DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
docBuilderFactory.setNamespaceAware( true );
docBuilderFactory.setValidating( true );
docBuilderFactory.setAttribute( com.mig.mms.mm7.Constants.JAXP_SCHEMA_LANGUAGE, com.mig.mms.mm7.Constants.W3C_XML_SCHEMA );


That should have said:

docBuilderFactory.setAttribute( "http://java.sun.com/xml/jaxp/properties/schemaLanguage";, "http://www.w3.org/2001/XMLSchema"; );


InputStream[] sources = {
this.getClass().getResourceAsStream( "/V5_5_0/REL-5-MM7-1-2.xsd" ),
this.getClass().getResourceAsStream( "/V5_5_0/schemas.xmlsoap.org.xml" )
};
docBuilderFactory.setAttribute( com.mig.mms.mm7.Constants.JAXP_SCHEMA_SOURCE, sources );


... and that one should have said:

docBuilderFactory.setAttribute( "http://java.sun.com/xml/jaxp/properties/schemaSource";, sources );




Using the above code, Xerces loaded the first schema source REL-5-MM7-1-2.xsd from the InputStream that I indicated above ok ... but it did not use the SOAP schema file schemas.xmlsoap.org.xml that I indicated above.

Instead, I can see TCP SYNs to schemas.xmlsoap.org ... trying to get the schema definition from that webserver.

Why doesn't Xerces 2.2.1 use the one that I have?








--
Jesus M. Salvo Jr.
Mobile Internet Group Pty Ltd
(formerly Softgame International Pty Ltd)
M: +61 409 126699
T: +61 2 94604777
F: +61 2 94603677

PGP Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC0BA5348



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to