Author: dims
Date: Tue Aug 29 09:45:02 2006
New Revision: 438112
URL: http://svn.apache.org/viewvc?rev=438112&view=rev
Log:
throw exception if someone is trying to load old style schemas.
Modified:
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
Modified:
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java?rev=438112&r1=438111&r2=438112&view=diff
==============================================================================
---
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
(original)
+++
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
Tue Aug 29 09:45:02 2006
@@ -122,7 +122,12 @@
* handleAnnotation
*/
- for (Element el = XDOMUtil.getFirstChildElementNS(schemaEl,
XmlSchema.SCHEMA_NS); el != null;
+ Element el = XDOMUtil.getFirstChildElementNS(schemaEl,
XmlSchema.SCHEMA_NS);
+ if (el == null && XDOMUtil.getFirstChildElementNS(schemaEl,
"http://www.w3.org/1999/XMLSchema") != null) {
+ throw new XmlSchemaException("Schema defined using
\"http://www.w3.org/1999/XMLSchema\" is not supported. " +
+ "Please update the schema to the \"" + XmlSchema.SCHEMA_NS
+ "\" namespace");
+ }
+ for (; el != null;
el = XDOMUtil.getNextSiblingElementNS(el, XmlSchema.SCHEMA_NS)) {
// String elPrefix = el.getPrefix() == null ? "" : el.getPrefix();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]