summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/tags/java-M1-20060522/java/sca/core/src/main/java/org/apache/tuscany/core/loader/WSDLDefinitionRegistry.java
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-1.x/tags/java-M1-20060522/java/sca/core/src/main/java/org/apache/tuscany/core/loader/WSDLDefinitionRegistry.java')
-rw-r--r--sca-java-1.x/tags/java-M1-20060522/java/sca/core/src/main/java/org/apache/tuscany/core/loader/WSDLDefinitionRegistry.java95
1 files changed, 95 insertions, 0 deletions
diff --git a/sca-java-1.x/tags/java-M1-20060522/java/sca/core/src/main/java/org/apache/tuscany/core/loader/WSDLDefinitionRegistry.java b/sca-java-1.x/tags/java-M1-20060522/java/sca/core/src/main/java/org/apache/tuscany/core/loader/WSDLDefinitionRegistry.java
new file mode 100644
index 0000000000..f88e0f0b35
--- /dev/null
+++ b/sca-java-1.x/tags/java-M1-20060522/java/sca/core/src/main/java/org/apache/tuscany/core/loader/WSDLDefinitionRegistry.java
@@ -0,0 +1,95 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tuscany.core.loader;
+
+import java.net.URL;
+import java.util.List;
+import java.io.IOException;
+import javax.wsdl.Definition;
+import javax.wsdl.PortType;
+import javax.wsdl.Service;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensionRegistry;
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.common.resource.ResourceLoader;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface WSDLDefinitionRegistry {
+ /**
+ * Loads and registers a WSDL Definition.
+ *
+ * @param namespace the expected namespace, or null if any namespace should be allowed
+ * @param location the location to load the definition from
+ * @param resourceLoader the application resource loader
+ * @return the loaded Definition
+ * @throws IOException if there was a problem reading the document
+ * @throws WSDLException if there was a problem parsing the definition
+ */
+ Definition loadDefinition(String namespace, URL location, ResourceLoader resourceLoader) throws IOException, WSDLException;
+
+ /**
+ * Load and register a WSDL definition as specified in a WSDL2.0 wsdlLocation attribute.
+ *
+ * @param wsdlLocation the value of the wsdlLocation attribute
+ * @param resourceLoader application resource loader used to support relative locations
+ * @return the loaded Definition
+ * @throws IOException if there was a problem reading the document
+ * @throws WSDLException if there was a problem parsing the definition
+ */
+ Definition loadDefinition(String wsdlLocation, ResourceLoader resourceLoader) throws IOException, WSDLException;
+
+ /**
+ * Returns the PortType with the supplied qualified name, or null if no such port has been defined.
+ *
+ * @param name the qualified name of the WSDL portType
+ * @param resourceLoader the application resource loader
+ * @return the PortType for the supplied name, or null if none has been defined
+ */
+ PortType getPortType(QName name, ResourceLoader resourceLoader);
+
+ /**
+ * Returns the Service with the supplied qualified name, or null if no such service has been defined.
+ *
+ * @param name the qualified name of the WSDL service
+ * @param resourceLoader the application resource loader
+ * @return the Service for the supplied name, or null if none has been defined
+ */
+ Service getService(QName name, ResourceLoader resourceLoader);
+
+
+ /**
+ * Returns a list of definitions that have been loaded for the given namespace, or null if
+ * no WSDL documents have been loaded for the given namespace
+ *
+ * @param namespace the namespace to lookup
+ * @param resourceLoader the application resource loader
+ * @return The list of definitions that have been loaded for the given namespace, or null
+ */
+ List<Definition> getDefinitionsForNamespace(String namespace, ResourceLoader resourceLoader);
+
+
+ /**
+ * Returns the ExtensionRegistry that is used when parsing WSDL documents during the
+ * loadDefinition call.
+ *
+ * @return the ExtensionRegistry that is used when parsing WSDL documents.
+ */
+ ExtensionRegistry getExtensionRegistry();
+}