You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by jk...@apache.org on 2007/08/23 13:01:35 UTC
svn commit: r568932 [30/36] - in
/incubator/woden/trunk/java/src/org/apache/woden: ./ ant/ internal/
internal/resolver/ internal/schema/ internal/util/ internal/util/dom/
internal/util/om/ internal/wsdl20/ internal/wsdl20/extensions/
internal/wsdl20/ex...
Modified: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/AttributeExtensible.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/AttributeExtensible.java?rev=568932&r1=568931&r2=568932&view=diff
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/AttributeExtensible.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/AttributeExtensible.java Thu Aug 23 04:01:23 2007
@@ -1,62 +1,62 @@
-/**
+/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.woden.wsdl20.extensions;
-
-import java.net.URI;
-
-import javax.xml.namespace.QName;
-
-import org.apache.woden.xml.XMLAttr;
-
-/**
- * This interface represents elements that may contain extension attributes.
- *
- * @author jkaputin@apache.org
- */
-public interface AttributeExtensible
-{
- /**
- * Store the extension attribute object identified by the QName.
- * If the attribute argument is null, remove the extension attribute identified
- * by the specified QName argument.
- *
- * TODO ? @throws IllegalArgumentException if the QName is null
- */
- public void setExtensionAttribute(QName attrType, XMLAttr attr);
-
- /**
- * Return the extension attribute with this QName.
- */
- public XMLAttr getExtensionAttribute(QName attrType);
-
- /**
- * Return the extension attributes from this namespace.
- */
- public XMLAttr[] getExtensionAttributesForNamespace(URI namespace);
-
- /**
- * Return all extension attributes.
- */
- public XMLAttr[] getExtensionAttributes();
-
- /**
- * Return true if the implementor has extension attributes belonging to this namespace,
- * otherwise false.
- */
- public boolean hasExtensionAttributesForNamespace(URI namespace);
-
-}
+ *
+ * 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.woden.wsdl20.extensions;
+
+import java.net.URI;
+
+import javax.xml.namespace.QName;
+
+import org.apache.woden.xml.XMLAttr;
+
+/**
+ * This interface represents elements that may contain extension attributes.
+ *
+ * @author jkaputin@apache.org
+ */
+public interface AttributeExtensible
+{
+ /**
+ * Store the extension attribute object identified by the QName.
+ * If the attribute argument is null, remove the extension attribute identified
+ * by the specified QName argument.
+ *
+ * TODO ? @throws IllegalArgumentException if the QName is null
+ */
+ public void setExtensionAttribute(QName attrType, XMLAttr attr);
+
+ /**
+ * Return the extension attribute with this QName.
+ */
+ public XMLAttr getExtensionAttribute(QName attrType);
+
+ /**
+ * Return the extension attributes from this namespace.
+ */
+ public XMLAttr[] getExtensionAttributesForNamespace(URI namespace);
+
+ /**
+ * Return all extension attributes.
+ */
+ public XMLAttr[] getExtensionAttributes();
+
+ /**
+ * Return true if the implementor has extension attributes belonging to this namespace,
+ * otherwise false.
+ */
+ public boolean hasExtensionAttributesForNamespace(URI namespace);
+
+}
Propchange: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/AttributeExtensible.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ComponentExtensions.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ComponentExtensions.java?rev=568932&r1=568931&r2=568932&view=diff
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ComponentExtensions.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ComponentExtensions.java Thu Aug 23 04:01:23 2007
@@ -1,57 +1,57 @@
-/**
+/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.woden.wsdl20.extensions;
-
-import java.net.URI;
-
-/**
- * This interface represents a group of properties that extend a <code>WSDLComponent</code>.
- * These properties share the same namespace and it is different to the WSDL 2.0 namespace.
- * The XML representation of these properties are the elements and attributes
- * from outside the WSDL 2.0 namespace that extend a WSDL element.
- * For example, the elements and attributes from the SOAP namespace that extend the
- * WSDL <binding> element are represented by this interface as extension
- * properties of the <code>Binding</code> component.
- * <p>
- * This interface provides a common point of reference to a WSDL component's extension
- * properties that belong to a particular namespace.
- * The interface does not define any behaviour specific to the individual properties.
- * Woden implementations that need to support WSDL extensions from a particular namespace
- * should implement this interface and add support specific to those extensions.
- * <p>
- * For example, Woden implements this interface to support the SOAP and HTTP binding
- * extensions defined in the W3C WSDL 2.0 specification.
- *
- * @author jkaputin@apache.org
- * @author Arthur Ryman (ryman@ca.ibm.com)
- */
-public interface ComponentExtensions
-{
- /**
- * Namespace URIs for extensions defined by WSDL 2.0 Specification.
- */
- public static final URI URI_NS_SOAP = URI.create("http://www.w3.org/ns/wsdl/soap");
- public static final URI URI_NS_HTTP = URI.create("http://www.w3.org/ns/wsdl/http");
- public static final URI URI_NS_RPC = URI.create("http://www.w3.org/ns/wsdl/rpc");
- public static final URI URI_NS_EXTENSIONS = URI.create("http://www.w3.org/ns/wsdl-extensions");
-
- /**
- * @return the non-WSDL URI shared by this group of extension properties
- */
- public URI getNamespace();
-
-}
+ *
+ * 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.woden.wsdl20.extensions;
+
+import java.net.URI;
+
+/**
+ * This interface represents a group of properties that extend a <code>WSDLComponent</code>.
+ * These properties share the same namespace and it is different to the WSDL 2.0 namespace.
+ * The XML representation of these properties are the elements and attributes
+ * from outside the WSDL 2.0 namespace that extend a WSDL element.
+ * For example, the elements and attributes from the SOAP namespace that extend the
+ * WSDL <binding> element are represented by this interface as extension
+ * properties of the <code>Binding</code> component.
+ * <p>
+ * This interface provides a common point of reference to a WSDL component's extension
+ * properties that belong to a particular namespace.
+ * The interface does not define any behaviour specific to the individual properties.
+ * Woden implementations that need to support WSDL extensions from a particular namespace
+ * should implement this interface and add support specific to those extensions.
+ * <p>
+ * For example, Woden implements this interface to support the SOAP and HTTP binding
+ * extensions defined in the W3C WSDL 2.0 specification.
+ *
+ * @author jkaputin@apache.org
+ * @author Arthur Ryman (ryman@ca.ibm.com)
+ */
+public interface ComponentExtensions
+{
+ /**
+ * Namespace URIs for extensions defined by WSDL 2.0 Specification.
+ */
+ public static final URI URI_NS_SOAP = URI.create("http://www.w3.org/ns/wsdl/soap");
+ public static final URI URI_NS_HTTP = URI.create("http://www.w3.org/ns/wsdl/http");
+ public static final URI URI_NS_RPC = URI.create("http://www.w3.org/ns/wsdl/rpc");
+ public static final URI URI_NS_EXTENSIONS = URI.create("http://www.w3.org/ns/wsdl-extensions");
+
+ /**
+ * @return the non-WSDL URI shared by this group of extension properties
+ */
+ public URI getNamespace();
+
+}
Propchange: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ComponentExtensions.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ElementExtensible.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ElementExtensible.java?rev=568932&r1=568931&r2=568932&view=diff
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ElementExtensible.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ElementExtensible.java Thu Aug 23 04:01:23 2007
@@ -1,44 +1,44 @@
-/**
+/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.woden.wsdl20.extensions;
-
-import java.net.URI;
-
-import javax.xml.namespace.QName;
-
-/**
- * This interface represents elements that may contain extension elements.
- *
- * @author jkaputin@apache.org
- */
-public interface ElementExtensible
-{
- public void addExtensionElement(ExtensionElement extEl);
-
- public void removeExtensionElement(ExtensionElement extEl);
-
- public ExtensionElement[] getExtensionElements();
-
- public ExtensionElement[] getExtensionElementsOfType(QName extType);
-
- /**
- * Return true if the implementor has extension elements belonging to this namespace,
- * otherwise false.
- */
- public boolean hasExtensionElementsForNamespace(URI namespace);
-
-}
+ *
+ * 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.woden.wsdl20.extensions;
+
+import java.net.URI;
+
+import javax.xml.namespace.QName;
+
+/**
+ * This interface represents elements that may contain extension elements.
+ *
+ * @author jkaputin@apache.org
+ */
+public interface ElementExtensible
+{
+ public void addExtensionElement(ExtensionElement extEl);
+
+ public void removeExtensionElement(ExtensionElement extEl);
+
+ public ExtensionElement[] getExtensionElements();
+
+ public ExtensionElement[] getExtensionElementsOfType(QName extType);
+
+ /**
+ * Return true if the implementor has extension elements belonging to this namespace,
+ * otherwise false.
+ */
+ public boolean hasExtensionElementsForNamespace(URI namespace);
+
+}
Propchange: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ElementExtensible.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionDeserializer.java?rev=568932&r1=568931&r2=568932&view=diff
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionDeserializer.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionDeserializer.java Thu Aug 23 04:01:23 2007
@@ -1,61 +1,61 @@
-/**
+/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.woden.wsdl20.extensions;
-
-import javax.xml.namespace.QName;
-
-import org.apache.woden.WSDLException;
-import org.apache.woden.XMLElement;
-import org.apache.woden.wsdl20.xml.DescriptionElement;
-
-/**
- * This interface should be implemented by classes which deserialize
- * org.w3c.dom.Elements into extension-specific instances of ExtensionElement.
- * <p>
- * Copied from WSDL4J.
- *
- * @author Matthew J. Duftler (duftler@us.ibm.com)
- * @author jkaputin@apache.org (modified for Woden)
- */
-public interface ExtensionDeserializer
-{
- /**
- * This method deserializes elements into instances of classes
- * which implement the ExtensionElement interface. The
- * return value should be explicitly cast to the more-specific
- * implementing type.
- *
- * @param parentType a class object indicating where in the WSDL
- * document this extension element was encountered. For
- * example, javax.wsdl.Binding.class would be used to indicate
- * this element was encountered as an immediate child of
- * a <wsdl:binding> element.
- * @param parent the parent object of this extension element
- * @param extType the qname of the extension element to deserialize
- * @param extEl the extension element
- * @param desc the <description> this extension element was
- * encountered in
- * @param extReg the ExtensionRegistry to use (if needed again)
- */
- public ExtensionElement unmarshall(Class parentType,
- Object parent,
- QName extType,
- XMLElement extEl,
- DescriptionElement desc,
- ExtensionRegistry extReg)
- throws WSDLException;
+ *
+ * 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.woden.wsdl20.extensions;
+
+import javax.xml.namespace.QName;
+
+import org.apache.woden.WSDLException;
+import org.apache.woden.XMLElement;
+import org.apache.woden.wsdl20.xml.DescriptionElement;
+
+/**
+ * This interface should be implemented by classes which deserialize
+ * org.w3c.dom.Elements into extension-specific instances of ExtensionElement.
+ * <p>
+ * Copied from WSDL4J.
+ *
+ * @author Matthew J. Duftler (duftler@us.ibm.com)
+ * @author jkaputin@apache.org (modified for Woden)
+ */
+public interface ExtensionDeserializer
+{
+ /**
+ * This method deserializes elements into instances of classes
+ * which implement the ExtensionElement interface. The
+ * return value should be explicitly cast to the more-specific
+ * implementing type.
+ *
+ * @param parentType a class object indicating where in the WSDL
+ * document this extension element was encountered. For
+ * example, javax.wsdl.Binding.class would be used to indicate
+ * this element was encountered as an immediate child of
+ * a <wsdl:binding> element.
+ * @param parent the parent object of this extension element
+ * @param extType the qname of the extension element to deserialize
+ * @param extEl the extension element
+ * @param desc the <description> this extension element was
+ * encountered in
+ * @param extReg the ExtensionRegistry to use (if needed again)
+ */
+ public ExtensionElement unmarshall(Class parentType,
+ Object parent,
+ QName extType,
+ XMLElement extEl,
+ DescriptionElement desc,
+ ExtensionRegistry extReg)
+ throws WSDLException;
}
Propchange: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionDeserializer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionElement.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionElement.java?rev=568932&r1=568931&r2=568932&view=diff
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionElement.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionElement.java Thu Aug 23 04:01:23 2007
@@ -1,42 +1,42 @@
-/**
+/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.woden.wsdl20.extensions;
-
-import javax.xml.namespace.QName;
-
-/**
- * This interface represents WSDL 2.0 extension elements. That is, any XML element
- * information items that appear as [children] of a WSDL 2.0 element and are not in
- * the WSDL 2.0 namespace (http://www.w3.org/ns/wsdl).
- * <p>
- * Based on a similar interface from WSDL4J element extensibility.
- *
- * TODO change this URL if the WSDL 2.0 namespace changes before spec is finalized.
- *
- * @author jkaputin@apache.org
- */
-public interface ExtensionElement
-{
- public void setExtensionType(QName qname);
-
- public QName getExtensionType();
-
- public void setRequired(Boolean required);
-
- public Boolean isRequired();
-
-}
+ *
+ * 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.woden.wsdl20.extensions;
+
+import javax.xml.namespace.QName;
+
+/**
+ * This interface represents WSDL 2.0 extension elements. That is, any XML element
+ * information items that appear as [children] of a WSDL 2.0 element and are not in
+ * the WSDL 2.0 namespace (http://www.w3.org/ns/wsdl).
+ * <p>
+ * Based on a similar interface from WSDL4J element extensibility.
+ *
+ * TODO change this URL if the WSDL 2.0 namespace changes before spec is finalized.
+ *
+ * @author jkaputin@apache.org
+ */
+public interface ExtensionElement
+{
+ public void setExtensionType(QName qname);
+
+ public QName getExtensionType();
+
+ public void setRequired(Boolean required);
+
+ public Boolean isRequired();
+
+}
Propchange: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionElement.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionRegistry.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionRegistry.java?rev=568932&r1=568931&r2=568932&view=diff
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionRegistry.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionRegistry.java Thu Aug 23 04:01:23 2007
@@ -1,734 +1,734 @@
-/**
+/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.woden.wsdl20.extensions;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.apache.woden.ErrorReporter;
-import org.apache.woden.WSDLException;
-import org.apache.woden.XMLElement;
-import org.apache.woden.wsdl20.xml.WSDLElement;
-import org.apache.woden.xml.UnknownAttr;
-import org.apache.woden.xml.XMLAttr;
-
-/**
- * This class is used to associate serializers, deserializers, and
- * Java implementation types with extension elements.
- * It also associates Java implementation types only with extension attributes,
- * but not serializers and deserializers.
- * <p>
- * This class has been copied from WSDL4J and modified for Woden.
- *
- * TODO update method javadocs.
- *
- * @author Matthew J. Duftler (duftler@us.ibm.com)
- * @author John Kaputin (jkaputin@apache.org)
- */
-public class ExtensionRegistry
-{
-
- /**
- * Creates the extension registry, and sets the defaultSerializer
- * and defaultDeserializer properties to instances of an
- * UnknownExtensionSerializer, and an UnknownExtensionDeserializer,
- * respectively.
- */
- public ExtensionRegistry(ErrorReporter errorReporter)
- {
- this.errorReporter = errorReporter;
- setDefaultSerializer(new UnknownExtensionSerializer());
- setDefaultDeserializer(new UnknownExtensionDeserializer());
- }
-
- /*
- This is a Map of Maps. The top-level Map is keyed by (Class)parentType,
- and the inner Maps are keyed by (QName)elementQN.
- */
- protected Map serializerReg = new Hashtable();
- /*
- This is a Map of Maps. The top-level Map is keyed by (Class)parentType,
- and the inner Maps are keyed by (QName)elementQN.
- */
- protected Map deserializerReg = new Hashtable();
- /*
- This is a Map of Maps. The top-level Map is keyed by (Class)parentType,
- and the inner Maps are keyed by (QName)elementQN.
- */
- protected Map extElementReg = new Hashtable();
- protected ExtensionSerializer defaultSer = null;
- protected ExtensionDeserializer defaultDeser = null;
- /*
- This is a Map of Maps. The top-level Map is keyed by (Class)parentType,
- and the inner Maps are keyed by (QName)attrName.
- */
- protected Map extAttributeReg = new Hashtable();
-
- /*
- * This is a Map of Maps. The top-level Map is keyed by (Class)parentComponent
- * and the inner Map is keyed by (URI)extensionNamespace with a value of
- * (Class)componentExtensions.
- */
- protected Map compExtReg = new Hashtable();
-
- private ErrorReporter errorReporter = null;
-
- /*JKctx
- public void setErrorReporter(ErrorReporter errRpt)
- {
- this.errorReporter = errRpt;
- }
- */
-
- public ErrorReporter getErrorReporter()
- {
- return this.errorReporter;
- }
-
- /**
- * Set the serializer to be used when none is found for an extensibility
- * element. Set this to null to have an exception thrown when
- * unexpected extensibility elements are encountered. Default value is
- * an instance of UnknownExtensionSerializer.
- *
- * @see UnknownExtensionSerializer
- */
- public void setDefaultSerializer(ExtensionSerializer defaultSer)
- {
- this.defaultSer = defaultSer;
- }
-
- /**
- * Get the serializer to be used when none is found for an extensibility
- * element. Default value is an instance of UnknownExtensionSerializer.
- *
- * @see UnknownExtensionSerializer
- */
- public ExtensionSerializer getDefaultSerializer()
- {
- return defaultSer;
- }
-
- /**
- * Set the deserializer to be used when none is found for an encountered
- * element. Set this to null to have an exception thrown when
- * unexpected extensibility elements are encountered. Default value is
- * an instance of UnknownExtensionDeserializer.
- *
- * @see UnknownExtensionDeserializer
- */
- public void setDefaultDeserializer(ExtensionDeserializer defaultDeser)
- {
- this.defaultDeser = defaultDeser;
- }
-
- /**
- * Get the deserializer to be used when none is found for an encountered
- * element. Default value is an instance of UnknownExtensionDeserializer.
- *
- * @see UnknownExtensionDeserializer
- */
- public ExtensionDeserializer getDefaultDeserializer()
- {
- return defaultDeser;
- }
-
- /**
- * Declare that the specified serializer should be used to serialize
- * all extensibility elements with a qname matching elementQN, when
- * encountered as children of the specified parentType.
- *
- * @param parentType a class object indicating where in the WSDL
- * definition this extension was encountered. For
- * example, javax.wsdl.Binding.class would be used to indicate
- * this extensibility element was found in the list of
- * extensibility elements belonging to a javax.wsdl.Binding.
- * @param elementType the qname of the extensibility element
- * @param es the extension serializer to use
- *
- * @see #querySerializer(Class, QName)
- */
- public void registerSerializer(Class parentType,
- QName elementType,
- ExtensionSerializer es)
- {
- Map innerSerializerReg = (Map)serializerReg.get(parentType);
-
- if (innerSerializerReg == null)
- {
- innerSerializerReg = new Hashtable();
-
- serializerReg.put(parentType, innerSerializerReg);
- }
-
- innerSerializerReg.put(elementType, es);
- }
-
- /**
- * Declare that the specified deserializer should be used to deserialize
- * all extensibility elements with a qname matching elementQN, when
- * encountered as immediate children of the element represented by the
- * specified parentType.
- *
- * @param parentType a class object indicating where in the WSDL
- * document this extensibility element was encountered. For
- * example, javax.wsdl.Binding.class would be used to indicate
- * this element was encountered as an immediate child of
- * a <wsdl:binding> element.
- * @param elementType the qname of the extensibility element
- * @param ed the extension deserializer to use
- *
- * @see #queryDeserializer(Class, QName)
- */
- public void registerDeserializer(Class parentType,
- QName elementType,
- ExtensionDeserializer ed)
- {
- Map innerDeserializerReg = (Map)deserializerReg.get(parentType);
-
- if (innerDeserializerReg == null)
- {
- innerDeserializerReg = new Hashtable();
-
- deserializerReg.put(parentType, innerDeserializerReg);
- }
-
- innerDeserializerReg.put(elementType, ed);
- }
-
- /**
- * Look up the serializer to use for the extensibility element with
- * the qname elementQN, which was encountered as a child of the
- * specified parentType.
- *
- * @param parentType a class object indicating where in the WSDL
- * definition this extension was encountered. For
- * example, javax.wsdl.Binding.class would be used to indicate
- * this extensibility element was found in the list of
- * extensibility elements belonging to a javax.wsdl.Binding.
- * @param elementType the qname of the extensibility element
- *
- * @return the extension serializer, if one was found. If none was
- * found, the behavior depends on the value of the defaultSerializer
- * property. If the defaultSerializer property is set to a non-null
- * value, that value is returned; otherwise, a WSDLException is
- * thrown.
- *
- * @see #registerSerializer(Class, QName, ExtensionSerializer)
- * @see #setDefaultSerializer(ExtensionSerializer)
- */
- public ExtensionSerializer querySerializer(Class parentType,
- QName elementType)
- throws WSDLException
- {
- Map innerSerializerReg = (Map)serializerReg.get(parentType);
- ExtensionSerializer es = null;
-
- if (innerSerializerReg != null)
- {
- es = (ExtensionSerializer)innerSerializerReg.get(elementType);
- }
-
- if (es == null)
- {
- es = defaultSer;
- }
-
- if (es == null)
- {
- throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
- "No ExtensionSerializer found " +
- "to serialize a '" + elementType +
- "' element in the context of a '" +
- parentType.getName() + "'.");
- }
-
- return es;
- }
-
- /**
- * Look up the deserializer for the extensibility element with the
- * qname elementQN, which was encountered as an immediate child
- * of the element represented by the specified parentType.
- *
- * @param parentType a class object indicating where in the WSDL
- * document this extensibility element was encountered. For
- * example, javax.wsdl.Binding.class would be used to indicate
- * this element was encountered as an immediate child of
- * a <wsdl:binding> element.
- * @param elementType the qname of the extensibility element
- *
- * @return the extension deserializer, if one was found. If none was
- * found, the behavior depends on the value of the defaultDeserializer
- * property. If the defaultDeserializer property is set to a non-null
- * value, that value is returned; otherwise, a WSDLException is thrown.
- *
- * @see #registerDeserializer(Class, QName, ExtensionDeserializer)
- * @see #setDefaultDeserializer(ExtensionDeserializer)
- */
- public ExtensionDeserializer queryDeserializer(Class parentType,
- QName elementType)
- throws WSDLException
- {
- Map innerDeserializerReg = (Map)deserializerReg.get(parentType);
- ExtensionDeserializer ed = null;
-
- if (innerDeserializerReg != null)
- {
- ed = (ExtensionDeserializer)innerDeserializerReg.get(elementType);
- }
-
- if (ed == null)
- {
- ed = defaultDeser;
- }
-
- if (ed == null)
- {
- throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
- "No ExtensionDeserializer found " +
- "to deserialize a '" + elementType +
- "' element in the context of a '" +
- parentType.getName() + "'.");
- }
-
- return ed;
- }
-
- /**
- * Look up the type of the extensibility element with the specified qname, which
- * was defined as a child of the element represented by the specified parent class.
- *
- * @param parentClass a class object indicating where in the WSDL
- * document this extensibility attribute was encountered. For
- * example, javax.wsdl.Binding.class would be used to indicate
- * this attribute was defined on a <wsdl:binding> element.
- * @param elemQN the qname of the extensibility attribute
- *
- * @return one of the constants defined on the AttributeExtensible class
- *
- * @see #registerExtAttributeType(Class, QName, Class)
- * @see AttributeExtensible
- */
- public Class queryExtElementType(Class parentClass, QName elemQN)
- {
- Map innerExtensionAttributeReg =
- (Map)extAttributeReg.get(parentClass);
- Class elemClass = null;
-
- if (innerExtensionAttributeReg != null)
- {
- elemClass = (Class)innerExtensionAttributeReg.get(elemQN);
- }
-
- return elemClass;
- }
-
- /**
- * TODO make the return val typesafe, and create similar method for ext attrs.
- *
- * Returns a set of QNames representing the extensibility elements
- * that are allowed as children of the specified parent type.
- * Basically, this method returns the keys associated with the set
- * of extension deserializers registered for this parent type.
- * Returns null if no extension deserializers are registered for
- * this parent type.
- */
- public Set getAllowableExtensions(Class parentType)
- {
- Map innerDeserializerReg = (Map)deserializerReg.get(parentType);
-
- return (innerDeserializerReg != null)
- ? innerDeserializerReg.keySet()
- : null;
- }
-
- /**
- * Declare that the specified extensionType is the concrete
- * class which should be used to represent extensibility elements
- * with qnames matching elementQN, that are intended to exist as
- * children of the specified parentType.
- *
- * @param parentType a class object indicating where in the WSDL
- * definition this extension would exist. For example,
- * javax.wsdl.Binding.class would be used to indicate
- * this extensibility element would be added to the list of
- * extensibility elements belonging to a javax.wsdl.Binding,
- * after being instantiated.
- * @param elementType the qname of the extensibility element
- * @param extensionType the concrete class which should be instantiated
- *
- * @see #createExtElement(Class, QName)
- */
- public void registerExtElementType(Class parentType,
- QName elementType,
- Class extensionType)
- {
- Map innerExtensionTypeReg = (Map)extElementReg.get(parentType);
-
- if (innerExtensionTypeReg == null)
- {
- innerExtensionTypeReg = new Hashtable();
-
- extElementReg.put(parentType, innerExtensionTypeReg);
- }
-
- innerExtensionTypeReg.put(elementType, extensionType);
- }
-
- /**
- * Create an instance of the type which was declared to be used to
- * represent extensibility elements with qnames matching elementQN,
- * when intended to exist as children of the specified parentType.
- * This method allows a user to instantiate an extensibility element
- * without having to know the implementing type.
- *
- * @param parentType a class object indicating where in the WSDL
- * definition this extension will exist. For example,
- * javax.wsdl.Binding.class would be used to indicate
- * this extensibility element is going to be added to the list of
- * extensibility elements belonging to a javax.wsdl.Binding,
- * after being instantiated.
- * @param elementType the qname of the extensibility element
- *
- * @return a new instance of the type used to represent the
- * specified extension
- *
- * @see #registerExtElementType(Class, QName, Class)
- */
- public ExtensionElement createExtElement(Class parentType,
- QName elementType)
- throws WSDLException
- {
- Map innerExtensionTypeReg = (Map)extElementReg.get(parentType);
- Class extensionType = null;
-
- if (innerExtensionTypeReg != null)
- {
- extensionType = (Class)innerExtensionTypeReg.get(elementType);
- }
-
- if (extensionType == null)
- {
- //TODO use ErrorReporter to get formatted error msg WSDL012
- throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
- "No Java extensionType found " +
- "to represent a '" + elementType +
- "' element in the context of a '" +
- parentType.getName() + "'.");
- }
- else if (!(ExtensionElement.class.isAssignableFrom(extensionType)))
- {
- //TODO use ErrorReporter to get formatted error msg WSDL013
- throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
- "The Java extensionType '" +
- extensionType.getName() + "' does " +
- "not implement the ExtensibilityElement " +
- "interface.");
- }
-
- try
- {
- ExtensionElement ee = (ExtensionElement)extensionType.newInstance();
- /*
- if (ee.getElementType() == null)
- {
- ee.setElementType(elementQN);
- }
- */
-
- return ee;
- }
- catch (Exception e)
- {
- /*
- Catches:
- InstantiationException
- IllegalAccessException
- */
- throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
- "Problem instantiating Java " +
- "extensionType '" + extensionType.getName() +
- "'.",
- e);
- }
- }
-
- /**
- * Declare that the type of the specified extension attribute, when it occurs
- * as an attribute of the specified parent type, should be assumed to be
- * attrType.
- *
- * @param ownerClass a class object indicating where in the WSDL
- * document this extensibility attribute was encountered. For
- * example, javax.wsdl.Binding.class would be used to indicate
- * this attribute was defined on a <wsdl:binding> element.
- * @param attrQName the qname of the extensibility attribute
- * @param attrClass one of the constants defined on the AttributeExtensible
- * class
- *
- * @see #queryExtAttributeType(Class, QName)
- * @see AttributeExtensible
- */
- public void registerExtAttributeType(Class ownerClass,
- QName attrQName,
- Class attrClass)
- {
- Map innerExtensionAttributeReg =
- (Map)extAttributeReg.get(ownerClass);
-
- if (innerExtensionAttributeReg == null)
- {
- innerExtensionAttributeReg = new Hashtable();
-
- extAttributeReg.put(ownerClass, innerExtensionAttributeReg);
- }
-
- innerExtensionAttributeReg.put(attrQName, attrClass);
- }
-
- /**
- * Look up the type of the extensibility attribute with the specified qname,
- * which was defined on an element represented by the specified parent class.
- *
- * @param parentClass a class object indicating where in the WSDL
- * document this extensibility attribute was encountered. For
- * example, javax.wsdl.Binding.class would be used to indicate
- * this attribute was defined on a <wsdl:binding> element.
- * @param attrQN the qname of the extensibility attribute
- *
- * @return one of the constants defined on the AttributeExtensible class
- *
- * @see #registerExtAttributeType(Class, QName, Class)
- * @see AttributeExtensible
- */
- public Class queryExtAttributeType(Class parentClass, QName attrQN)
- {
- Map innerExtensionAttributeReg =
- (Map)extAttributeReg.get(parentClass);
- Class attrClass = null;
-
- if (innerExtensionAttributeReg != null)
- {
- attrClass = (Class)innerExtensionAttributeReg.get(attrQN);
- }
-
- return attrClass;
- }
-
- public XMLAttr createExtAttribute(Class ownerClass, QName attrQName, XMLElement ownerElement, String attrValue)
- throws WSDLException
- {
- Map innerExtensionAttributeReg = (Map)extAttributeReg.get(ownerClass);
- Class implClass = null;
- XMLAttr attr = null;
-
- if (innerExtensionAttributeReg != null)
- {
- implClass = (Class)innerExtensionAttributeReg.get(attrQName);
- }
-
- if (implClass == null)
- {
- /*
- * Implementations MAY register a default class to handle unknown extension attributes,
- * which will be retrieved here from the Extension Registry. For example, the
- * StringAttr implementation class may be registered as the default.
- *
- * TODO TBC, then add this info to javadoc and user docs. See sample code in PopulatedExtReg.
- */
- implClass = queryExtAttributeType(WSDLElement.class,
- new QName("http://ws.apache.org/woden", "DefaultAttr"));
-
- //If no default Java class is registered, use the UnknownAttr class.
- if(implClass == null) implClass = UnknownAttr.class;
-
-
- //Decided it is not necessary to report WSDL010 as a warning to the user,
- //however we will keep the message code for now in case we add logging capability
- //later and can capture it in a log (i.e. pull vs. push diagnositic information)
-
- /* TODO the following line was replaced by null in the reportError call below
- * to avoid an API build problem for Milestone 2. This must be fixed, post-M2.
- * e.g. provide some creator for error locator that hides the Impl class.
- *
- * new ErrorLocatorImpl(), //TODO line/col nos.
- *
- getErrorReporter().reportError(
- null, //see comment above
- "WSDL010",
- new Object[] {attrQName.toString(),
- ownerClass.getName(),
- implClass.getName()},
- ErrorReporter.SEVERITY_WARNING);
- */
- }
- else if (!(XMLAttr.class.isAssignableFrom(implClass)))
- {
- String msg = getErrorReporter().getFormattedMessage("WSDL011",
- new Object[] {attrQName.toString()});
- throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL011: " + msg);
- }
-
- try {
- Class[] ctorParms = new Class[] {XMLElement.class, QName.class, String.class, ErrorReporter.class};
- Constructor ctor = implClass.getConstructor(ctorParms);
- Object[] ctorParmValues = new Object[] {ownerElement, attrQName, attrValue, getErrorReporter()};
- attr = (XMLAttr)ctor.newInstance(ctorParmValues);
- }
- catch (Exception e) {
- //SecurityException
- //NoSuchMethodException
- //InvocationTargetException
- //InstantiationException
- //IllegalAccessException
- String msg = getErrorReporter().getFormattedMessage("WSDL009",
- new Object[] {implClass.getName()});
- throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL009: " + msg, e);
- }
-
- return attr;
- }
-
- /**
- * Register the Java class which will represent extensions from a specified
- * namespace that will extend the specified WSDL component class.
- *
- * @param parentClass the WSDL component class
- * @param extNamespace the extension namespace
- * @param compExtClass the Java class representing these extensions
- */
- public void registerComponentExtension(Class parentClass,
- URI extNamespace,
- Class compExtClass)
- {
- if(!(ComponentExtensions.class.isAssignableFrom(compExtClass)))
- {
- String msg = getErrorReporter().getFormattedMessage("WSDL016",
- new Object[] {compExtClass.getName()});
- throw new IllegalArgumentException(msg);
- }
-
- Map innerCompExtReg =
- (Map)compExtReg.get(parentClass);
-
- if (innerCompExtReg == null)
- {
- innerCompExtReg = new Hashtable();
-
- compExtReg.put(parentClass, innerCompExtReg);
- }
-
- innerCompExtReg.put(extNamespace, compExtClass);
- }
-
- /**
- * Return the Java class that represents the extensions from the specified
- * namespace that extend the specified WSDL component class.
- *
- * @param parentClass the WSDL component
- * @param extNamespace the extension namespace
- * @return the Class of the component extensions
- */
- public Class queryComponentExtension(Class parentClass, URI extNamespace)
- {
- Map innerCompExtReg =
- (Map)compExtReg.get(parentClass);
- Class compExtClass = null;
-
- if (innerCompExtReg != null)
- {
- compExtClass = (Class)innerCompExtReg.get(extNamespace);
- }
-
- return compExtClass;
- }
-
- /**
- * Return the extension namespaces registered for the specified WSDL Component class.
- *
- * @param parentClass the class of WSDL component extended by these namespaces
- * @return an array of namespace URIs
- */
- public URI[] queryComponentExtensionNamespaces(Class parentClass)
- {
- Map innerCompExtReg =
- (Map)compExtReg.get(parentClass);
-
- if (innerCompExtReg != null)
- {
- Set namespaceKeys = innerCompExtReg.keySet();
- URI[] extNamespaces = new URI[namespaceKeys.size()];
- namespaceKeys.toArray(extNamespaces);
- return extNamespaces;
- }
- else
- {
- return new URI[0]; //return an empty array, rather than null
- }
-
- }
-
- /**
- * Return a ComponentExtensions object from the Java class registered for
- * the specified extension namespace against the specified WSDL component class.
- *
- * @param parentClass the WSDL component class.
- * @param extNamespace the extension namespace.
- * @return a <code>ComponentExtensions</code> object
- * @throws WSDLException if no Java class is registered for this namespace and WSDL component.
- */
- public ComponentExtensions createComponentExtension(Class parentClass,
- URI extNamespace)
- throws WSDLException
- {
- Class compExtClass = queryComponentExtension(parentClass, extNamespace);
-
- if(compExtClass == null)
- {
- String msg = getErrorReporter().getFormattedMessage("WSDL015",
- new Object[] {extNamespace.toString(), parentClass.getName()});
- throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL015: " + msg);
- }
-
- ComponentExtensions compExt = null;
-
- try {
- compExt = (ComponentExtensions)compExtClass.newInstance();
- }
- catch (InstantiationException e)
- {
- String msg = getErrorReporter().getFormattedMessage("WSDL009",
- new Object[] {compExtClass.getName()});
- throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL009: " + msg, e);
- }
- catch (IllegalAccessException e) {
- String msg = getErrorReporter().getFormattedMessage("WSDL009",
- new Object[] {compExtClass.getName()});
- throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL009: " + msg, e);
- }
-
- return compExt;
- }
-
+ *
+ * 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.woden.wsdl20.extensions;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.apache.woden.ErrorReporter;
+import org.apache.woden.WSDLException;
+import org.apache.woden.XMLElement;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.apache.woden.xml.UnknownAttr;
+import org.apache.woden.xml.XMLAttr;
+
+/**
+ * This class is used to associate serializers, deserializers, and
+ * Java implementation types with extension elements.
+ * It also associates Java implementation types only with extension attributes,
+ * but not serializers and deserializers.
+ * <p>
+ * This class has been copied from WSDL4J and modified for Woden.
+ *
+ * TODO update method javadocs.
+ *
+ * @author Matthew J. Duftler (duftler@us.ibm.com)
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public class ExtensionRegistry
+{
+
+ /**
+ * Creates the extension registry, and sets the defaultSerializer
+ * and defaultDeserializer properties to instances of an
+ * UnknownExtensionSerializer, and an UnknownExtensionDeserializer,
+ * respectively.
+ */
+ public ExtensionRegistry(ErrorReporter errorReporter)
+ {
+ this.errorReporter = errorReporter;
+ setDefaultSerializer(new UnknownExtensionSerializer());
+ setDefaultDeserializer(new UnknownExtensionDeserializer());
+ }
+
+ /*
+ This is a Map of Maps. The top-level Map is keyed by (Class)parentType,
+ and the inner Maps are keyed by (QName)elementQN.
+ */
+ protected Map serializerReg = new Hashtable();
+ /*
+ This is a Map of Maps. The top-level Map is keyed by (Class)parentType,
+ and the inner Maps are keyed by (QName)elementQN.
+ */
+ protected Map deserializerReg = new Hashtable();
+ /*
+ This is a Map of Maps. The top-level Map is keyed by (Class)parentType,
+ and the inner Maps are keyed by (QName)elementQN.
+ */
+ protected Map extElementReg = new Hashtable();
+ protected ExtensionSerializer defaultSer = null;
+ protected ExtensionDeserializer defaultDeser = null;
+ /*
+ This is a Map of Maps. The top-level Map is keyed by (Class)parentType,
+ and the inner Maps are keyed by (QName)attrName.
+ */
+ protected Map extAttributeReg = new Hashtable();
+
+ /*
+ * This is a Map of Maps. The top-level Map is keyed by (Class)parentComponent
+ * and the inner Map is keyed by (URI)extensionNamespace with a value of
+ * (Class)componentExtensions.
+ */
+ protected Map compExtReg = new Hashtable();
+
+ private ErrorReporter errorReporter = null;
+
+ /*JKctx
+ public void setErrorReporter(ErrorReporter errRpt)
+ {
+ this.errorReporter = errRpt;
+ }
+ */
+
+ public ErrorReporter getErrorReporter()
+ {
+ return this.errorReporter;
+ }
+
+ /**
+ * Set the serializer to be used when none is found for an extensibility
+ * element. Set this to null to have an exception thrown when
+ * unexpected extensibility elements are encountered. Default value is
+ * an instance of UnknownExtensionSerializer.
+ *
+ * @see UnknownExtensionSerializer
+ */
+ public void setDefaultSerializer(ExtensionSerializer defaultSer)
+ {
+ this.defaultSer = defaultSer;
+ }
+
+ /**
+ * Get the serializer to be used when none is found for an extensibility
+ * element. Default value is an instance of UnknownExtensionSerializer.
+ *
+ * @see UnknownExtensionSerializer
+ */
+ public ExtensionSerializer getDefaultSerializer()
+ {
+ return defaultSer;
+ }
+
+ /**
+ * Set the deserializer to be used when none is found for an encountered
+ * element. Set this to null to have an exception thrown when
+ * unexpected extensibility elements are encountered. Default value is
+ * an instance of UnknownExtensionDeserializer.
+ *
+ * @see UnknownExtensionDeserializer
+ */
+ public void setDefaultDeserializer(ExtensionDeserializer defaultDeser)
+ {
+ this.defaultDeser = defaultDeser;
+ }
+
+ /**
+ * Get the deserializer to be used when none is found for an encountered
+ * element. Default value is an instance of UnknownExtensionDeserializer.
+ *
+ * @see UnknownExtensionDeserializer
+ */
+ public ExtensionDeserializer getDefaultDeserializer()
+ {
+ return defaultDeser;
+ }
+
+ /**
+ * Declare that the specified serializer should be used to serialize
+ * all extensibility elements with a qname matching elementQN, when
+ * encountered as children of the specified parentType.
+ *
+ * @param parentType a class object indicating where in the WSDL
+ * definition this extension was encountered. For
+ * example, javax.wsdl.Binding.class would be used to indicate
+ * this extensibility element was found in the list of
+ * extensibility elements belonging to a javax.wsdl.Binding.
+ * @param elementType the qname of the extensibility element
+ * @param es the extension serializer to use
+ *
+ * @see #querySerializer(Class, QName)
+ */
+ public void registerSerializer(Class parentType,
+ QName elementType,
+ ExtensionSerializer es)
+ {
+ Map innerSerializerReg = (Map)serializerReg.get(parentType);
+
+ if (innerSerializerReg == null)
+ {
+ innerSerializerReg = new Hashtable();
+
+ serializerReg.put(parentType, innerSerializerReg);
+ }
+
+ innerSerializerReg.put(elementType, es);
+ }
+
+ /**
+ * Declare that the specified deserializer should be used to deserialize
+ * all extensibility elements with a qname matching elementQN, when
+ * encountered as immediate children of the element represented by the
+ * specified parentType.
+ *
+ * @param parentType a class object indicating where in the WSDL
+ * document this extensibility element was encountered. For
+ * example, javax.wsdl.Binding.class would be used to indicate
+ * this element was encountered as an immediate child of
+ * a <wsdl:binding> element.
+ * @param elementType the qname of the extensibility element
+ * @param ed the extension deserializer to use
+ *
+ * @see #queryDeserializer(Class, QName)
+ */
+ public void registerDeserializer(Class parentType,
+ QName elementType,
+ ExtensionDeserializer ed)
+ {
+ Map innerDeserializerReg = (Map)deserializerReg.get(parentType);
+
+ if (innerDeserializerReg == null)
+ {
+ innerDeserializerReg = new Hashtable();
+
+ deserializerReg.put(parentType, innerDeserializerReg);
+ }
+
+ innerDeserializerReg.put(elementType, ed);
+ }
+
+ /**
+ * Look up the serializer to use for the extensibility element with
+ * the qname elementQN, which was encountered as a child of the
+ * specified parentType.
+ *
+ * @param parentType a class object indicating where in the WSDL
+ * definition this extension was encountered. For
+ * example, javax.wsdl.Binding.class would be used to indicate
+ * this extensibility element was found in the list of
+ * extensibility elements belonging to a javax.wsdl.Binding.
+ * @param elementType the qname of the extensibility element
+ *
+ * @return the extension serializer, if one was found. If none was
+ * found, the behavior depends on the value of the defaultSerializer
+ * property. If the defaultSerializer property is set to a non-null
+ * value, that value is returned; otherwise, a WSDLException is
+ * thrown.
+ *
+ * @see #registerSerializer(Class, QName, ExtensionSerializer)
+ * @see #setDefaultSerializer(ExtensionSerializer)
+ */
+ public ExtensionSerializer querySerializer(Class parentType,
+ QName elementType)
+ throws WSDLException
+ {
+ Map innerSerializerReg = (Map)serializerReg.get(parentType);
+ ExtensionSerializer es = null;
+
+ if (innerSerializerReg != null)
+ {
+ es = (ExtensionSerializer)innerSerializerReg.get(elementType);
+ }
+
+ if (es == null)
+ {
+ es = defaultSer;
+ }
+
+ if (es == null)
+ {
+ throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
+ "No ExtensionSerializer found " +
+ "to serialize a '" + elementType +
+ "' element in the context of a '" +
+ parentType.getName() + "'.");
+ }
+
+ return es;
+ }
+
+ /**
+ * Look up the deserializer for the extensibility element with the
+ * qname elementQN, which was encountered as an immediate child
+ * of the element represented by the specified parentType.
+ *
+ * @param parentType a class object indicating where in the WSDL
+ * document this extensibility element was encountered. For
+ * example, javax.wsdl.Binding.class would be used to indicate
+ * this element was encountered as an immediate child of
+ * a <wsdl:binding> element.
+ * @param elementType the qname of the extensibility element
+ *
+ * @return the extension deserializer, if one was found. If none was
+ * found, the behavior depends on the value of the defaultDeserializer
+ * property. If the defaultDeserializer property is set to a non-null
+ * value, that value is returned; otherwise, a WSDLException is thrown.
+ *
+ * @see #registerDeserializer(Class, QName, ExtensionDeserializer)
+ * @see #setDefaultDeserializer(ExtensionDeserializer)
+ */
+ public ExtensionDeserializer queryDeserializer(Class parentType,
+ QName elementType)
+ throws WSDLException
+ {
+ Map innerDeserializerReg = (Map)deserializerReg.get(parentType);
+ ExtensionDeserializer ed = null;
+
+ if (innerDeserializerReg != null)
+ {
+ ed = (ExtensionDeserializer)innerDeserializerReg.get(elementType);
+ }
+
+ if (ed == null)
+ {
+ ed = defaultDeser;
+ }
+
+ if (ed == null)
+ {
+ throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
+ "No ExtensionDeserializer found " +
+ "to deserialize a '" + elementType +
+ "' element in the context of a '" +
+ parentType.getName() + "'.");
+ }
+
+ return ed;
+ }
+
+ /**
+ * Look up the type of the extensibility element with the specified qname, which
+ * was defined as a child of the element represented by the specified parent class.
+ *
+ * @param parentClass a class object indicating where in the WSDL
+ * document this extensibility attribute was encountered. For
+ * example, javax.wsdl.Binding.class would be used to indicate
+ * this attribute was defined on a <wsdl:binding> element.
+ * @param elemQN the qname of the extensibility attribute
+ *
+ * @return one of the constants defined on the AttributeExtensible class
+ *
+ * @see #registerExtAttributeType(Class, QName, Class)
+ * @see AttributeExtensible
+ */
+ public Class queryExtElementType(Class parentClass, QName elemQN)
+ {
+ Map innerExtensionAttributeReg =
+ (Map)extAttributeReg.get(parentClass);
+ Class elemClass = null;
+
+ if (innerExtensionAttributeReg != null)
+ {
+ elemClass = (Class)innerExtensionAttributeReg.get(elemQN);
+ }
+
+ return elemClass;
+ }
+
+ /**
+ * TODO make the return val typesafe, and create similar method for ext attrs.
+ *
+ * Returns a set of QNames representing the extensibility elements
+ * that are allowed as children of the specified parent type.
+ * Basically, this method returns the keys associated with the set
+ * of extension deserializers registered for this parent type.
+ * Returns null if no extension deserializers are registered for
+ * this parent type.
+ */
+ public Set getAllowableExtensions(Class parentType)
+ {
+ Map innerDeserializerReg = (Map)deserializerReg.get(parentType);
+
+ return (innerDeserializerReg != null)
+ ? innerDeserializerReg.keySet()
+ : null;
+ }
+
+ /**
+ * Declare that the specified extensionType is the concrete
+ * class which should be used to represent extensibility elements
+ * with qnames matching elementQN, that are intended to exist as
+ * children of the specified parentType.
+ *
+ * @param parentType a class object indicating where in the WSDL
+ * definition this extension would exist. For example,
+ * javax.wsdl.Binding.class would be used to indicate
+ * this extensibility element would be added to the list of
+ * extensibility elements belonging to a javax.wsdl.Binding,
+ * after being instantiated.
+ * @param elementType the qname of the extensibility element
+ * @param extensionType the concrete class which should be instantiated
+ *
+ * @see #createExtElement(Class, QName)
+ */
+ public void registerExtElementType(Class parentType,
+ QName elementType,
+ Class extensionType)
+ {
+ Map innerExtensionTypeReg = (Map)extElementReg.get(parentType);
+
+ if (innerExtensionTypeReg == null)
+ {
+ innerExtensionTypeReg = new Hashtable();
+
+ extElementReg.put(parentType, innerExtensionTypeReg);
+ }
+
+ innerExtensionTypeReg.put(elementType, extensionType);
+ }
+
+ /**
+ * Create an instance of the type which was declared to be used to
+ * represent extensibility elements with qnames matching elementQN,
+ * when intended to exist as children of the specified parentType.
+ * This method allows a user to instantiate an extensibility element
+ * without having to know the implementing type.
+ *
+ * @param parentType a class object indicating where in the WSDL
+ * definition this extension will exist. For example,
+ * javax.wsdl.Binding.class would be used to indicate
+ * this extensibility element is going to be added to the list of
+ * extensibility elements belonging to a javax.wsdl.Binding,
+ * after being instantiated.
+ * @param elementType the qname of the extensibility element
+ *
+ * @return a new instance of the type used to represent the
+ * specified extension
+ *
+ * @see #registerExtElementType(Class, QName, Class)
+ */
+ public ExtensionElement createExtElement(Class parentType,
+ QName elementType)
+ throws WSDLException
+ {
+ Map innerExtensionTypeReg = (Map)extElementReg.get(parentType);
+ Class extensionType = null;
+
+ if (innerExtensionTypeReg != null)
+ {
+ extensionType = (Class)innerExtensionTypeReg.get(elementType);
+ }
+
+ if (extensionType == null)
+ {
+ //TODO use ErrorReporter to get formatted error msg WSDL012
+ throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
+ "No Java extensionType found " +
+ "to represent a '" + elementType +
+ "' element in the context of a '" +
+ parentType.getName() + "'.");
+ }
+ else if (!(ExtensionElement.class.isAssignableFrom(extensionType)))
+ {
+ //TODO use ErrorReporter to get formatted error msg WSDL013
+ throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
+ "The Java extensionType '" +
+ extensionType.getName() + "' does " +
+ "not implement the ExtensibilityElement " +
+ "interface.");
+ }
+
+ try
+ {
+ ExtensionElement ee = (ExtensionElement)extensionType.newInstance();
+ /*
+ if (ee.getElementType() == null)
+ {
+ ee.setElementType(elementQN);
+ }
+ */
+
+ return ee;
+ }
+ catch (Exception e)
+ {
+ /*
+ Catches:
+ InstantiationException
+ IllegalAccessException
+ */
+ throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
+ "Problem instantiating Java " +
+ "extensionType '" + extensionType.getName() +
+ "'.",
+ e);
+ }
+ }
+
+ /**
+ * Declare that the type of the specified extension attribute, when it occurs
+ * as an attribute of the specified parent type, should be assumed to be
+ * attrType.
+ *
+ * @param ownerClass a class object indicating where in the WSDL
+ * document this extensibility attribute was encountered. For
+ * example, javax.wsdl.Binding.class would be used to indicate
+ * this attribute was defined on a <wsdl:binding> element.
+ * @param attrQName the qname of the extensibility attribute
+ * @param attrClass one of the constants defined on the AttributeExtensible
+ * class
+ *
+ * @see #queryExtAttributeType(Class, QName)
+ * @see AttributeExtensible
+ */
+ public void registerExtAttributeType(Class ownerClass,
+ QName attrQName,
+ Class attrClass)
+ {
+ Map innerExtensionAttributeReg =
+ (Map)extAttributeReg.get(ownerClass);
+
+ if (innerExtensionAttributeReg == null)
+ {
+ innerExtensionAttributeReg = new Hashtable();
+
+ extAttributeReg.put(ownerClass, innerExtensionAttributeReg);
+ }
+
+ innerExtensionAttributeReg.put(attrQName, attrClass);
+ }
+
+ /**
+ * Look up the type of the extensibility attribute with the specified qname,
+ * which was defined on an element represented by the specified parent class.
+ *
+ * @param parentClass a class object indicating where in the WSDL
+ * document this extensibility attribute was encountered. For
+ * example, javax.wsdl.Binding.class would be used to indicate
+ * this attribute was defined on a <wsdl:binding> element.
+ * @param attrQN the qname of the extensibility attribute
+ *
+ * @return one of the constants defined on the AttributeExtensible class
+ *
+ * @see #registerExtAttributeType(Class, QName, Class)
+ * @see AttributeExtensible
+ */
+ public Class queryExtAttributeType(Class parentClass, QName attrQN)
+ {
+ Map innerExtensionAttributeReg =
+ (Map)extAttributeReg.get(parentClass);
+ Class attrClass = null;
+
+ if (innerExtensionAttributeReg != null)
+ {
+ attrClass = (Class)innerExtensionAttributeReg.get(attrQN);
+ }
+
+ return attrClass;
+ }
+
+ public XMLAttr createExtAttribute(Class ownerClass, QName attrQName, XMLElement ownerElement, String attrValue)
+ throws WSDLException
+ {
+ Map innerExtensionAttributeReg = (Map)extAttributeReg.get(ownerClass);
+ Class implClass = null;
+ XMLAttr attr = null;
+
+ if (innerExtensionAttributeReg != null)
+ {
+ implClass = (Class)innerExtensionAttributeReg.get(attrQName);
+ }
+
+ if (implClass == null)
+ {
+ /*
+ * Implementations MAY register a default class to handle unknown extension attributes,
+ * which will be retrieved here from the Extension Registry. For example, the
+ * StringAttr implementation class may be registered as the default.
+ *
+ * TODO TBC, then add this info to javadoc and user docs. See sample code in PopulatedExtReg.
+ */
+ implClass = queryExtAttributeType(WSDLElement.class,
+ new QName("http://ws.apache.org/woden", "DefaultAttr"));
+
+ //If no default Java class is registered, use the UnknownAttr class.
+ if(implClass == null) implClass = UnknownAttr.class;
+
+
+ //Decided it is not necessary to report WSDL010 as a warning to the user,
+ //however we will keep the message code for now in case we add logging capability
+ //later and can capture it in a log (i.e. pull vs. push diagnositic information)
+
+ /* TODO the following line was replaced by null in the reportError call below
+ * to avoid an API build problem for Milestone 2. This must be fixed, post-M2.
+ * e.g. provide some creator for error locator that hides the Impl class.
+ *
+ * new ErrorLocatorImpl(), //TODO line/col nos.
+ *
+ getErrorReporter().reportError(
+ null, //see comment above
+ "WSDL010",
+ new Object[] {attrQName.toString(),
+ ownerClass.getName(),
+ implClass.getName()},
+ ErrorReporter.SEVERITY_WARNING);
+ */
+ }
+ else if (!(XMLAttr.class.isAssignableFrom(implClass)))
+ {
+ String msg = getErrorReporter().getFormattedMessage("WSDL011",
+ new Object[] {attrQName.toString()});
+ throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL011: " + msg);
+ }
+
+ try {
+ Class[] ctorParms = new Class[] {XMLElement.class, QName.class, String.class, ErrorReporter.class};
+ Constructor ctor = implClass.getConstructor(ctorParms);
+ Object[] ctorParmValues = new Object[] {ownerElement, attrQName, attrValue, getErrorReporter()};
+ attr = (XMLAttr)ctor.newInstance(ctorParmValues);
+ }
+ catch (Exception e) {
+ //SecurityException
+ //NoSuchMethodException
+ //InvocationTargetException
+ //InstantiationException
+ //IllegalAccessException
+ String msg = getErrorReporter().getFormattedMessage("WSDL009",
+ new Object[] {implClass.getName()});
+ throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL009: " + msg, e);
+ }
+
+ return attr;
+ }
+
+ /**
+ * Register the Java class which will represent extensions from a specified
+ * namespace that will extend the specified WSDL component class.
+ *
+ * @param parentClass the WSDL component class
+ * @param extNamespace the extension namespace
+ * @param compExtClass the Java class representing these extensions
+ */
+ public void registerComponentExtension(Class parentClass,
+ URI extNamespace,
+ Class compExtClass)
+ {
+ if(!(ComponentExtensions.class.isAssignableFrom(compExtClass)))
+ {
+ String msg = getErrorReporter().getFormattedMessage("WSDL016",
+ new Object[] {compExtClass.getName()});
+ throw new IllegalArgumentException(msg);
+ }
+
+ Map innerCompExtReg =
+ (Map)compExtReg.get(parentClass);
+
+ if (innerCompExtReg == null)
+ {
+ innerCompExtReg = new Hashtable();
+
+ compExtReg.put(parentClass, innerCompExtReg);
+ }
+
+ innerCompExtReg.put(extNamespace, compExtClass);
+ }
+
+ /**
+ * Return the Java class that represents the extensions from the specified
+ * namespace that extend the specified WSDL component class.
+ *
+ * @param parentClass the WSDL component
+ * @param extNamespace the extension namespace
+ * @return the Class of the component extensions
+ */
+ public Class queryComponentExtension(Class parentClass, URI extNamespace)
+ {
+ Map innerCompExtReg =
+ (Map)compExtReg.get(parentClass);
+ Class compExtClass = null;
+
+ if (innerCompExtReg != null)
+ {
+ compExtClass = (Class)innerCompExtReg.get(extNamespace);
+ }
+
+ return compExtClass;
+ }
+
+ /**
+ * Return the extension namespaces registered for the specified WSDL Component class.
+ *
+ * @param parentClass the class of WSDL component extended by these namespaces
+ * @return an array of namespace URIs
+ */
+ public URI[] queryComponentExtensionNamespaces(Class parentClass)
+ {
+ Map innerCompExtReg =
+ (Map)compExtReg.get(parentClass);
+
+ if (innerCompExtReg != null)
+ {
+ Set namespaceKeys = innerCompExtReg.keySet();
+ URI[] extNamespaces = new URI[namespaceKeys.size()];
+ namespaceKeys.toArray(extNamespaces);
+ return extNamespaces;
+ }
+ else
+ {
+ return new URI[0]; //return an empty array, rather than null
+ }
+
+ }
+
+ /**
+ * Return a ComponentExtensions object from the Java class registered for
+ * the specified extension namespace against the specified WSDL component class.
+ *
+ * @param parentClass the WSDL component class.
+ * @param extNamespace the extension namespace.
+ * @return a <code>ComponentExtensions</code> object
+ * @throws WSDLException if no Java class is registered for this namespace and WSDL component.
+ */
+ public ComponentExtensions createComponentExtension(Class parentClass,
+ URI extNamespace)
+ throws WSDLException
+ {
+ Class compExtClass = queryComponentExtension(parentClass, extNamespace);
+
+ if(compExtClass == null)
+ {
+ String msg = getErrorReporter().getFormattedMessage("WSDL015",
+ new Object[] {extNamespace.toString(), parentClass.getName()});
+ throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL015: " + msg);
+ }
+
+ ComponentExtensions compExt = null;
+
+ try {
+ compExt = (ComponentExtensions)compExtClass.newInstance();
+ }
+ catch (InstantiationException e)
+ {
+ String msg = getErrorReporter().getFormattedMessage("WSDL009",
+ new Object[] {compExtClass.getName()});
+ throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL009: " + msg, e);
+ }
+ catch (IllegalAccessException e) {
+ String msg = getErrorReporter().getFormattedMessage("WSDL009",
+ new Object[] {compExtClass.getName()});
+ throw new WSDLException(WSDLException.CONFIGURATION_ERROR, "WSDL009: " + msg, e);
+ }
+
+ return compExt;
+ }
+
}
Propchange: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionRegistry.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionSerializer.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionSerializer.java?rev=568932&r1=568931&r2=568932&view=diff
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionSerializer.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionSerializer.java Thu Aug 23 04:01:23 2007
@@ -1,60 +1,60 @@
-/**
+/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.woden.wsdl20.extensions;
-
-import java.io.PrintWriter;
-
-import javax.xml.namespace.QName;
-
-import org.apache.woden.WSDLException;
-import org.apache.woden.wsdl20.xml.DescriptionElement;
-
-/**
- * This interface should be implemented by classes which serialize
- * extension-specific instances of ExtensibilityElement into the
- * PrintWriter.
- * <p>
- * Copied from WSDL4J.
- *
- * @author Matthew J. Duftler (duftler@us.ibm.com)
- */
-public interface ExtensionSerializer
-{
- /**
- * This method serializes extension-specific instances of
- * ExtensibilityElement into the PrintWriter.
- *
- * @param parentType a class object indicating where in the WSDL
- * definition this extension was encountered. For
- * example, javax.wsdl.Binding.class would be used to indicate
- * this extensibility element was found in the list of
- * extensibility elements belonging to a javax.wsdl.Binding.
- * @param elementType the qname of the extensibility element
- * @param extension the extensibility element to serialize
- * @param pw the print writer on which to serialize the extension
- * @param desc the description element this extensibility element was
- * encountered in
- * @param extReg the ExtensionRegistry to use (if needed again)
- */
- public void marshall(Class parentType,
- QName elementType,
- ExtensionElement extension,
- PrintWriter pw,
- DescriptionElement desc,
- ExtensionRegistry extReg)
- throws WSDLException;
+ *
+ * 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.woden.wsdl20.extensions;
+
+import java.io.PrintWriter;
+
+import javax.xml.namespace.QName;
+
+import org.apache.woden.WSDLException;
+import org.apache.woden.wsdl20.xml.DescriptionElement;
+
+/**
+ * This interface should be implemented by classes which serialize
+ * extension-specific instances of ExtensibilityElement into the
+ * PrintWriter.
+ * <p>
+ * Copied from WSDL4J.
+ *
+ * @author Matthew J. Duftler (duftler@us.ibm.com)
+ */
+public interface ExtensionSerializer
+{
+ /**
+ * This method serializes extension-specific instances of
+ * ExtensibilityElement into the PrintWriter.
+ *
+ * @param parentType a class object indicating where in the WSDL
+ * definition this extension was encountered. For
+ * example, javax.wsdl.Binding.class would be used to indicate
+ * this extensibility element was found in the list of
+ * extensibility elements belonging to a javax.wsdl.Binding.
+ * @param elementType the qname of the extensibility element
+ * @param extension the extensibility element to serialize
+ * @param pw the print writer on which to serialize the extension
+ * @param desc the description element this extensibility element was
+ * encountered in
+ * @param extReg the ExtensionRegistry to use (if needed again)
+ */
+ public void marshall(Class parentType,
+ QName elementType,
+ ExtensionElement extension,
+ PrintWriter pw,
+ DescriptionElement desc,
+ ExtensionRegistry extReg)
+ throws WSDLException;
}
Propchange: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/ExtensionSerializer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/InterfaceOperationExtensions.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/InterfaceOperationExtensions.java?rev=568932&r1=568931&r2=568932&view=diff
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/InterfaceOperationExtensions.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/InterfaceOperationExtensions.java Thu Aug 23 04:01:23 2007
@@ -1,39 +1,39 @@
-/**
+/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.woden.wsdl20.extensions;
-
-/**
- * <code>InterfaceOperationExtensions</code> represents the WSDL 2.0
- * predefined extensions, as specified on Part 2: Adjuncts, for the Interface
- * Operation component.
- *
- * The only predefined extension property is:
- * {safety}
- *
- * @author Arthur Ryman (ryman@ca.ibm.com)
- *
- */
-public interface InterfaceOperationExtensions extends ComponentExtensions {
-
- /*
- * Returns the value of the {safety} extension property of Interface
- * Operation as defined by the wsdlx:safe attribute.
- */
- public boolean isSafety();
-
-}
+ *
+ * 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.woden.wsdl20.extensions;
+
+/**
+ * <code>InterfaceOperationExtensions</code> represents the WSDL 2.0
+ * predefined extensions, as specified on Part 2: Adjuncts, for the Interface
+ * Operation component.
+ *
+ * The only predefined extension property is:
+ * {safety}
+ *
+ * @author Arthur Ryman (ryman@ca.ibm.com)
+ *
+ */
+public interface InterfaceOperationExtensions extends ComponentExtensions {
+
+ /*
+ * Returns the value of the {safety} extension property of Interface
+ * Operation as defined by the wsdlx:safe attribute.
+ */
+ public boolean isSafety();
+
+}
Propchange: incubator/woden/trunk/java/src/org/apache/woden/wsdl20/extensions/InterfaceOperationExtensions.java
------------------------------------------------------------------------------
svn:eol-style = native
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org