### Eclipse Workspace Patch 1.0 #P org.eclipse.wst.wsdl.validation Index: src/org/eclipse/wst/wsdl/validation/internal/wsdl11/xsd/InlineSchemaValidator.java =================================================================== RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.wst.wsdl.validation/src/org/eclipse/wst/wsdl/validation/internal/wsdl11/xsd/InlineSchemaValidator.java,v retrieving revision 1.5 diff -u -r1.5 InlineSchemaValidator.java --- src/org/eclipse/wst/wsdl/validation/internal/wsdl11/xsd/InlineSchemaValidator.java 2 May 2006 17:38:23 -0000 1.5 +++ src/org/eclipse/wst/wsdl/validation/internal/wsdl11/xsd/InlineSchemaValidator.java 2 Dec 2007 16:22:58 -0000 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * David Carver - Standards for Technology in Automotive Retail - bug 204488 *******************************************************************************/ package org.eclipse.wst.wsdl.validation.internal.wsdl11.xsd; @@ -51,6 +52,7 @@ private final String _WARN_SOAPENC_IMPORTED_SCHEMA = "_WARN_SOAPENC_IMPORTED_SCHEMA"; private final String EMPTY_STRING = ""; private final String QUOTE = "'"; + protected boolean fullSchemaConformance = true; MessageGenerator messagegenerator = null; public InlineSchemaValidator() @@ -60,7 +62,22 @@ { USE_WSDL_TARGETNAMESPACE = true; } + fullSchemaConformance = true; } + + public InlineSchemaValidator(boolean schemaFullConformance) + { + String useNS = System.getProperty("use.wsdl.targetnamespace"); + if(useNS != null && useNS.equals("true")) + { + USE_WSDL_TARGETNAMESPACE = true; + } + fullSchemaConformance = schemaFullConformance; + } + + + + /** * @see org.eclipse.wst.wsdl.validation.internal.wsdl11.IWSDL11Validator#validate(java.lang.Object, java.util.List, org.eclipse.wsdl.validate.wsdl11.WSDL11ValidationInfo) */ @@ -96,7 +113,7 @@ } // now create and call the validator for the inline schema - XSDValidator schemav = new XSDValidator(); + XSDValidator schemav = new XSDValidator(fullSchemaConformance); //String fileLocation = new URL(validatormanager.getFilename()).getPath(); InlineXSDResolver inlineEntityResolver = Index: src/org/eclipse/wst/wsdl/validation/internal/wsdl11/xsd/XSDValidator.java =================================================================== RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.wst.wsdl.validation/src/org/eclipse/wst/wsdl/validation/internal/wsdl11/xsd/XSDValidator.java,v retrieving revision 1.5 diff -u -r1.5 XSDValidator.java --- src/org/eclipse/wst/wsdl/validation/internal/wsdl11/xsd/XSDValidator.java 2 May 2007 20:34:37 -0000 1.5 +++ src/org/eclipse/wst/wsdl/validation/internal/wsdl11/xsd/XSDValidator.java 2 Dec 2007 16:22:59 -0000 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * David Carver - Standards for Technology in Automotive Retail - bug 204488 *******************************************************************************/ package org.eclipse.wst.wsdl.validation.internal.wsdl11.xsd; @@ -52,6 +53,7 @@ protected boolean isValidXSD; protected List errors; protected String filelocation; + protected boolean fullSchemaValidation; /** * Constructor. @@ -61,7 +63,21 @@ xsModel = null; isValidXSD = false; errors = null; + fullSchemaValidation = true; } + + /** + * Specifies whether the XSDValidator is configured for full schema conformance. + * @param schemaFullConformance + */ + public XSDValidator(boolean schemaFullConformance) + { + xsModel = null; + isValidXSD = false; + errors = null; + fullSchemaValidation = schemaFullConformance; + } + /** * Validate an inline schema. * @@ -133,7 +149,7 @@ grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.NAMESPACE_PREFIXES_FEATURE, true); grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.VALIDATION_FEATURE, true); grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_VALIDATION_FEATURE, true); - grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING, false); + grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING, fullSchemaValidation); grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE, true); grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE, true); grammarPreparser.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_DUPLICATE_ATTDEF_FEATURE, true);