Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 84271 Details for
Bug 204488
[validation] Re-use the XSD validator for inline schema validation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Updated Patch to set default value for conformance and new optional constructors for XSDValidator
wsdlxsdpatch2.patch (text/plain), 4.65 KB, created by
David Carver
on 2007-12-02 11:33:55 EST
(
hide
)
Description:
Updated Patch to set default value for conformance and new optional constructors for XSDValidator
Filename:
MIME Type:
Creator:
David Carver
Created:
2007-12-02 11:33:55 EST
Size:
4.65 KB
patch
obsolete
>### 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);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 204488
:
84262
| 84271