Removed WSDLConfigurator.
Added WSDL 1.1 and extension validator registry methods to the WSDL validator.
Removed dependency on runtime.compatibility.
diff --git a/bundles/org.eclipse.wst.wsdl.validation/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.wsdl.validation/META-INF/MANIFEST.MF
index 1d4bb2a..6ea3d83 100644
--- a/bundles/org.eclipse.wst.wsdl.validation/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.wsdl.validation/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@
Bundle-Version: 1.0.0
Bundle-ClassPath: wsdlvalidateui.jar,
wsdlvalidate.jar
-Bundle-Activator: org.eclipse.core.internal.compatibility.PluginActivator
+Bundle-Activator: org.eclipse.wst.wsdl.validation.internal.ui.eclipse.ValidateWSDLPlugin
Bundle-Vendor: %_PROVIDER_NAME
Bundle-Localization: plugin
Export-Package: .,
@@ -27,11 +27,11 @@
Require-Bundle: org.eclipse.core.resources,
org.eclipse.ui,
org.apache.ant,
- org.eclipse.core.runtime.compatibility,
org.eclipse.wst.common.uriresolver,
org.eclipse.wst.validation,
org.eclipse.wst.xml.validation;visibility:=reexport,
org.wsdl4j,
- org.apache.xerces;visibility:=reexport
+ org.apache.xerces;visibility:=reexport,
+ org.eclipse.core.runtime
Eclipse-AutoStart: true
Plugin-Class: org.eclipse.wst.wsdl.validation.internal.ui.eclipse.ValidateWSDLPlugin
diff --git a/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidate/org/eclipse/wst/wsdl/validation/internal/WSDLValidator.java b/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidate/org/eclipse/wst/wsdl/validation/internal/WSDLValidator.java
index ada6e52..2531707 100644
--- a/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidate/org/eclipse/wst/wsdl/validation/internal/WSDLValidator.java
+++ b/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidate/org/eclipse/wst/wsdl/validation/internal/WSDLValidator.java
@@ -17,6 +17,15 @@
import org.eclipse.wst.wsdl.validation.internal.resolver.IURIResolver;
import org.eclipse.wst.wsdl.validation.internal.resolver.URIResolver;
+import org.eclipse.wst.wsdl.validation.internal.wsdl11.WSDL11BasicValidator;
+import org.eclipse.wst.wsdl.validation.internal.wsdl11.WSDL11ValidatorController;
+import org.eclipse.wst.wsdl.validation.internal.wsdl11.WSDL11ValidatorDelegate;
+import org.eclipse.wst.wsdl.validation.internal.wsdl11.http.HTTPValidator;
+import org.eclipse.wst.wsdl.validation.internal.wsdl11.mime.MIMEValidator;
+import org.eclipse.wst.wsdl.validation.internal.wsdl11.soap.SOAPValidator;
+import org.eclipse.wst.wsdl.validation.internal.wsdl11.xsd.InlineSchemaValidator;
+
+import com.ibm.wsdl.Constants;
/**
* An main WSDL validator class. The WSDL validator validates WSDL documents.
@@ -24,6 +33,9 @@
public class WSDLValidator
{
private static String VALIDATOR_RESOURCE_BUNDLE = "validatewsdl";
+ private static String VALIDATOR_HTTP_RESOURCE_BUNDLE = "validatewsdlhttp";
+ private static String VALIDATOR_SOAP_RESOURCE_BUNDLE = "validatewsdlsoap";
+ private static String VALIDATOR_MIME_RESOURCE_BUNDLE = "validatewsdlmime";
private ValidationController validationController;
private URIResolver uriResolver;
private Hashtable attributes = new Hashtable();
@@ -36,6 +48,26 @@
ResourceBundle rb = ResourceBundle.getBundle(VALIDATOR_RESOURCE_BUNDLE);
uriResolver = new URIResolver();
validationController = new ValidationController(rb, uriResolver);
+
+ //Register the default validators.
+ ValidatorRegistry registry = ValidatorRegistry.getInstance();
+ // Register the WSDL 1.1 validator controller and validators.
+ WSDLValidatorDelegate delegate = new WSDLValidatorDelegate(WSDL11ValidatorController.class.getName(), VALIDATOR_RESOURCE_BUNDLE, getClass().getClassLoader());
+ registry.registerValidator(Constants.NS_URI_WSDL, delegate, ValidatorRegistry.WSDL_VALIDATOR);
+ WSDL11ValidatorDelegate delegate1 = new WSDL11ValidatorDelegate(WSDL11BasicValidator.class.getName(), VALIDATOR_RESOURCE_BUNDLE, getClass().getClassLoader());
+
+ delegate1 = new WSDL11ValidatorDelegate(HTTPValidator.class.getName(), VALIDATOR_HTTP_RESOURCE_BUNDLE, getClass().getClassLoader());
+ registerWSDL11Validator(org.eclipse.wst.wsdl.validation.internal.Constants.NS_HTTP, delegate1);
+ delegate1 = new WSDL11ValidatorDelegate(SOAPValidator.class.getName(), VALIDATOR_SOAP_RESOURCE_BUNDLE, getClass().getClassLoader());
+ registerWSDL11Validator(org.eclipse.wst.wsdl.validation.internal.Constants.NS_SOAP11, delegate1);
+ delegate1 = new WSDL11ValidatorDelegate(MIMEValidator.class.getName(), VALIDATOR_MIME_RESOURCE_BUNDLE, getClass().getClassLoader());
+ registerWSDL11Validator(org.eclipse.wst.wsdl.validation.internal.Constants.NS_MIME, delegate1);
+
+ // The WSDL 1.1 schema validator is a special case as it is registered for three namespaces.
+ delegate1 = new WSDL11ValidatorDelegate(InlineSchemaValidator.class.getName(), VALIDATOR_RESOURCE_BUNDLE, getClass().getClassLoader());
+ registerWSDL11Validator(Constants.NS_URI_XSD_1999, delegate1);
+ registerWSDL11Validator(Constants.NS_URI_XSD_2000, delegate1);
+ registerWSDL11Validator(Constants.NS_URI_XSD_2001, delegate1);
}
/**
@@ -61,7 +93,7 @@
if(uri == null)
return null;
validationController.setAttributes(attributes);
- return validationController.validate(formatURI(uri), inputStream);
+ return validationController.validate(uri, inputStream);
}
/**
@@ -89,18 +121,26 @@
{
attributes.put(name, value);
}
- protected String formatURI(String uri)
+
+ /**
+ * Register an extension WSDL validator delegate with this validator.
+ *
+ * @param namespace The namespace the validator validates for. This is the WSDL namespace.
+ * @param delegate The delegate that holds the validator.
+ */
+ public void registerWSDLExtensionValidator(String namespace, WSDLValidatorDelegate delegate)
{
- uri = uri.replace('\\','/');
- if(uri.startsWith("file:"))
- {
- uri = uri.substring(6);
- while(uri.startsWith("\\") || uri.startsWith("/"))
- {
- uri = uri.substring(1);
- }
- uri = "file:///" + uri;
- }
- return uri;
+ ValidatorRegistry.getInstance().registerValidator(namespace, delegate, ValidatorRegistry.EXT_VALIDATOR);
+ }
+
+ /**
+ * Register a WSDL 1.1 validator delegate with this validator.
+ *
+ * @param namespace The namespace the validator validates for.
+ * @param delegate The delegate that holds the validator.
+ */
+ public void registerWSDL11Validator(String namespace, WSDL11ValidatorDelegate delegate)
+ {
+ org.eclipse.wst.wsdl.validation.internal.wsdl11.ValidatorRegistry.getInstance().registerValidator(namespace, delegate);
}
}
diff --git a/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/WSDLConfigurator.java b/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/WSDLConfigurator.java
deleted file mode 100644
index 2a8ec23..0000000
--- a/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/WSDLConfigurator.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.wst.wsdl.validation.internal.ui;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.wst.wsdl.validation.internal.ValidatorRegistry;
-import org.eclipse.wst.wsdl.validation.internal.WSDLValidatorDelegate;
-import org.eclipse.wst.wsdl.validation.internal.wsdl11.WSDL11ValidatorDelegate;
-import org.eclipse.wst.wsdl.validation.internal.wsdl20.WSDL20ValidatorDelegate;
-
-import com.ibm.wsdl.Constants;
-
-/**
- * A class with methods to set validators and schemas that can be used
- * by all interfaces to the validator.
- */
-public class WSDLConfigurator
-{
- /**
- * Register a WSDL validator with the given namespace.
- *
- * @param namespace The namespace of the validator.
- * @param validatorClassname The name of the validator class to register.
- * @param resourceBundle The name of the validator base resource bundle.
- * @param classloader The classloader to use to load the validator.
- */
- public static void registerWSDLValidator(String namespace, String validatorClassname, String resourceBundle, ClassLoader classloader)
- {
- WSDLValidatorDelegate delegate = new WSDLValidatorDelegate(validatorClassname, resourceBundle, classloader);
- ValidatorRegistry.getInstance().registerValidator(namespace, delegate, ValidatorRegistry.WSDL_VALIDATOR);
- }
-
- /**
- * Register an extension validator with the given namespace.
- *
- * @param namespace The namespace of the validator.
- * @param validatorClassname The name of the validator class to register.
- * @param resourceBundle The name of the validator base resource bundle.
- * @param classloader The classloader to use to load the validator.
- */
- public static void registerExtensionValidator(String namespace, String validatorClassname, String resourceBundle, ClassLoader classloader)
- {
- WSDLValidatorDelegate delegate = new WSDLValidatorDelegate(validatorClassname, resourceBundle, classloader);
- ValidatorRegistry.getInstance().registerValidator(namespace, delegate, ValidatorRegistry.EXT_VALIDATOR);
- }
-
- /**
- * Register a WSDL 1.1 validator with the given namespace.
- *
- * @param namespace The namespace of the validator
- * @param validatorClassname The name of the validator class to register
- * @param resourceBundle The name of the validator base resource bundle.
- * @param classloader The classloader to use to load the validator.
- */
- public static void registerWSDL11Validator(String namespace, String validatorClassname, String resourceBundle, ClassLoader classloader)
- {
- WSDL11ValidatorDelegate delegate = new WSDL11ValidatorDelegate(validatorClassname, resourceBundle, classloader);
- org.eclipse.wst.wsdl.validation.internal.wsdl11.ValidatorRegistry.getInstance().registerValidator(namespace, delegate);
- }
-
- /**
- * Register a WSDL 2.0 validator with the given namespace.
- *
- * @param namespace The namespace of the validator
- * @param validatorClassname The name of the validator class to register
- * @param resourceBundle The name of the validator base resource bundle.
- */
- public static void registerWSDL20Validator(String namespace, String validatorClassname, String resourceBundle)
- {
- WSDL20ValidatorDelegate delegate = new WSDL20ValidatorDelegate(validatorClassname, resourceBundle);
- org.eclipse.wst.wsdl.validation.internal.wsdl20.ValidatorRegistry.getInstance().registerValidator(namespace, delegate);
- }
-
- /**
- * Register the default validators. Registers validators for:
- * WSDL 1.1
- * WSDL 1.1 SOAP
- * WSDL 1.1 HTTP
- * WSDL 1.1 MIME
- *
- * @param rb - the resource bundle of the WSDL 1.1 validator
- */
- public static void registerDefaultValidators(ResourceBundle rb)
- {
- // Register the WSDL 1.1 validator controller and validators.
- registerWSDLValidator(Constants.NS_URI_WSDL, "org.eclipse.wst.wsdl.validation.internal.wsdl11.WSDL11ValidatorController", "validatewsdl", null);
- registerWSDL11Validator(Constants.NS_URI_WSDL, "org.eclipse.wst.wsdl.validation.internal.wsdl11.WSDL11BasicValidator", "validatewsdl", null);
- registerWSDL11Validator(
- org.eclipse.wst.wsdl.validation.internal.Constants.NS_HTTP, "org.eclipse.wst.wsdl.validation.internal.wsdl11.http.HTTPValidator","validatewsdlhttp", null);
- registerWSDL11Validator(
- org.eclipse.wst.wsdl.validation.internal.Constants.NS_SOAP11,"org.eclipse.wst.wsdl.validation.internal.wsdl11.soap.SOAPValidator","validatewsdlsoap", null);
- registerWSDL11Validator(
- org.eclipse.wst.wsdl.validation.internal.Constants.NS_MIME,"org.eclipse.wst.wsdl.validation.internal.wsdl11.mime.MIMEValidator","validatewsdlmime", null);
-
- // The WSDL 1.1 schema validator is a special case as it is registered for three namespaces.
- // We will call directly here so we can use the same delegate for all three namespaces.
- WSDL11ValidatorDelegate delegate = new WSDL11ValidatorDelegate("org.eclipse.wst.wsdl.validation.internal.wsdl11.xsd.InlineSchemaValidator", "validatewsdl");
- org.eclipse.wst.wsdl.validation.internal.wsdl11.ValidatorRegistry.getInstance().registerValidator(Constants.NS_URI_XSD_1999, delegate);
- org.eclipse.wst.wsdl.validation.internal.wsdl11.ValidatorRegistry.getInstance().registerValidator(Constants.NS_URI_XSD_2000, delegate);
- org.eclipse.wst.wsdl.validation.internal.wsdl11.ValidatorRegistry.getInstance().registerValidator(Constants.NS_URI_XSD_2001, delegate);
-
- // Register the WSDL 2.0 validator controller and validators.
-// registerWSDLValidator(org.eclipse.wsdl20.model.impl.Constants.NS_URI_WSDL, "org.eclipse.wst.wsdl.validation.internal.wsdl20.WSDL20ValidatorController", "validatewsdl", null);
-//
-// registerWSDL20Validator(org.eclipse.wsdl20.model.impl.Constants.NS_URI_WSDL, "org.eclipse.wst.wsdl.validation.internal.wsdl20.WSDL20BasicValidator", "validatewsdl");
- }
-}
diff --git a/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/ant/WSDLValidate.java b/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/ant/WSDLValidate.java
index 32d5b92..d26ac46 100644
--- a/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/ant/WSDLValidate.java
+++ b/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/ant/WSDLValidate.java
@@ -28,8 +28,8 @@
import org.eclipse.wst.wsdl.validation.internal.IValidationReport;
import org.eclipse.wst.wsdl.validation.internal.WSDLValidator;
import org.eclipse.wst.wsdl.validation.internal.resolver.URIResolverDelegate;
-import org.eclipse.wst.wsdl.validation.internal.ui.WSDLConfigurator;
import org.eclipse.wst.wsdl.validation.internal.util.MessageGenerator;
+import org.eclipse.wst.wsdl.validation.internal.wsdl11.WSDL11ValidatorDelegate;
/**
* An Ant task to run WSDL validation on a file or a set of files.
@@ -279,7 +279,8 @@
while(wsdl11extIter.hasNext())
{
ExtensionValidator extVal = (ExtensionValidator)wsdl11extIter.next();
- WSDLConfigurator.registerWSDL11Validator(extVal.getNamespace(), extVal.getClassName(), extVal.getResourceBundle(), null);
+ WSDL11ValidatorDelegate delegate = new WSDL11ValidatorDelegate(extVal.getClassName(), extVal.getResourceBundle());
+ wsdlValidator.registerWSDL11Validator(extVal.getNamespace(), delegate);
}
// The user didn't specify any files to validate.
@@ -289,8 +290,6 @@
return;
}
- // Register the default validators and schemas.
- WSDLConfigurator.registerDefaultValidators(validatorRB);
if (xsdDirectory != null)
{
org.eclipse.wst.wsdl.validation.internal.xml.XMLCatalog.addSchemaDir(xsdDirectory);
@@ -306,22 +305,6 @@
String errormarker = messGen.getString(_UI_ERROR_MARKER);
String warningmarker = messGen.getString(_UI_WARNING_MARKER);
- int wsiConformanceLevel;
-
- // Set the WS-I compliance level.
- if (wsiLevel.equals(WSI_SUGGEST))
- {
- //wsiConformanceLevel = ValidationController.WSI_SUGGEST;
- }
- else if (wsiLevel.equals(WSI_IGNORE))
- {
- //wsiConformanceLevel = ValidationController.WSI_IGNORE;
- }
- else
- {
- //wsiConformanceLevel = ValidationController.WSI_REQUIRE;
- }
-
StringBuffer result = null;
boolean notvalid = true;
while (iFiles.hasNext())
diff --git a/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/eclipse/ValidateWSDLPlugin.java b/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/eclipse/ValidateWSDLPlugin.java
index 2cd8f08..6b66003 100644
--- a/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/eclipse/ValidateWSDLPlugin.java
+++ b/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/eclipse/ValidateWSDLPlugin.java
@@ -18,11 +18,11 @@
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.wst.wsdl.validation.internal.Constants;
-import org.eclipse.wst.wsdl.validation.internal.ui.WSDLConfigurator;
+import org.eclipse.wst.wsdl.validation.internal.WSDLValidatorDelegate;
+import org.eclipse.wst.wsdl.validation.internal.wsdl11.WSDL11ValidatorDelegate;
import org.eclipse.wst.wsdl.validation.internal.xml.XMLCatalog;
import org.eclipse.wst.wsdl.validation.internal.xml.XMLCatalogEntityHolder;
import org.osgi.framework.Bundle;
@@ -41,25 +41,9 @@
/**
* Constructor.
*/
- public ValidateWSDLPlugin(IPluginDescriptor descriptor)
+ public ValidateWSDLPlugin()
{
- super(descriptor);
-// instance = this;
-// wsdlValidatorResourceBundle = ResourceBundle.getBundle(Constants.WSDL_VALIDATOR_PROPERTIES_FILE);
-// resourcebundle = ResourceBundle.getBundle(PROPERTIES_FILE);
-//
-// // Configure the XML catalog.
-// new ExtXMLCatalogPluginRegistryReader().readRegistry();
-// new WSDLValidatorPluginRegistryReader(
-// "extvalidator",
-// "extvalidator",
-// WSDLValidatorPluginRegistryReader.EXT_VALIDATOR)
-// .readRegistry();
-//
-// // register any WSDL 1.1 validators defined
-// new WSDL11ValidatorPluginRegistryReader("wsdl11validator", "validator").readRegistry();
-//
-// WSDLConfigurator.registerDefaultValidators(wsdlValidatorResourceBundle);
+ super();
}
/* (non-Javadoc)
@@ -82,8 +66,6 @@
// register any WSDL 1.1 validators defined
new WSDL11ValidatorPluginRegistryReader("wsdl11validator", "validator").readRegistry();
-
- WSDLConfigurator.registerDefaultValidators(wsdlValidatorResourceBundle);
}
/* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
@@ -230,13 +212,15 @@
ClassLoader pluginLoader =
element.getDeclaringExtension().getDeclaringPluginDescriptor().getPluginClassLoader();
- if (validatorType == WSDL_VALIDATOR)
+// if (validatorType == WSDL_VALIDATOR)
+// {
+// WSDL11ValidatorDelegate delegate = new WSDL11ValidatorDelegate(validatorClass, resourceBundle, pluginLoader);
+// WSDLValidator.getInstance().registerWSDL11Validator(namespace, delegate);
+// }
+ if (validatorType == EXT_VALIDATOR)
{
- WSDLConfigurator.registerWSDLValidator(namespace, validatorClass, resourceBundle, pluginLoader);
- }
- else if (validatorType == EXT_VALIDATOR)
- {
- WSDLConfigurator.registerExtensionValidator(namespace, validatorClass, resourceBundle, pluginLoader);
+ WSDLValidatorDelegate delegate = new WSDLValidatorDelegate(validatorClass, resourceBundle, pluginLoader);
+ WSDLValidator.getInstance().registerWSDLExtensionValidator(namespace, delegate);
}
// registerWSDLValidatorPluginExtensionWithClassName(
// pluginLoader,
@@ -371,8 +355,8 @@
{
ClassLoader pluginLoader =
element.getDeclaringExtension().getDeclaringPluginDescriptor().getPluginClassLoader();
-
- WSDLConfigurator.registerWSDL11Validator(namespace, validatorClass, resourceBundle, pluginLoader);
+ WSDL11ValidatorDelegate delegate = new WSDL11ValidatorDelegate(validatorClass, resourceBundle, pluginLoader);
+ WSDLValidator.getInstance().registerWSDL11Validator(namespace, delegate);
}
catch (Exception e)
{
diff --git a/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/eclipse/WSDLValidator.java b/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/eclipse/WSDLValidator.java
index 8bad990..10d701a 100644
--- a/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/eclipse/WSDLValidator.java
+++ b/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/eclipse/WSDLValidator.java
@@ -11,11 +11,9 @@
package org.eclipse.wst.wsdl.validation.internal.ui.eclipse;
-import java.io.InputStream;
import java.util.Iterator;
import java.util.List;
-import org.eclipse.wst.wsdl.validation.internal.IValidationReport;
import org.eclipse.wst.wsdl.validation.internal.resolver.IURIResolver;
/**
@@ -24,11 +22,10 @@
* this validator. When created, this validator registers all extension
* URI resolvers.
*/
-public class WSDLValidator
+public class WSDLValidator extends org.eclipse.wst.wsdl.validation.internal.WSDLValidator
{
private static WSDLValidator instance = null;
-
- private org.eclipse.wst.wsdl.validation.internal.WSDLValidator wsdlValidator;
+
/**
* The constructor registers all of the URI resolvers defined via the
* WSDL URI resolver extension point with the WSDL validator.
@@ -36,14 +33,14 @@
*/
private WSDLValidator()
{
- this.wsdlValidator = new org.eclipse.wst.wsdl.validation.internal.WSDLValidator();
+ super();
URIResolverRegistryReader uriRR = new URIResolverRegistryReader();
List resolvers = uriRR.readRegistry();
Iterator resolverIter = resolvers.iterator();
while(resolverIter.hasNext())
{
IURIResolver resolver = (IURIResolver)resolverIter.next();
- wsdlValidator.addURIResolver(resolver);
+ addURIResolver(resolver);
}
}
@@ -61,26 +58,26 @@
return instance;
}
- /**
- * Validate the specified WSDL file.
- *
- * @param fileURI The URI of the WSDL file.
- * @return A validation report with the validation results.
- */
- public IValidationReport validate(String fileURI)
- {
- return wsdlValidator.validate(fileURI);
- }
- /**
- * Validate the given WSDL InputStream
- *
- * @param fileURI The URI of the WSDL file.
- * @param inputStream the InputStream to validate
- * @return A validation report with the validation results.
- */
- public IValidationReport validate(String fileURI, InputStream inputStream)
- {
- return wsdlValidator.validate(fileURI, inputStream);
- }
+// /**
+// * Validate the specified WSDL file.
+// *
+// * @param fileURI The URI of the WSDL file.
+// * @return A validation report with the validation results.
+// */
+// public IValidationReport validate(String fileURI)
+// {
+// return wsdlValidator.validate(fileURI);
+// }
+// /**
+// * Validate the given WSDL InputStream
+// *
+// * @param fileURI The URI of the WSDL file.
+// * @param inputStream the InputStream to validate
+// * @return A validation report with the validation results.
+// */
+// public IValidationReport validate(String fileURI, InputStream inputStream)
+// {
+// return wsdlValidator.validate(fileURI, inputStream);
+// }
}
diff --git a/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/text/WSDLValidate.java b/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/text/WSDLValidate.java
index 2acbfa0..eea1190 100644
--- a/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/text/WSDLValidate.java
+++ b/bundles/org.eclipse.wst.wsdl.validation/src/wsdlvalidateui/org/eclipse/wst/wsdl/validation/internal/ui/text/WSDLValidate.java
@@ -22,10 +22,11 @@
import org.eclipse.wst.wsdl.validation.internal.IValidationMessage;
import org.eclipse.wst.wsdl.validation.internal.IValidationReport;
import org.eclipse.wst.wsdl.validation.internal.WSDLValidator;
+import org.eclipse.wst.wsdl.validation.internal.WSDLValidatorDelegate;
import org.eclipse.wst.wsdl.validation.internal.resolver.IURIResolver;
import org.eclipse.wst.wsdl.validation.internal.resolver.URIResolverDelegate;
-import org.eclipse.wst.wsdl.validation.internal.ui.WSDLConfigurator;
import org.eclipse.wst.wsdl.validation.internal.util.MessageGenerator;
+import org.eclipse.wst.wsdl.validation.internal.wsdl11.WSDL11ValidatorDelegate;
import org.eclipse.wst.wsdl.validation.internal.xml.XMLCatalog;
import org.eclipse.wst.wsdl.validation.internal.xml.XMLCatalogEntityHolder;
@@ -192,9 +193,6 @@
int argslength = args.length;
- // register the default validators
- WSDLConfigurator.registerDefaultValidators(validatorRB);
-
WSDLValidate wsdlValidator = new WSDLValidate();
// go through the parameters
for (int i = 0; i < argslength; i++)
@@ -220,11 +218,13 @@
}
if(param.equalsIgnoreCase(WSDLValidate.PARAM_WSDL11VAL))
{
- WSDLConfigurator.registerWSDL11Validator(namespace, validatorClass, propertiesFile, null);
+ WSDL11ValidatorDelegate delegate = new WSDL11ValidatorDelegate(validatorClass, propertiesFile);
+ wsdlValidator.wsdlValidator.registerWSDL11Validator(namespace, delegate);
}
else if(param.equalsIgnoreCase(WSDLValidate.PARAM_EXTVAL))
{
- WSDLConfigurator.registerExtensionValidator(namespace, validatorClass, propertiesFile, null);
+ WSDLValidatorDelegate delegate = new WSDLValidatorDelegate(validatorClass, propertiesFile);
+ wsdlValidator.wsdlValidator.registerWSDLExtensionValidator(namespace, delegate);
}
}
else