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 2006/05/30 14:12:04 UTC

svn commit: r410255 [1/2] - in /incubator/woden/java: src/org/apache/woden/internal/util/ src/org/apache/woden/internal/wsdl20/extensions/ src/org/apache/woden/internal/wsdl20/extensions/http/ src/org/apache/woden/wsdl20/extensions/http/ test/org/apach...

Author: jkaputin
Date: Tue May 30 05:12:03 2006
New Revision: 410255

URL: http://svn.apache.org/viewvc?rev=410255&view=rev
Log:
Added support for HTTP Binding Extensions:

Added interfaces and impl classes for HTTP binding extensions.
Initialize HTTP extension properties in ComponentModelBuilder.
Refactored some extensions code into ExtensionElementImpl.
Register HTTP extensions in PopulatedExtensionRegistry.
Added testcases for HTTPBindingExtensions and HTTPBindingFaultExtensions.

Added:
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/ExtensionElementImpl.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingExtensionsImpl.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingFaultExtensionsImpl.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsImpl.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingOperationExtensionsImpl.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderImpl.java
    incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingExtensions.java
    incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingFaultExtensions.java
    incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensions.java
    incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingOperationExtensions.java
    incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPErrorStatusCode.java
    incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPHeader.java
    incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPHeaderElement.java
    incubator/woden/java/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingExtensionsTest.java
    incubator/woden/java/test/org/apache/woden/wsdl20/extensions/http/HTTPBindingFaultExtensionsTest.java
    incubator/woden/java/test/org/apache/woden/wsdl20/extensions/http/resources/HTTPBindingExtensions.wsdl
    incubator/woden/java/test/org/apache/woden/wsdl20/extensions/http/resources/HTTPBindingFaultExtensions.wsdl
Modified:
    incubator/woden/java/src/org/apache/woden/internal/util/ComponentModelBuilder.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/ComponentExtensionsImpl.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/PopulatedExtensionRegistry.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPConstants.java
    incubator/woden/java/test/org/apache/woden/tests/AllWodenTests.java

Modified: incubator/woden/java/src/org/apache/woden/internal/util/ComponentModelBuilder.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/internal/util/ComponentModelBuilder.java?rev=410255&r1=410254&r2=410255&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/util/ComponentModelBuilder.java (original)
+++ incubator/woden/java/src/org/apache/woden/internal/util/ComponentModelBuilder.java Tue May 30 05:12:03 2006
@@ -70,7 +70,7 @@
  * TODO consider moving this logic inside DescriptionImpl, maybe as an inner
  * class.
  * 
- * @author jkaputin@apache.org
+ * @author John Kaputin (jkaputin@apache.org)
  * @author Arthur Ryman (ryman@ca.ibm.com) - added Interface Operation
  *         extensions
  */
@@ -371,11 +371,14 @@
 			 * been created, create one now to handle this default value.
 			 */
 			if (binding
-					.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP) == null) {
+			        .getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP) == null) 
+            {
 				ComponentExtensions compExt = createComponentExtensions(
-						Binding.class, binding, ComponentExtensions.URI_NS_SOAP);
-				binding.setComponentExtensions(ComponentExtensions.URI_NS_SOAP,
-						compExt);
+						Binding.class, 
+                        binding, 
+                        ComponentExtensions.URI_NS_SOAP);
+				binding.setComponentExtensions(
+                        ComponentExtensions.URI_NS_SOAP, compExt);
 			}
 
 			SOAPBindingExtensions sbe = (SOAPBindingExtensions) binding
@@ -390,11 +393,38 @@
 				 * not already been created, create one now to handle this
 				 * default value.
 				 */
+                if (binding
+                        .getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP) == null) 
+                {
+                    ComponentExtensions compExt = createComponentExtensions(
+                            Binding.class, 
+                            binding, 
+                            ComponentExtensions.URI_NS_HTTP);
+                    binding.setComponentExtensions(
+                            ComponentExtensions.URI_NS_HTTP, compExt);
+                }
+			}
+		}
+        
+        if (ComponentExtensions.URI_NS_HTTP.equals(binding.getType())) 
+        {
+            /* If the binding type is HTTP, the Binding extension properties
+             * {http query parameter separator default} and {http cookies} are REQUIRED
+             * so if an HTTPBindingExtensions object has not already been created,
+             * create one now to handle their default values.
+             */
+            if (binding
+                    .getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP) == null) 
+            {
+                ComponentExtensions compExt = createComponentExtensions(
+                        Binding.class, 
+                        binding, 
+                        ComponentExtensions.URI_NS_HTTP);
+                binding.setComponentExtensions(
+                        ComponentExtensions.URI_NS_HTTP, compExt);
+            }
+        }
 
-				// TODO implement this logic after HTTPBindingExtensions has
-				// been implemented.
-			}
-		}
 	}
 
 	private void buildBindingFaultExtensions(BindingFaultImpl bindFault) {
@@ -438,13 +468,33 @@
 			if (bindFault
 					.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP) == null) {
 				ComponentExtensions compExt = createComponentExtensions(
-						BindingFault.class, bindFault,
+						BindingFault.class, 
+                        bindFault,
 						ComponentExtensions.URI_NS_SOAP);
 				bindFault.setComponentExtensions(
 						ComponentExtensions.URI_NS_SOAP, compExt);
 			}
 		}
 
+        if (ComponentExtensions.URI_NS_HTTP.equals(bindingType)) 
+        {
+            /* If the binding type is HTTP, the BindingFault extension property
+             * {http error status code}, {http output serialization}, {http fault serialization}
+             * and {http location ignore uncited} are REQUIRED so if an HTTPBindingFaultExtensions
+             * object has not already been created, create one now to handle their default values.
+             */
+            if (bindFault
+                    .getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP) == null) 
+            {
+                ComponentExtensions compExt = createComponentExtensions(
+                        BindingFault.class, 
+                        bindFault,
+                        ComponentExtensions.URI_NS_HTTP);
+                bindFault.setComponentExtensions(
+                        ComponentExtensions.URI_NS_HTTP, compExt);
+            }
+        }
+        
 	}
 
 	private void buildBindingOperationExtensions(BindingOperationImpl bindOper) {
@@ -478,26 +528,23 @@
 		 */
 		URI bindingType = ((BindingElement) bindOper.getParentElement())
 				.getType();
-		if (ComponentExtensions.URI_NS_SOAP.equals(bindingType)) {
-			/*
-			 * If the binding type is HTTP then the {http input serialization}
-			 * and {http output serialization} properties have default values
-			 * defined by the HTTP Binding rules in the WSDL 2.0 Part 2 Adjuncts
-			 * spec, the {http fault serialization} property has the default
-			 * "application/xml" and the {http query parameter separator
-			 * default} property has the default "&". So if an
-			 * HTTPBindingOperationExtensions object has not already been
-			 * created, create one now to handle these default values.
-			 */
+		if (ComponentExtensions.URI_NS_HTTP.equals(bindingType)) 
+        {
+            /* If the binding type is HTTP, the BindingOperation extension properties
+             * {http input serialization}, {http output serialization}, 
+             * {http fault serialization} and {http location ignore uncited} are REQUIRED 
+             * so if an HTTPBindingOperationExtensions object has not already been created, 
+             * create one now to handle their default values.
+             */
 			if (bindOper
-					.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP) == null) {
-				// ComponentExtensions compExt =
-				// createComponentExtensions(BindingOperation.class, bindOper,
-				// ComponentExtensions.URI_NS_HTTP);
-				// bindOper.setComponentExtensions(ComponentExtensions.URI_NS_HTTP,
-				// compExt);
-				// TODO implement this logic after
-				// HTTPBindingOperationExtensions has been implemented.
+					.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP) == null) 
+            {
+                ComponentExtensions compExt = createComponentExtensions(
+                        BindingOperation.class, 
+                        bindOper,
+                        ComponentExtensions.URI_NS_HTTP);
+                bindOper.setComponentExtensions(
+                        ComponentExtensions.URI_NS_HTTP, compExt);
 			}
 		}
 	}

Modified: incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/ComponentExtensionsImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/ComponentExtensionsImpl.java?rev=410255&r1=410254&r2=410255&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/ComponentExtensionsImpl.java (original)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/ComponentExtensionsImpl.java Tue May 30 05:12:03 2006
@@ -17,6 +17,7 @@
 
 import java.net.URI;
 
+import org.apache.woden.wsdl20.WSDLComponent;
 import org.apache.woden.wsdl20.extensions.ComponentExtensions;
 import org.apache.woden.wsdl20.xml.WSDLElement;
 
@@ -27,11 +28,15 @@
  * Implementations may extend this class to define behaviour specific to 
  * their required extensions.
  * 
- * @author jkaputin@apache.org
+ * @author John Kaputin (jkaputin@apache.org)
  */
 public abstract class ComponentExtensionsImpl implements ComponentExtensions 
 {
     protected WSDLElement fParentElement = null;
+    
+    //TODO fParent added for http bindings. Refactor fParentElement to fParent.
+    protected WSDLComponent fParent = null;
+    
     private URI fNamespace = null;
 
     /* (non-Javadoc)
@@ -48,6 +53,7 @@
     public void init(WSDLElement parentElement, URI namespace)
     {
         fParentElement = parentElement;
+        fParent = (WSDLComponent)fParentElement; //TODO see todo above about refactoring fParentElement to fParent
         fNamespace = namespace;
     }
 }

Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/ExtensionElementImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/ExtensionElementImpl.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/ExtensionElementImpl.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/ExtensionElementImpl.java Tue May 30 05:12:03 2006
@@ -0,0 +1,61 @@
+/**
+ * Copyright 2006 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.woden.internal.wsdl20.extensions;
+
+import javax.xml.namespace.QName;
+
+import org.apache.woden.wsdl20.extensions.ExtensionElement;
+
+/**
+ * Common code for extension elements. 
+ * 
+ * @author jkaputin@ws.apache.org
+ */
+public class ExtensionElementImpl implements ExtensionElement 
+{
+    private QName fExtElementType = null;
+    private Boolean fRequired = null;
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ExtensionElement#setExtensionType(javax.xml.namespace.QName)
+     */
+    public void setExtensionType(QName qname) {
+        fExtElementType = qname;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ExtensionElement#getExtensionType()
+     */
+    public QName getExtensionType() {
+        return fExtElementType;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ExtensionElement#setRequired(java.lang.Boolean)
+     */
+    public void setRequired(Boolean required) {
+        fRequired = required;
+
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ExtensionElement#isRequired()
+     */
+    public Boolean isRequired() {
+        return fRequired;
+    }
+
+}

Modified: incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/PopulatedExtensionRegistry.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/PopulatedExtensionRegistry.java?rev=410255&r1=410254&r2=410255&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/PopulatedExtensionRegistry.java (original)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/PopulatedExtensionRegistry.java Tue May 30 05:12:03 2006
@@ -15,9 +15,13 @@
  */
 package org.apache.woden.internal.wsdl20.extensions;
 
+import org.apache.woden.internal.wsdl20.extensions.http.HTTPBindingExtensionsImpl;
+import org.apache.woden.internal.wsdl20.extensions.http.HTTPBindingFaultExtensionsImpl;
+import org.apache.woden.internal.wsdl20.extensions.http.HTTPConstants;
+import org.apache.woden.internal.wsdl20.extensions.http.HTTPHeaderDeserializer;
+import org.apache.woden.internal.wsdl20.extensions.http.HTTPHeaderImpl;
 import org.apache.woden.internal.wsdl20.extensions.rpc.RPCConstants;
 import org.apache.woden.internal.wsdl20.extensions.rpc.RPCInterfaceOperationExtensionsImpl;
-import org.apache.woden.internal.wsdl20.extensions.http.HTTPConstants;
 import org.apache.woden.internal.wsdl20.extensions.soap.SOAPBindingExtensionsImpl;
 import org.apache.woden.internal.wsdl20.extensions.soap.SOAPBindingFaultExtensionsImpl;
 import org.apache.woden.internal.wsdl20.extensions.soap.SOAPBindingFaultReferenceExtensionsImpl;
@@ -49,8 +53,8 @@
 import org.apache.woden.wsdl20.xml.BindingFaultReferenceElement;
 import org.apache.woden.wsdl20.xml.BindingMessageReferenceElement;
 import org.apache.woden.wsdl20.xml.BindingOperationElement;
-import org.apache.woden.wsdl20.xml.InterfaceOperationElement;
 import org.apache.woden.wsdl20.xml.EndpointElement;
+import org.apache.woden.wsdl20.xml.InterfaceOperationElement;
 
 /**
  * This class extends ExtensionRegistry and pre-registers
@@ -61,7 +65,7 @@
  * This class was copied from WSDL4J and modified for Woden.
  *
  * @author Matthew J. Duftler (duftler@us.ibm.com)
- * @author jkaputin@apache.org (Woden changes)
+ * @author John Kaputin (jkaputin@apache.org) - Woden changes
  * @author Arthur Ryman (ryman@ca.ibm.com) - added wsdlx:safe and wrpc:signature
  *         to Interface Operation
  */
@@ -70,22 +74,34 @@
     
     public PopulatedExtensionRegistry()
     {
-        // Register a default Java type for unregistered extension attributes
+        // ------------ Default type for unregistered extension attributes ------------
         
-        /* Uncomment this code if a default other than UnknownAttr is required.
-        registerExtAttributeType(
-            WSDLElement.class, new QName("http://ws.apache.org/woden", "DefaultAttr"), StringAttrImpl.class);
+        /* If a default XMLAttr type other than UnknownAttr is to be used for unregisterd attributes,
+         * uncomment this code and replace <someAttr> with the default type.
+        registerExtAttributeType(WSDLElement.class, 
+                new QName("http://ws.apache.org/woden", "DefaultAttr"), <someAttr>Impl.class);
          */
             
 		// ------------ WSDL extension attributes ------------
 		registerExtAttributeType(InterfaceOperationElement.class,
 				ExtensionConstants.Q_ATTR_SAFE, BooleanAttrImpl.class);
 
+        // ------------ WSDL Component Extensions ------------
+
+        registerComponentExtension(InterfaceOperation.class,
+                ComponentExtensions.URI_NS_EXTENSIONS,
+                InterfaceOperationExtensionsImpl.class);
+
 		// ------------ RPC extension attributes ------------
 
 		registerExtAttributeType(InterfaceOperationElement.class,
 				RPCConstants.Q_ATTR_RPC_SIGNATURE, ArgumentArrayAttrImpl.class);
 
+        // ------------ RPC Component Extensions ------------
+        registerComponentExtension(InterfaceOperation.class,
+                ComponentExtensions.URI_NS_RPC,
+                RPCInterfaceOperationExtensionsImpl.class);
+
 		//------------ SOAP extension attributes ------------ 
         
         registerExtAttributeType(
@@ -175,17 +191,7 @@
                            SOAPConstants.Q_ELEM_SOAP_HEADER,
                            SOAPHeaderBlockImpl.class);
         
-		// ------------ WSDL Component Extensions ------------
-
-		registerComponentExtension(InterfaceOperation.class,
-				ComponentExtensions.URI_NS_EXTENSIONS,
-				InterfaceOperationExtensionsImpl.class);
-
-		registerComponentExtension(InterfaceOperation.class,
-				ComponentExtensions.URI_NS_RPC,
-				RPCInterfaceOperationExtensionsImpl.class);
-
-        //------------ WSDL Component SOAP Extensions ------------ 
+        //------------ SOAP Component Extensions ------------ 
         
         registerComponentExtension(Binding.class, 
                            ComponentExtensions.URI_NS_SOAP, 
@@ -231,6 +237,9 @@
                 BindingOperationElement.class, HTTPConstants.Q_ATTR_LOCATION, URIAttrImpl.class);
                     
         registerExtAttributeType(
+                BindingOperationElement.class, HTTPConstants.Q_ATTR_IGNORE_UNCITED, BooleanAttrImpl.class);
+                    
+        registerExtAttributeType(
                 BindingOperationElement.class, HTTPConstants.Q_ATTR_METHOD, StringAttrImpl.class);
                     
         registerExtAttributeType(
@@ -257,5 +266,29 @@
         registerExtAttributeType(
                 EndpointElement.class, HTTPConstants.Q_ATTR_AUTHENTICATION_REALM, StringAttrImpl.class);
         
+        //------------ HTTPHeader extension elements ------------ 
+        
+        HTTPHeaderDeserializer httpHeaderDeser = new HTTPHeaderDeserializer();
+        
+        //registerSerializer(BindingFaultElement.class,
+        //                   HTTPConstants.Q_ELEM_HTTP_HEADER,
+        //                   <serializer to be implemented>);
+        registerDeserializer(BindingFaultElement.class,
+                           HTTPConstants.Q_ELEM_HTTP_HEADER,
+                           httpHeaderDeser);
+        registerExtElementType(BindingFaultElement.class,
+                           HTTPConstants.Q_ELEM_HTTP_HEADER,
+                           HTTPHeaderImpl.class);
+        
+        //------------ HTTP Component Extensions ------------ 
+        
+        registerComponentExtension(Binding.class, 
+                           ComponentExtensions.URI_NS_HTTP, 
+                           HTTPBindingExtensionsImpl.class);
+        
+        registerComponentExtension(BindingFault.class, 
+                ComponentExtensions.URI_NS_HTTP, 
+                HTTPBindingFaultExtensionsImpl.class);
+
     }
 }

Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingExtensionsImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingExtensionsImpl.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingExtensionsImpl.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingExtensionsImpl.java Tue May 30 05:12:03 2006
@@ -0,0 +1,76 @@
+/**
+ * Copyright 2006 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.woden.internal.wsdl20.extensions.http;
+
+import org.apache.woden.internal.wsdl20.extensions.ComponentExtensionsImpl;
+import org.apache.woden.wsdl20.extensions.http.HTTPBindingExtensions;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.apache.woden.xml.BooleanAttr;
+import org.apache.woden.xml.StringAttr;
+
+/**
+ * This class defines the properties from the HTTP namespace
+ * added to the WSDL <code>Binding</code> component as part 
+ * of the HTTP binding extension defined by the WSDL 2.0 spec. 
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public class HTTPBindingExtensionsImpl extends ComponentExtensionsImpl
+                                       implements HTTPBindingExtensions 
+{
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingExtensions#getHttpMethodDefault()
+     */
+    public String getHttpMethodDefault() 
+    {
+        StringAttr methodDef = (StringAttr) ((WSDLElement)fParent)
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_METHOD_DEFAULT);
+        return methodDef != null ? methodDef.getString() : null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingExtensions#getHttpQueryParameterSeparatorDefault()
+     */
+    public String getHttpQueryParameterSeparatorDefault() 
+    {
+        //TODO monitor ws-desc proposal 19May06 on changing handling of defaults in spec Part 2
+        StringAttr qpsDef = (StringAttr) ((WSDLElement)fParent)
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_QUERY_PARAMETER_SEPARATOR_DEFAULT);
+        return qpsDef != null ? qpsDef.getString() : HTTPConstants.QUERY_SEP_AMPERSAND;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingExtensions#isHttpCookies()
+     */
+    public Boolean isHttpCookies() 
+    {
+        BooleanAttr cookiesUsed = (BooleanAttr) ((WSDLElement)fParent)
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_COOKIES);
+        return cookiesUsed != null ? cookiesUsed.getBoolean() : new Boolean(false); //defaults to false if omitted
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingExtensions#getHttpTransferCodingDefault()
+     */
+    public String getHttpTransferCodingDefault() 
+    {
+        StringAttr tcDef = (StringAttr) ((WSDLElement)fParent)
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_TRANSFER_CODING_DEFAULT);
+        return tcDef != null ? tcDef.getString() : null;
+    }
+
+}

Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingFaultExtensionsImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingFaultExtensionsImpl.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingFaultExtensionsImpl.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingFaultExtensionsImpl.java Tue May 30 05:12:03 2006
@@ -0,0 +1,115 @@
+/**
+ * Copyright 2006 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.woden.internal.wsdl20.extensions.http;
+
+import org.apache.woden.internal.wsdl20.extensions.ComponentExtensionsImpl;
+import org.apache.woden.internal.xml.IntOrTokenAnyAttrImpl;
+import org.apache.woden.wsdl20.extensions.ExtensionElement;
+import org.apache.woden.wsdl20.extensions.http.HTTPBindingFaultExtensions;
+import org.apache.woden.wsdl20.extensions.http.HTTPErrorStatusCode;
+import org.apache.woden.wsdl20.extensions.http.HTTPHeader;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.apache.woden.xml.StringAttr;
+
+/**
+ * This class defines the properties from the HTTP namespace
+ * added to the WSDL <code>BindingFault</code> component as part 
+ * of the HTTP binding extension defined by the WSDL 2.0 spec. 
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public class HTTPBindingFaultExtensionsImpl extends ComponentExtensionsImpl
+                                            implements HTTPBindingFaultExtensions 
+{
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingFaultExtensions#getHttpErrorStatusCode()
+     */
+    public HTTPErrorStatusCode getHttpErrorStatusCode() 
+    {
+        /* IntOrTokenAnyAttrImpl is the class registered for this extension attribute. Use this type 
+         * here, rather than the IntOrTokenAttr interface, to guarantee that if the code contains an 
+         * xs:token it is of type #any.
+         */
+        IntOrTokenAnyAttrImpl code = (IntOrTokenAnyAttrImpl)
+            ((WSDLElement)fParent).getExtensionAttribute(HTTPConstants.Q_ATTR_CODE);
+        
+        if(code == null)
+        {
+            //defaults to xs:token #any if the attribute is omitted from the WSDL.
+            return HTTPErrorStatusCode.ANY;
+        }
+        else if(code.isToken()) 
+        {
+            //if IntOrTokenAnyAttrImpl contains a token then is must be '#any'
+            return HTTPErrorStatusCode.ANY;
+        }
+        else if(code.isInt())
+        {
+            return new HTTPErrorStatusCode(code.getInt());
+        }
+        else
+        {
+            //the whttp:code attribute contains an invalid value (i.e. not an xs:QName or the xs:token #any)
+            //TODO confirm if this should be represented in the Component model as a null
+            return null;
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingFaultExtensions#getHttpTransferCoding()
+     * 
+     * TODO check response to ws-desc posting 26May06 about whether this should default to 
+     * BindingOperation {http transfer coding default} as stated in the spec. For now, have
+     * assumed that it defaults to Binding {http transfer coding default}
+     */
+    public String getHttpTransferCoding() 
+    {
+        StringAttr tfrCoding = (StringAttr) ((WSDLElement)fParent)
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_TRANSFER_CODING);
+        if(tfrCoding != null) {
+            return tfrCoding.getString();
+        }
+        
+        /*TODO resolve transfer coding issues with the spec, rather than making the following assumption
+         * 
+        //if transfer coding is null, return the transfer coding default in Binding
+        Binding binding = (Binding) ((BindingFault)fParent).getParent();
+        HTTPBindingExtensions httpBindExts = (HTTPBindingExtensions)
+            binding.getComponentExtensionsForNamespace(HTTPConstants.NS_URI_HTTP);
+        
+        //Binding has REQUIRED HTTP extension properties so HTTPBindingExtensions must be 
+        //present (i.e. no need to check for null httpBindExts).
+        return httpBindExts.getHttpTransferCodingDefault();
+         */
+        
+        return null; //TODO conforms to the current spec, but pending resolution of issues via ws-desc mailing list
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingFaultExtensions#getHttpHeaders()
+     */
+    public HTTPHeader[] getHttpHeaders() 
+    {
+        ExtensionElement[] extEls =  ((WSDLElement)fParent)
+            .getExtensionElementsOfType(HTTPConstants.Q_ELEM_HTTP_HEADER);
+        int len = extEls.length;
+        HTTPHeader[] httpHeaders = new HTTPHeader[len];
+        System.arraycopy(extEls, 0, httpHeaders, 0, len);
+        return httpHeaders;
+    }
+
+}

Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsImpl.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsImpl.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsImpl.java Tue May 30 05:12:03 2006
@@ -0,0 +1,61 @@
+/**
+ * Copyright 2006 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.woden.internal.wsdl20.extensions.http;
+
+import org.apache.woden.internal.wsdl20.extensions.ComponentExtensionsImpl;
+import org.apache.woden.wsdl20.extensions.ExtensionElement;
+import org.apache.woden.wsdl20.extensions.http.HTTPBindingMessageReferenceExtensions;
+import org.apache.woden.wsdl20.extensions.http.HTTPHeader;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.apache.woden.xml.StringAttr;
+
+/**
+ * This class defines the properties from the HTTP namespace
+ * added to the WSDL <code>BindingMessageReference</code> component as part 
+ * of the HTTP binding extension defined by the WSDL 2.0 spec. 
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public class HTTPBindingMessageReferenceExtensionsImpl extends ComponentExtensionsImpl 
+                                          implements HTTPBindingMessageReferenceExtensions 
+{
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingMessageReferenceExtensions#getHttpTransferCoding()
+     * 
+     * TODO posted to ws-desc 26May06 about whether this should default to BindingOperation {http transfer coding default}
+     */
+    public String getHttpTransferCoding() 
+    {
+        StringAttr tfrCoding = (StringAttr) ((WSDLElement)fParent)
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_TRANSFER_CODING);
+        return tfrCoding != null ? tfrCoding.getString() : null; 
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingMessageReferenceExtensions#getHttpHeaders()
+     */
+    public HTTPHeader[] getHttpHeaders() 
+    {
+        ExtensionElement[] extEls =  ((WSDLElement)fParent)
+            .getExtensionElementsOfType(HTTPConstants.Q_ELEM_HTTP_HEADER);
+        int len = extEls.length;
+        HTTPHeader[] httpHeaders = new HTTPHeader[len];
+        System.arraycopy(extEls, 0, httpHeaders, 0, len);
+        return httpHeaders;
+    }
+
+}

Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingOperationExtensionsImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingOperationExtensionsImpl.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingOperationExtensionsImpl.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingOperationExtensionsImpl.java Tue May 30 05:12:03 2006
@@ -0,0 +1,190 @@
+/**
+ * Copyright 2006 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.woden.internal.wsdl20.extensions.http;
+
+import java.net.URI;
+
+import org.apache.woden.internal.wsdl20.extensions.ComponentExtensionsImpl;
+import org.apache.woden.internal.wsdl20.extensions.ExtensionConstants;
+import org.apache.woden.wsdl20.Binding;
+import org.apache.woden.wsdl20.BindingOperation;
+import org.apache.woden.wsdl20.InterfaceOperation;
+import org.apache.woden.wsdl20.extensions.InterfaceOperationExtensions;
+import org.apache.woden.wsdl20.extensions.http.HTTPBindingExtensions;
+import org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.apache.woden.xml.StringAttr;
+import org.apache.woden.xml.URIAttr;
+
+/**
+ * This class defines the properties from the HTTP namespace
+ * added to the WSDL <code>BindingOperation</code> component as part 
+ * of the HTTP binding extension defined by the WSDL 2.0 spec. 
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public class HTTPBindingOperationExtensionsImpl extends ComponentExtensionsImpl
+                                                implements HTTPBindingOperationExtensions 
+{
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions#getHttpLocation()
+     */
+    public URI getHttpLocation() 
+    {
+        URIAttr httpLoc = (URIAttr) ((WSDLElement)fParent)
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_LOCATION);
+        return httpLoc != null ? httpLoc.getURI() : null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions#getHttpMethod()
+     * 
+     * 1. If whttp:method is present on the binding operation use it. 
+     * 2. Otherwise, if whttp:methodDefault is present on the binding use it. 
+     * 3. Otherwise, if the {safety} extension property of InterfaceOperation is 'true' return "GET".
+     * 4. Otherwise, return "POST"
+     */
+    public String getHttpMethod() 
+    {
+        String method = null;
+        
+        //1. try whttp:method
+        StringAttr methodAttr = (StringAttr) ((WSDLElement)fParent)
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_METHOD);
+        if(methodAttr != null) 
+        {
+            return methodAttr.getString();
+        }
+        
+        //2. try whttp:methodDefault
+        
+        Binding binding = (Binding) ((BindingOperation)fParent).getParent();
+        
+        HTTPBindingExtensions httpBindExts = (HTTPBindingExtensions)
+            binding.getComponentExtensionsForNamespace(HTTPConstants.NS_URI_HTTP);
+        
+        //no need to check for a null httpBindExts because Binding has REQUIRED http extension properties
+        String methodDef = httpBindExts.getHttpMethodDefault();
+        if(methodDef != null) {
+            return methodDef;
+        }
+        
+        /* 3. try {safety}
+         * 
+         * To get here via the Woden programming model the Component model must
+         * have been initialized correctly (i.e. the Description component can be
+         * referenced from the Binding), so it's safe to cast the parent
+         * binding operation element to a BindingOperation component.
+         */
+        InterfaceOperation intOper = ((BindingOperation)fParent).getInterfaceOperation();
+        if(intOper != null)
+        {
+            InterfaceOperationExtensions intOperExts = (InterfaceOperationExtensions)
+                intOper.getComponentExtensionsForNamespace(
+                        URI.create(ExtensionConstants.NS_URI_WSDL_EXTENSIONS));
+            if(intOperExts != null && intOperExts.isSafety()) 
+            {
+                return HTTPConstants.METHOD_GET;
+            } 
+        }
+        
+        //TODO Default POST not in spec yet, but confirmed via ws-desc posting 30May06. Remove this todo when spec updated.
+        return HTTPConstants.METHOD_POST; 
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions#getHttpInputSerialization()
+     */
+    public String getHttpInputSerialization() 
+    {
+        StringAttr serialization = (StringAttr) ((WSDLElement)fParent)
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_INPUT_SERIALIZATION);
+        if(serialization != null) 
+        {
+            return serialization.getString();
+        }
+        
+        String method = getHttpMethod();
+        if(method.equals(HTTPConstants.METHOD_GET) ||
+           method.equals(HTTPConstants.METHOD_DELETE))
+        {
+            return HTTPConstants.SERIAL_APP_URLENCODED;
+        }
+        else
+        {
+            //method is not GET or DELETE so it must be POST or PUT. 
+            //TODO confirm ws-desc proposal 19May06 on {http method}
+            return HTTPConstants.SERIAL_APP_XML;
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions#getHttpOutputSerialization()
+     */
+    public String getHttpOutputSerialization() 
+    {
+        StringAttr serialization = (StringAttr) ((WSDLElement)fParent)
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_OUTPUT_SERIALIZATION);
+        return serialization != null ? serialization.getString() 
+                                     : HTTPConstants.SERIAL_APP_XML; 
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions#getHttpFaultSerialization()
+     */
+    public String getHttpFaultSerialization() 
+    {
+        StringAttr serialization = (StringAttr) ((WSDLElement)fParent)
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_FAULT_SERIALIZATION);
+        return serialization != null ? serialization.getString() 
+                                     : HTTPConstants.SERIAL_APP_XML;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions#getHttpQueryParameterSeparator()
+     */
+    public String getHttpQueryParameterSeparator() 
+    {
+        // Implemented per Part 2 spec as at 25May06 but...
+        // TODO monitor ws-desc proposal 19May06 on changing the handling of defaults Part 2
+        
+        StringAttr separator = (StringAttr) ((WSDLElement)fParent)
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_QUERY_PARAMETER_SEPARATOR);
+        if(separator != null) {
+            return separator.getString();
+        }
+        
+        Binding binding = (Binding) ((BindingOperation)fParent).getParent();
+    
+        HTTPBindingExtensions httpBindExts = (HTTPBindingExtensions)
+            binding.getComponentExtensionsForNamespace(HTTPConstants.NS_URI_HTTP);
+        
+        //{http query parameter separator default} is a REQUIRED extension property
+        //so HTTPBindingExtensions must be present (i.e. no need to check for null).
+        return httpBindExts.getHttpQueryParameterSeparatorDefault();
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions#getHttpTransferCodingDefault()
+     */
+    public String getHttpTransferCodingDefault() 
+    {
+        StringAttr tfrCodingDef = (StringAttr) ((WSDLElement)fParent)
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_TRANSFER_CODING_DEFAULT);
+        return tfrCodingDef != null ? tfrCodingDef.getString() : null;
+    }
+
+}

Modified: incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPConstants.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPConstants.java?rev=410255&r1=410254&r2=410255&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPConstants.java (original)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPConstants.java Tue May 30 05:12:03 2006
@@ -15,17 +15,21 @@
  */
 package org.apache.woden.internal.wsdl20.extensions.http;
 
+import java.net.URI;
+
 import javax.xml.namespace.QName;
 
 /**
- * @author jkaputin@apache.org
+ * @author John Kaputin (jkaputin@apache.org)
  */
 public class HTTPConstants 
 {
     // Namespace URIs.
-    public static final String NS_URI_HTTP =
+    public static final String NS_STRING_HTTP =
         "http://www.w3.org/2006/01/wsdl/http";
     
+    public static final URI NS_URI_HTTP = URI.create(NS_STRING_HTTP);
+    
     // Element names.
     public static final String ELEM_HEADER = "header";
 
@@ -35,6 +39,7 @@
     public static final String ATTR_CODE = "code";
     public static final String ATTR_COOKIES = "cookies";
     public static final String ATTR_FAULT_SERIALIZATION = "faultSerialization";
+    public static final String ATTR_IGNORE_UNCITED = "ignoreUncited";
     public static final String ATTR_INPUT_SERIALIZATION = "inputSerialization";
     public static final String ATTR_LOCATION = "location";
     public static final String ATTR_METHOD = "method";
@@ -51,50 +56,68 @@
     // Qualified element names.
     
     public static final QName Q_ELEM_HTTP_HEADER =
-        new QName(NS_URI_HTTP, ELEM_HEADER, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ELEM_HEADER, PFX_WHTTP);
 
     // Qualified attribute names.
     
     public static final QName Q_ATTR_AUTHENTICATION_REALM =
-        new QName(NS_URI_HTTP, ATTR_AUTHENTICATION_REALM, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ATTR_AUTHENTICATION_REALM, PFX_WHTTP);
       
     public static final QName Q_ATTR_AUTHENTICATION_TYPE =
-        new QName(NS_URI_HTTP, ATTR_AUTHENTICATION_TYPE, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ATTR_AUTHENTICATION_TYPE, PFX_WHTTP);
       
     public static final QName Q_ATTR_CODE =
-        new QName(NS_URI_HTTP, ATTR_CODE, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ATTR_CODE, PFX_WHTTP);
       
     public static final QName Q_ATTR_COOKIES =
-        new QName(NS_URI_HTTP, ATTR_COOKIES, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ATTR_COOKIES, PFX_WHTTP);
       
     public static final QName Q_ATTR_FAULT_SERIALIZATION =
-        new QName(NS_URI_HTTP, ATTR_FAULT_SERIALIZATION, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ATTR_FAULT_SERIALIZATION, PFX_WHTTP);
+      
+    public static final QName Q_ATTR_IGNORE_UNCITED =
+        new QName(NS_STRING_HTTP, ATTR_IGNORE_UNCITED, PFX_WHTTP);
       
     public static final QName Q_ATTR_INPUT_SERIALIZATION =
-        new QName(NS_URI_HTTP, ATTR_INPUT_SERIALIZATION, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ATTR_INPUT_SERIALIZATION, PFX_WHTTP);
       
     public static final QName Q_ATTR_LOCATION =
-        new QName(NS_URI_HTTP, ATTR_LOCATION, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ATTR_LOCATION, PFX_WHTTP);
       
     public static final QName Q_ATTR_METHOD =
-        new QName(NS_URI_HTTP, ATTR_METHOD, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ATTR_METHOD, PFX_WHTTP);
       
     public static final QName Q_ATTR_METHOD_DEFAULT =
-        new QName(NS_URI_HTTP, ATTR_METHOD_DEFAULT, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ATTR_METHOD_DEFAULT, PFX_WHTTP);
       
     public static final QName Q_ATTR_OUTPUT_SERIALIZATION =
-        new QName(NS_URI_HTTP, ATTR_OUTPUT_SERIALIZATION, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ATTR_OUTPUT_SERIALIZATION, PFX_WHTTP);
       
     public static final QName Q_ATTR_QUERY_PARAMETER_SEPARATOR =
-        new QName(NS_URI_HTTP, ATTR_QUERY_PARAMETER_SEPARATOR, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ATTR_QUERY_PARAMETER_SEPARATOR, PFX_WHTTP);
       
     public static final QName Q_ATTR_QUERY_PARAMETER_SEPARATOR_DEFAULT =
-        new QName(NS_URI_HTTP, ATTR_QUERY_PARAMETER_SEPARATOR_DEFAULT, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ATTR_QUERY_PARAMETER_SEPARATOR_DEFAULT, PFX_WHTTP);
       
     public static final QName Q_ATTR_TRANSFER_CODING =
-        new QName(NS_URI_HTTP, ATTR_TRANSFER_CODING, PFX_WHTTP);
+        new QName(NS_STRING_HTTP, ATTR_TRANSFER_CODING, PFX_WHTTP);
       
     public static final QName Q_ATTR_TRANSFER_CODING_DEFAULT =
-        new QName(NS_URI_HTTP, ATTR_TRANSFER_CODING_DEFAULT, PFX_WHTTP);
-      
+        new QName(NS_STRING_HTTP, ATTR_TRANSFER_CODING_DEFAULT, PFX_WHTTP);
+    
+    //{http method} constants
+    
+    public static final String METHOD_GET = "GET";
+    public static final String METHOD_POST = "POST";
+    public static final String METHOD_PUT = "PUT";
+    public static final String METHOD_DELETE = "DELETE";
+    
+    
+    //{input/output serialization} constants
+    
+    public static final String SERIAL_APP_URLENCODED = "application/x-www-form-urlencoded";
+    public static final String SERIAL_APP_XML = "application/xml";
+
+    public static final String QUERY_SEP_AMPERSAND = "&";
+
 }

Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java Tue May 30 05:12:03 2006
@@ -0,0 +1,97 @@
+/**
+ * Copyright 2005, 2006 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.woden.internal.wsdl20.extensions.http;
+
+import javax.xml.namespace.QName;
+
+import org.apache.woden.ErrorReporter;
+import org.apache.woden.WSDLException;
+import org.apache.woden.internal.ErrorLocatorImpl;
+import org.apache.woden.internal.util.dom.DOMUtils;
+import org.apache.woden.internal.wsdl20.Constants;
+import org.apache.woden.wsdl20.extensions.ExtensionDeserializer;
+import org.apache.woden.wsdl20.extensions.ExtensionElement;
+import org.apache.woden.wsdl20.extensions.ExtensionRegistry;
+import org.apache.woden.wsdl20.extensions.http.HTTPHeaderElement;
+import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentationElement;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.w3c.dom.Element;
+
+/**
+ * Deserializes the &lt;whttp:header&gt; extension element into a HTTPHeaderElement.
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ *
+ */
+public class HTTPHeaderDeserializer implements ExtensionDeserializer {
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ExtensionDeserializer#unmarshall(java.lang.Class, java.lang.Object, javax.xml.namespace.QName, org.w3c.dom.Element, org.apache.woden.wsdl20.xml.DescriptionElement, org.apache.woden.wsdl20.extensions.ExtensionRegistry)
+     */
+    public ExtensionElement unmarshall(Class parentType, 
+                                       Object parent,
+                                       QName extType, 
+                                       Element extEl, 
+                                       DescriptionElement desc,
+                                       ExtensionRegistry extReg) 
+                                       throws WSDLException 
+    {
+        HTTPHeaderElement httpHdr = 
+            (HTTPHeaderElement) extReg.createExtElement(parentType, extType);
+        
+        httpHdr.setExtensionType(extType);
+        httpHdr.setParentElement((WSDLElement)parent);
+        
+        String name = DOMUtils.getAttribute(extEl, Constants.ATTR_NAME);
+        httpHdr.setName(name);
+        
+        String typeQN = DOMUtils.getAttribute(extEl, Constants.ATTR_TYPE);
+        if(typeQN != null)
+        {
+            try {
+                QName qname = DOMUtils.getQName(typeQN, extEl, desc);
+                httpHdr.setTypeName(qname);
+            } catch (WSDLException e) {
+                extReg.getErrorReporter().reportError( 
+                        new ErrorLocatorImpl(),  //TODO line&col nos.
+                        "WSDL505",
+                        new Object[] {typeQN, extEl.getLocalName()}, 
+                        ErrorReporter.SEVERITY_ERROR);
+            }
+        }
+
+        //TRUE if attribute is "true", FALSE if it is "false", omitted or non-boolean.
+        String required = DOMUtils.getAttribute(extEl, Constants.ATTR_REQUIRED);
+        httpHdr.setRequired(new Boolean(required));
+        
+        return httpHdr;
+    }
+
+    private DocumentationElement parseDocumentation(Element docEl, 
+                                                    DescriptionElement desc) 
+                                                    throws WSDLException
+    {
+        DocumentationElement documentation = desc.createDocumentationElement();
+        documentation.setContent(docEl);
+        
+        //TODO parseExtensionAttributes(docEl, DocumentationElement.class, documentation, desc);
+        //TODO parseExtensionElements(...)
+        
+        return documentation;
+    }
+
+}

Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderImpl.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderImpl.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderImpl.java Tue May 30 05:12:03 2006
@@ -0,0 +1,309 @@
+/**
+ * Copyright 2006 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.woden.internal.wsdl20.extensions.http;
+
+import java.net.URI;
+import java.util.List;
+import java.util.Vector;
+
+import javax.xml.namespace.QName;
+
+import org.apache.woden.internal.wsdl20.BindingImpl;
+import org.apache.woden.internal.wsdl20.TypesImpl;
+import org.apache.woden.internal.wsdl20.extensions.AttributeExtensibleImpl;
+import org.apache.woden.internal.wsdl20.extensions.ElementExtensibleImpl;
+import org.apache.woden.internal.wsdl20.extensions.ExtensionElementImpl;
+import org.apache.woden.wsdl20.Description;
+import org.apache.woden.wsdl20.NestedComponent;
+import org.apache.woden.wsdl20.TypeDefinition;
+import org.apache.woden.wsdl20.WSDLComponent;
+import org.apache.woden.wsdl20.extensions.ExtensionElement;
+import org.apache.woden.wsdl20.extensions.http.HTTPHeader;
+import org.apache.woden.wsdl20.extensions.http.HTTPHeaderElement;
+import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentationElement;
+import org.apache.woden.wsdl20.xml.NestedElement;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.apache.woden.xml.XMLAttr;
+import org.apache.ws.commons.schema.XmlSchemaType;
+
+/**
+ * This class represents the HTTPHeader Component and the &lt;whttp:header&gt; 
+ * extension element that can appear within a Binding Fault or Binding Message 
+ * Reference.
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public class HTTPHeaderImpl implements HTTPHeader, HTTPHeaderElement 
+{
+    private WSDLElement fParent = null;
+    private List fDocumentationElements = new Vector();
+    private ExtensionElement fExtElem = new ExtensionElementImpl();
+    private AttributeExtensibleImpl fAttrExt = new AttributeExtensibleImpl();
+    private ElementExtensibleImpl fElemExt = new ElementExtensibleImpl();
+    private String fName = null;
+    private QName fTypeName = null;
+
+    /* ***********************************************************************
+     *  Component model methods (HTTPHeader interface), some shared with Element model
+     * ***********************************************************************/
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeader#getName()
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeaderElement#getName()
+     */
+    public String getName() {
+        return fName;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeader#getTypeDefinition()
+     */
+    public TypeDefinition getTypeDefinition() 
+    {
+        TypeDefinition typeDef = null;
+        Description desc = getDescriptionComponent(getParent());
+        typeDef = desc.getTypeDefinition(fTypeName);
+        return typeDef;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeader#isRequired()
+     * @see org.apache.woden.wsdl20.extensions.ExtensionElement#isRequired()
+     */
+    public Boolean isRequired() {
+        return fExtElem.isRequired();
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeader#getParent()
+     */
+    public WSDLComponent getParent() {
+        return (WSDLComponent)fParent;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeader#toElement()
+     */
+    public HTTPHeaderElement toElement() {
+        return this;
+    }
+
+    /* ***********************************************************************
+     *  Element model-only methods (HTTPHeaderElement interface)
+     * ***********************************************************************/
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeaderElement#setName(java.lang.String)
+     */
+    public void setName(String name) {
+        fName = name;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeaderElement#setTypeName(javax.xml.namespace.QName)
+     */
+    public void setTypeName(QName qname) {
+        fTypeName = qname;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeaderElement#getTypeName()
+     */
+    public QName getTypeName() {
+        return fTypeName;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeaderElement#getType()
+     */
+    public XmlSchemaType getType() 
+    {
+        XmlSchemaType xst = null;
+        DescriptionElement desc = getDescriptionElement(getParentElement());
+        TypesImpl types = (TypesImpl)desc.getTypesElement();
+        if(types != null) {
+            xst = types.getTypeDefinition(fTypeName);
+        }
+        return xst;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeaderElement#setParentElement(org.apache.woden.wsdl20.xml.WSDLElement)
+     */
+    public void setParentElement(WSDLElement wsdlEl) {
+        fParent = wsdlEl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeaderElement#getParentElement()
+     */
+    public WSDLElement getParentElement() {
+        return fParent;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeaderElement#addDocumentationElement(org.apache.woden.wsdl20.xml.DocumentationElement)
+     */
+    public void addDocumentationElement(DocumentationElement docEl) {
+        if(docEl != null) {
+            fDocumentationElements.add(docEl);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.http.HTTPHeaderElement#getDocumentationElements()
+     */
+    public DocumentationElement[] getDocumentationElements() {
+        DocumentationElement[] array = new DocumentationElement[fDocumentationElements.size()];
+        fDocumentationElements.toArray(array);
+        return array;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ExtensionElement#setExtensionType(javax.xml.namespace.QName)
+     */
+    public void setExtensionType(QName qname) {
+        fExtElem.setExtensionType(qname);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ExtensionElement#getExtensionType()
+     */
+    public QName getExtensionType() {
+        return fExtElem.getExtensionType();
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ExtensionElement#setRequired(java.lang.Boolean)
+     */
+    public void setRequired(Boolean required) {
+        fExtElem.setRequired(required);
+    }
+
+    /* ***********************************************************************
+     *  Extensibility methods
+     * ***********************************************************************/
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.AttributeExtensible#setExtensionAttribute(javax.xml.namespace.QName, org.apache.woden.xml.XMLAttr)
+     */
+    public void setExtensionAttribute(QName attrType, XMLAttr attr) {
+        fAttrExt.setExtensionAttribute(attrType, attr);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.AttributeExtensible#getExtensionAttribute(javax.xml.namespace.QName)
+     */
+    public XMLAttr getExtensionAttribute(QName attrType) {
+        return fAttrExt.getExtensionAttribute(attrType);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.AttributeExtensible#getExtensionAttributesForNamespace(java.net.URI)
+     */
+    public XMLAttr[] getExtensionAttributesForNamespace(URI namespace) {
+        return fAttrExt.getExtensionAttributesForNamespace(namespace);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.AttributeExtensible#getExtensionAttributes()
+     */
+    public XMLAttr[] getExtensionAttributes() {
+        return fAttrExt.getExtensionAttributes();
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.AttributeExtensible#hasExtensionAttributesForNamespace(java.net.URI)
+     */
+    public boolean hasExtensionAttributesForNamespace(URI namespace) {
+        return fAttrExt.hasExtensionAttributesForNamespace(namespace);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ElementExtensible#addExtensionElement(org.apache.woden.wsdl20.extensions.ExtensionElement)
+     */
+    public void addExtensionElement(ExtensionElement extEl) {
+        fElemExt.addExtensionElement(extEl);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ElementExtensible#removeExtensionElement(org.apache.woden.wsdl20.extensions.ExtensionElement)
+     */
+    public void removeExtensionElement(ExtensionElement extEl) {
+        fElemExt.removeExtensionElement(extEl);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ElementExtensible#getExtensionElements()
+     */
+    public ExtensionElement[] getExtensionElements() {
+        return fElemExt.getExtensionElements();
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ElementExtensible#getExtensionElementsOfType(javax.xml.namespace.QName)
+     */
+    public ExtensionElement[] getExtensionElementsOfType(QName extType) {
+        return fElemExt.getExtensionElementsOfType(extType);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ElementExtensible#hasExtensionElementsForNamespace(java.net.URI)
+     */
+    public boolean hasExtensionElementsForNamespace(URI namespace) {
+        return fElemExt.hasExtensionElementsForNamespace(namespace);
+    }
+
+    /* ************************************************************
+     *  Non-API implementation methods
+     * ************************************************************/
+    
+    /*
+     * This method traverses up the element graph to get the root <description>.
+     * TODO consider its usefulness to user-defined extensions and whether to refactor it.
+     * e.g. declared in ExtensionElement and implemented in ExtensionElementImpl
+     */
+    private DescriptionElement getDescriptionElement(WSDLElement wsdlElem)
+    {
+        if(wsdlElem instanceof BindingImpl) 
+        {
+            return (DescriptionElement) ((NestedElement)wsdlElem).getParentElement();
+        }
+        else
+        {
+            WSDLElement parentElem = ((NestedElement)wsdlElem).getParentElement();
+            return getDescriptionElement(parentElem);
+        }
+    }
+    
+    /* 
+     * TODO ditto previous comment about possibly refactoring this for user-defined extensions to reuse. 
+     */
+    private Description getDescriptionComponent(WSDLComponent wsdlComp)
+    {
+        if(wsdlComp instanceof BindingImpl) 
+        {
+            return ((BindingImpl)wsdlComp).getDescriptionComponent();
+        }
+        else 
+        {
+            WSDLComponent parentComp = ((NestedComponent)wsdlComp).getParent();
+            return getDescriptionComponent(parentComp);
+        } 
+    }
+    
+}

Added: incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingExtensions.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingExtensions.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingExtensions.java (added)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingExtensions.java Tue May 30 05:12:03 2006
@@ -0,0 +1,45 @@
+/**
+ * Copyright 2006 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.woden.wsdl20.extensions.http;
+
+import org.apache.woden.wsdl20.extensions.ComponentExtensions;
+
+/**
+ * This interface represents the properties from the HTTP namespace
+ * added to the WSDL 2.0 <code>Binding</code> component as part 
+ * of the HTTP binding extension. 
+ * <p>
+ * These include:
+ * <ul>
+ * <li>{http method default}</li>
+ * <li>{http query parameter separator default}</li>
+ * <li>{http cookies}</li>
+ * <li>{http transfer coding default}</li>
+ * </ul> 
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public interface HTTPBindingExtensions extends ComponentExtensions 
+{
+    public String getHttpMethodDefault();
+    
+    public String getHttpQueryParameterSeparatorDefault();
+    
+    public Boolean isHttpCookies(); //TODO consider whether this convention is ok
+    
+    public String getHttpTransferCodingDefault();
+    
+}

Added: incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingFaultExtensions.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingFaultExtensions.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingFaultExtensions.java (added)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingFaultExtensions.java Tue May 30 05:12:03 2006
@@ -0,0 +1,42 @@
+/**
+ * Copyright 2006 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.woden.wsdl20.extensions.http;
+
+import org.apache.woden.wsdl20.extensions.ComponentExtensions;
+
+/**
+ * This interface represents the properties from the HTTP namespace
+ * added to the WSDL 2.0 <code>BindingFault</code> component as part 
+ * of the HTTP binding extension. 
+ * <p>
+ * These include:
+ * <ul>
+ * <li>{http error status code}</li>
+ * <li>{http transfer coding}</li>
+ * <li>{http headers}</li>
+ * </ul> 
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public interface HTTPBindingFaultExtensions extends ComponentExtensions 
+{
+    public HTTPErrorStatusCode getHttpErrorStatusCode();
+    
+    public String getHttpTransferCoding();
+    
+    public HTTPHeader[] getHttpHeaders();
+    
+}

Added: incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensions.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensions.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensions.java (added)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensions.java Tue May 30 05:12:03 2006
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2006 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.woden.wsdl20.extensions.http;
+
+import org.apache.woden.wsdl20.extensions.ComponentExtensions;
+
+/**
+ * This interface represents the properties from the HTTP namespace
+ * added to the WSDL 2.0 <code>BindingMessageReference</code> component as part 
+ * of the HTTP binding extension. 
+ * <p>
+ * These include:
+ * <ul>
+ * <li>{http transfer coding}</li>
+ * <li>{http headers}</li>
+ * </ul> 
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public interface HTTPBindingMessageReferenceExtensions extends ComponentExtensions 
+{
+    /**
+     * @return String the {http transfer coding} property, represented by the whttp:transferCoding extension attribute
+     */
+    public String getHttpTransferCoding();
+    
+    /**
+     * @return HTTPHeader[] the {http headers} property, represented by an array of 
+     * HTTPHeader extension components, which map to whttp:header elements.
+     */
+    public HTTPHeader[] getHttpHeaders();
+    
+}

Added: incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingOperationExtensions.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingOperationExtensions.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingOperationExtensions.java (added)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingOperationExtensions.java Tue May 30 05:12:03 2006
@@ -0,0 +1,77 @@
+/**
+ * Copyright 2006 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.woden.wsdl20.extensions.http;
+
+import java.net.URI;
+
+import org.apache.woden.wsdl20.extensions.ComponentExtensions;
+
+/**
+ * This interface represents the properties from the HTTP namespace
+ * added to the WSDL 2.0 <code>BindingOperation</code> component as part 
+ * of the HTTP binding extension. 
+ * <p>
+ * These include:
+ * <ul>
+ * <li>{http location}</li>
+ * <li>{http method}</li>
+ * <li>{http input serialization}</li>
+ * <li>{http output serialization}</li>
+ * <li>{http fault serialization}</li>
+ * <li>{http query parameter separator}</li>
+ * <li>{http transfer coding default}</li>
+ * </ul> 
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public interface HTTPBindingOperationExtensions extends ComponentExtensions 
+{
+    /**
+     * @return URI the {http location} property, represented by the whttp:location extension attribute
+     */
+    public URI getHttpLocation();
+    
+    /**
+     * @return String the {http method} property, represented by the whttp:method extension attribute
+     */
+    public String getHttpMethod();
+    
+    /**
+     * @return String the {http input serialization} property, represented by the whttp:inputSerialization extension attribute
+     */
+    public String getHttpInputSerialization();
+    
+    /**
+     * @return String the {http output serialization} property, represented by the whttp:outputSerialization extension attribute
+     */
+    public String getHttpOutputSerialization();
+    
+    /**
+     * @return String the {http fault serialization} property, represented by the whttp:faultSerialization extension attribute
+     */
+    public String getHttpFaultSerialization();
+    
+    /**
+     * @return String the {http query parameter separator}, represented by the whttp:queryParameterSeparator extension attribute
+     */
+    public String getHttpQueryParameterSeparator();
+    
+    /**
+     * @return String the {http transfer coding default}, represented by the whttp:transferCodingDefault extension attribute
+     */
+    public String getHttpTransferCodingDefault();
+    
+}

Added: incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPErrorStatusCode.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPErrorStatusCode.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPErrorStatusCode.java (added)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPErrorStatusCode.java Tue May 30 05:12:03 2006
@@ -0,0 +1,55 @@
+/**
+ * Copyright 2006 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.woden.wsdl20.extensions.http;
+
+
+/**
+ * This class represents the {http error status code} property that forms part of the 
+ * HTTP extensions to the WSDL <code>BindingFault</code> component.
+ * This property may contain either an integer representing the error status code used
+ * with this fault or the xs:token #any indicating that no claim is made by the service
+ * about the use of error status codes.
+ * <p>
+ * It provides methods to query whether the property specifies an error status code
+ * (i.e. an integer) and to retrieve the property value.
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public class HTTPErrorStatusCode 
+{
+    private final String fToken;
+    private final Integer fCode;
+    public static final HTTPErrorStatusCode ANY = new HTTPErrorStatusCode("#any");
+    
+    private HTTPErrorStatusCode(String token) 
+    { 
+        fToken = token; 
+        fCode = null;
+    }
+    
+    public HTTPErrorStatusCode(Integer errorStatusCode) 
+    { 
+        fToken = null; 
+        fCode = errorStatusCode;
+    }
+    
+    public boolean isCodeUsed() {return fCode != null;}
+    
+    public Integer getCode() {return fCode;}
+    
+    public String toString() {return isCodeUsed() ? fCode.toString() : fToken;}
+    
+}

Added: incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPHeader.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPHeader.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPHeader.java (added)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPHeader.java Tue May 30 05:12:03 2006
@@ -0,0 +1,39 @@
+/**
+ * Copyright 2006 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.woden.wsdl20.extensions.http;
+
+import org.apache.woden.wsdl20.TypeDefinition;
+import org.apache.woden.wsdl20.WSDLComponent;
+
+/**
+ * This interface represents the HTTPHeader Component that can appear in the
+ * optional {http headers} property of the WSDL 2.0 components BindingFault 
+ * and BindingMessageReference.
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public interface HTTPHeader 
+{
+    public String getName();
+    
+    public TypeDefinition getTypeDefinition();
+    
+    public Boolean isRequired();
+    
+    public WSDLComponent getParent();
+    
+    public HTTPHeaderElement toElement();
+}

Added: incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPHeaderElement.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPHeaderElement.java?rev=410255&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPHeaderElement.java (added)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/extensions/http/HTTPHeaderElement.java Tue May 30 05:12:03 2006
@@ -0,0 +1,54 @@
+/**
+ * Copyright 2006 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.woden.wsdl20.extensions.http;
+
+import javax.xml.namespace.QName;
+
+import org.apache.woden.wsdl20.extensions.AttributeExtensible;
+import org.apache.woden.wsdl20.extensions.ElementExtensible;
+import org.apache.woden.wsdl20.extensions.ExtensionElement;
+import org.apache.woden.wsdl20.xml.DocumentationElement;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.apache.ws.commons.schema.XmlSchemaType;
+
+/**
+ * This interface represents the &lt;whttp:header&gt; extension element that 
+ * can appear within a Binding Fault or Binding Message Reference.
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public interface HTTPHeaderElement extends ExtensionElement,
+                                           AttributeExtensible, 
+                                           ElementExtensible 
+{
+    public void setName(String name);
+    
+    public String getName();
+    
+    public void setTypeName(QName qname);
+    
+    public QName getTypeName();
+    
+    public XmlSchemaType getType();
+    
+    public void setParentElement(WSDLElement wsdlEl);
+    
+    public WSDLElement getParentElement();
+
+    public void addDocumentationElement(DocumentationElement docEl);
+    
+    public DocumentationElement[] getDocumentationElements();
+}

Modified: incubator/woden/java/test/org/apache/woden/tests/AllWodenTests.java
URL: http://svn.apache.org/viewvc/incubator/woden/java/test/org/apache/woden/tests/AllWodenTests.java?rev=410255&r1=410254&r2=410255&view=diff
==============================================================================
--- incubator/woden/java/test/org/apache/woden/tests/AllWodenTests.java (original)
+++ incubator/woden/java/test/org/apache/woden/tests/AllWodenTests.java Tue May 30 05:12:03 2006
@@ -25,6 +25,8 @@
 import org.apache.woden.internal.ReaderFeaturesTest;
 import org.apache.woden.internal.wsdl20.validation.WSDLComponentValidatorTest;
 import org.apache.woden.internal.wsdl20.validation.WSDLDocumentValidatorTest;
+import org.apache.woden.wsdl20.extensions.http.HTTPBindingExtensionsTest;
+import org.apache.woden.wsdl20.extensions.http.HTTPBindingFaultExtensionsTest;
 import org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensionsTest;
 import org.apache.woden.wsdl20.extensions.soap.SOAPBindingFaultExtensionsTest;
 import org.apache.woden.wsdl20.extensions.soap.SOAPBindingFaultReferenceExtensionsTest;
@@ -85,6 +87,9 @@
     addTest(SOAPBindingOperationExtensionsTest.suite());
     addTest(SOAPBindingMessageReferenceExtensionsTest.suite());
     addTest(SOAPBindingFaultReferenceExtensionsTest.suite());
+    addTest(HTTPBindingExtensionsTest.suite());
+    addTest(HTTPBindingFaultExtensionsTest.suite());
+    //TODO in-progress 30May06 tests for BindingOpExt and BindingMsgRefExt
   }
 	
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org