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 sa...@apache.org on 2009/09/01 07:49:07 UTC

svn commit: r809831 [7/10] - in /webservices/woden/trunk/java/woden-commons: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/woden/ src/main/java/org/apache/woden/internal/ src/main/java/org/apache...

Added: webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/rpc/RPCInterfaceOperationExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/rpc/RPCInterfaceOperationExtensionsImpl.java?rev=809831&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/rpc/RPCInterfaceOperationExtensionsImpl.java (added)
+++ webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/rpc/RPCInterfaceOperationExtensionsImpl.java Tue Sep  1 05:49:02 2009
@@ -0,0 +1,100 @@
+/**
+ * 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.internal.wsdl20.extensions.rpc;
+
+import java.net.URI;
+
+import org.apache.woden.ErrorReporter;
+import org.apache.woden.wsdl20.WSDLComponent;
+import org.apache.woden.wsdl20.extensions.BaseComponentExtensionContext;
+import org.apache.woden.wsdl20.extensions.WSDLExtensionConstants;
+import org.apache.woden.wsdl20.extensions.ExtensionProperty;
+import org.apache.woden.wsdl20.extensions.rpc.Argument;
+import org.apache.woden.wsdl20.extensions.rpc.RPCConstants;
+import org.apache.woden.wsdl20.extensions.rpc.RPCInterfaceOperationExtensions;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.apache.woden.xml.ArgumentArrayAttr;
+import org.apache.woden.xml.BooleanAttr;
+
+/**
+ * This class defines the properties from the WSDL RPC extensions namespace
+ * added to the WSDL <code>Interface Operation</code> component as part of the
+ * WSDL RPC extension defined by the WSDL 2.0 spec.
+ * 
+ * @author Arthur Ryman (ryman@ca.ibm.com)
+ */
+
+public class RPCInterfaceOperationExtensionsImpl extends BaseComponentExtensionContext
+        implements RPCInterfaceOperationExtensions {
+
+    public RPCInterfaceOperationExtensionsImpl(WSDLComponent parent, 
+            URI extNamespace, ErrorReporter errReporter) {
+        
+        super(parent, extNamespace, errReporter);
+    }
+    
+    /* ************************************************************
+     *  Methods declared by ComponentExtensionContext
+     *  
+     *  These are the abstract methods inherited from BaseComponentExtensionContext,
+     *  to be implemented by this subclass.
+     * ************************************************************/
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperties()
+     */
+    public ExtensionProperty[] getProperties() {
+        return new ExtensionProperty[] {getProperty(RPCConstants.PROP_RPC_SIGNATURE)};
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperty(java.lang.String)
+     */
+    public ExtensionProperty getProperty(String propertyName) {
+        
+        if(RPCConstants.PROP_RPC_SIGNATURE.equals(propertyName) ) {
+            return newExtensionProperty(RPCConstants.PROP_RPC_SIGNATURE,
+                    getRPCSignature());
+        } else {
+            return null; //the specified property name does not exist
+        }
+    }
+    
+    /* ************************************************************
+     *  Additional methods declared by RPCInterfaceOperationExtensions
+     * ************************************************************/
+    
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.woden.wsdl20.extensions.rpc.RPCInterfaceOperationExtensions#getRPCSignature()
+	 */
+	public Argument[] getRPCSignature() {
+
+		ArgumentArrayAttr args = (ArgumentArrayAttr) ((WSDLElement)getParent())
+				.getExtensionAttribute(RPCConstants.Q_ATTR_RPC_SIGNATURE);
+
+		if (args == null)
+			return new Argument[0];
+
+		return args.getArgumentArray();
+	}
+
+}

Added: webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingExtensionsImpl.java?rev=809831&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingExtensionsImpl.java (added)
+++ webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingExtensionsImpl.java Tue Sep  1 05:49:02 2009
@@ -0,0 +1,213 @@
+/**
+ * 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.internal.wsdl20.extensions.soap;
+
+import java.net.URI;
+
+import org.apache.woden.ErrorReporter;
+import org.apache.woden.wsdl20.WSDLComponent;
+import org.apache.woden.wsdl20.extensions.BaseComponentExtensionContext;
+import org.apache.woden.wsdl20.extensions.ExtensionElement;
+import org.apache.woden.wsdl20.extensions.ExtensionProperty;
+import org.apache.woden.wsdl20.extensions.http.HTTPConstants;
+import org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensions;
+import org.apache.woden.wsdl20.extensions.soap.SOAPConstants;
+import org.apache.woden.wsdl20.extensions.soap.SOAPModule;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.apache.woden.xml.BooleanAttr;
+import org.apache.woden.xml.StringAttr;
+import org.apache.woden.xml.URIAttr;
+
+/**
+ * This class defines the properties from the SOAP namespace
+ * added to the WSDL <code>Binding</code> component as part 
+ * of the SOAP binding extension defined by the WSDL 2.0 spec. 
+ * 
+ * @author jkaputin@apache.org
+ */
+public class SOAPBindingExtensionsImpl extends BaseComponentExtensionContext
+                                       implements SOAPBindingExtensions 
+{
+
+    public SOAPBindingExtensionsImpl(WSDLComponent parent, 
+            URI extNamespace, ErrorReporter errReporter) {
+        
+        super(parent, extNamespace, errReporter);
+    }
+    
+    /* ************************************************************
+     *  Methods declared by ComponentExtensionContext
+     *  
+     *  These are the abstract methods inherited from BaseComponentExtensionContext,
+     *  to be implemented by this subclass.
+     * ************************************************************/
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperties()
+     */
+    public ExtensionProperty[] getProperties() {
+        
+        return new ExtensionProperty[] {
+                getProperty(SOAPConstants.PROP_SOAP_VERSION),
+                getProperty(SOAPConstants.PROP_SOAP_UNDERLYING_PROTOCOL),
+                getProperty(SOAPConstants.PROP_SOAP_MEP_DEFAULT),
+                getProperty(SOAPConstants.PROP_SOAP_MODULES)};
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperty(java.lang.String)
+     */
+    public ExtensionProperty getProperty(String propertyName) {
+        
+        if(SOAPConstants.PROP_SOAP_VERSION.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_VERSION, getSoapVersion());
+            
+        } else if(SOAPConstants.PROP_SOAP_UNDERLYING_PROTOCOL.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_UNDERLYING_PROTOCOL, 
+                    getSoapUnderlyingProtocol());
+            
+        } else if(SOAPConstants.PROP_SOAP_MEP_DEFAULT.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_MEP_DEFAULT, getSoapMepDefault());
+            
+        } else if(SOAPConstants.PROP_SOAP_MODULES.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_MODULES, getSoapModules());
+            
+        } else {
+            return null; //the specified property name does not exist
+        }
+        
+    }
+    
+    /* ************************************************************
+     *  Additional methods declared by SOAPBindingExtensions
+     * ************************************************************/
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensions#getSoapVersion()
+     */
+    public String getSoapVersion() 
+    {
+        StringAttr version = (StringAttr) ((WSDLElement)getParent())
+            .getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_VERSION);
+        return version != null ? version.getString() : "1.2";
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensions#getSoapUnderlyingProtocol()
+     */
+    public URI getSoapUnderlyingProtocol() 
+    {
+        URIAttr protocol = (URIAttr) ((WSDLElement)getParent())
+            .getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_PROTOCOL);
+        return protocol != null ? protocol.getURI() : null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensions#getSoapMepDefault()
+     */
+    public URI getSoapMepDefault() 
+    {
+        URIAttr mepDefault = (URIAttr) ((WSDLElement)getParent())
+            .getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_MEPDEFAULT);
+        return mepDefault != null ? mepDefault.getURI() : null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensions#getSoapModules()
+     */
+    public SOAPModule[] getSoapModules() 
+    {
+        ExtensionElement[] extEls = ((WSDLElement)getParent())
+            .getExtensionElementsOfType(SOAPConstants.Q_ELEM_SOAP_MODULE);
+        int len = extEls.length;
+        SOAPModule[] soapMods = new SOAPModule[len];
+        System.arraycopy(extEls, 0, soapMods, 0, len);
+        return soapMods;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensions#getHttpQueryParameterSeparatorDefault()
+     */
+    public String getHttpQueryParameterSeparatorDefault() 
+    {
+        URI protocol = getSoapUnderlyingProtocol();
+        if(protocol == null) {
+            return null;
+        }
+        
+        if( ("1.2".equals(getSoapVersion()) && protocol.toString().equals(SOAPConstants.PROTOCOL_STRING_SOAP12_HTTP)) ||
+            ("1.1".equals(getSoapVersion()) && protocol.toString().equals(SOAPConstants.PROTOCOL_STRING_SOAP11_HTTP)) )
+        {
+            StringAttr qpsDef = (StringAttr) ((WSDLElement)getParent())
+                .getExtensionAttribute(HTTPConstants.Q_ATTR_QUERY_PARAMETER_SEPARATOR_DEFAULT);
+            return qpsDef != null ? qpsDef.getString() : HTTPConstants.QUERY_SEP_AMPERSAND;
+        } 
+        else
+        {
+            return null;
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensions#isHttpCookies()
+     */
+    public Boolean isHttpCookies() 
+    {
+        URI protocol = getSoapUnderlyingProtocol();
+        if(protocol == null) {
+            return null;
+        }
+        
+        if( ("1.2".equals(getSoapVersion()) && protocol.toString().equals(SOAPConstants.PROTOCOL_STRING_SOAP12_HTTP)) ||
+            ("1.1".equals(getSoapVersion()) && protocol.toString().equals(SOAPConstants.PROTOCOL_STRING_SOAP11_HTTP)) )
+        {
+            BooleanAttr cookiesUsed = (BooleanAttr) ((WSDLElement)getParent())
+                .getExtensionAttribute(HTTPConstants.Q_ATTR_COOKIES);
+            return cookiesUsed != null ? cookiesUsed.getBoolean() : new Boolean(false); //defaults to false if omitted
+        } 
+        else 
+        {
+            return null;
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensions#getHttpContentEncodingDefault()
+     */
+    public String getHttpContentEncodingDefault() 
+    {
+        URI protocol = getSoapUnderlyingProtocol();
+        if(protocol == null) {
+            return null;
+        }
+        
+        if( ("1.2".equals(getSoapVersion()) && protocol.toString().equals(SOAPConstants.PROTOCOL_STRING_SOAP12_HTTP)) ||
+            ("1.1".equals(getSoapVersion()) && protocol.toString().equals(SOAPConstants.PROTOCOL_STRING_SOAP11_HTTP)) )
+        {
+            StringAttr ceDef = (StringAttr) ((WSDLElement)getParent())
+                .getExtensionAttribute(HTTPConstants.Q_ATTR_CONTENT_ENCODING_DEFAULT);
+            return ceDef != null ? ceDef.getString() : null;
+        } 
+        else
+        {
+            return null;
+        }
+    }
+
+}

Added: webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingFaultExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingFaultExtensionsImpl.java?rev=809831&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingFaultExtensionsImpl.java (added)
+++ webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingFaultExtensionsImpl.java Tue Sep  1 05:49:02 2009
@@ -0,0 +1,259 @@
+/**
+ * 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.internal.wsdl20.extensions.soap;
+
+import java.net.URI;
+
+import org.apache.woden.ErrorReporter;
+import org.apache.woden.internal.xml.QNameListOrTokenAnyAttrImpl;
+import org.apache.woden.internal.xml.QNameOrTokenAnyAttrImpl;
+import org.apache.woden.wsdl20.Binding;
+import org.apache.woden.wsdl20.NestedComponent;
+import org.apache.woden.wsdl20.WSDLComponent;
+import org.apache.woden.wsdl20.extensions.BaseComponentExtensionContext;
+import org.apache.woden.wsdl20.extensions.ExtensionElement;
+import org.apache.woden.wsdl20.extensions.ExtensionProperty;
+import org.apache.woden.wsdl20.extensions.http.HTTPConstants;
+import org.apache.woden.wsdl20.extensions.http.HTTPHeader;
+import org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensions;
+import org.apache.woden.wsdl20.extensions.soap.SOAPBindingFaultExtensions;
+import org.apache.woden.wsdl20.extensions.soap.SOAPConstants;
+import org.apache.woden.wsdl20.extensions.soap.SOAPFaultCode;
+import org.apache.woden.wsdl20.extensions.soap.SOAPFaultSubcodes;
+import org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlock;
+import org.apache.woden.wsdl20.extensions.soap.SOAPModule;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.apache.woden.xml.StringAttr;
+
+/**
+ * This class defines the properties from the SOAP namespace
+ * added to the WSDL <code>BindingFault</code> component as part 
+ * of the SOAP binding extension defined by the WSDL 2.0 spec. 
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public class SOAPBindingFaultExtensionsImpl extends BaseComponentExtensionContext
+                                            implements SOAPBindingFaultExtensions 
+{
+
+    public SOAPBindingFaultExtensionsImpl(WSDLComponent parent, 
+            URI extNamespace, ErrorReporter errReporter) {
+        
+        super(parent, extNamespace, errReporter);
+    }
+    
+    /* ************************************************************
+     *  Methods declared by ComponentExtensionContext
+     *  
+     *  These are the abstract methods inherited from BaseComponentExtensionContext,
+     *  to be implemented by this subclass.
+     * ************************************************************/
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperties()
+     */
+    public ExtensionProperty[] getProperties() {
+        
+        return new ExtensionProperty[] {
+                getProperty(SOAPConstants.PROP_SOAP_FAULT_CODE),
+                getProperty(SOAPConstants.PROP_SOAP_FAULT_SUBCODES),
+                getProperty(SOAPConstants.PROP_SOAP_MODULES),
+                getProperty(SOAPConstants.PROP_SOAP_HEADERS)};
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperty(java.lang.String)
+     */
+    public ExtensionProperty getProperty(String propertyName) {
+        
+        if(SOAPConstants.PROP_SOAP_FAULT_CODE.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_FAULT_CODE, getSoapFaultCode());
+            
+        } else if(SOAPConstants.PROP_SOAP_FAULT_SUBCODES.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_FAULT_SUBCODES, getSoapFaultSubcodes());
+            
+        } else if(SOAPConstants.PROP_SOAP_MODULES.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_MODULES, getSoapModules());
+            
+        } else if(SOAPConstants.PROP_SOAP_HEADERS.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_HEADERS, getSoapHeaders());
+            
+        } else {
+            return null; //the specified property name does not exist
+        }
+        
+    }
+    
+    /* ************************************************************
+     *  Additional methods declared by SOAPBindingFaultExtensions
+     * ************************************************************/
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingFaultExtensions#getSoapFaultCode()
+     */
+    public SOAPFaultCode getSoapFaultCode() 
+    {
+        /* QNameOrTokenAnyAttrImpl is the class registered for this extension attribute. Use this type 
+         * here, rather than the QNameOrTokenAttr interface, to guarantee that if the code contains an 
+         * xs:token it is of type #any.
+         */
+        QNameOrTokenAnyAttrImpl code = (QNameOrTokenAnyAttrImpl) ((WSDLElement)getParent())
+            .getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_CODE);
+        
+        if(code == null)
+        {
+            //defaults to xs:token #any if the attribute is omitted from the WSDL.
+            return SOAPFaultCode.ANY;
+        }
+
+        if(code.isToken()) {
+            return SOAPFaultCode.ANY;
+        }
+        
+        if(code.isQName())
+        {
+            return new SOAPFaultCode(code.getQName());
+        }
+        else
+        {
+            //the wsoap: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.soap.SOAPBindingFaultExtensions#getSoapFaultSubcodes()
+     */
+    public SOAPFaultSubcodes getSoapFaultSubcodes() 
+    {
+        /* QNameListOrTokenAnyAttrImpl is the class registered for this extension attribute. Use this type 
+         * here, rather than the QNameListOrTokenAttr interface, to gaurantee that if the code contains an 
+         * xs:token it is of type #any.
+         */
+        QNameListOrTokenAnyAttrImpl subcodes = (QNameListOrTokenAnyAttrImpl) ((WSDLElement)getParent())
+            .getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_SUBCODES);
+        
+        if(subcodes == null)
+        {
+            //defaults to xs:token #any if the attribute is omitted from the WSDL.
+            return SOAPFaultSubcodes.ANY;
+        }
+
+        if(subcodes.isToken()) {
+            return SOAPFaultSubcodes.ANY;
+        }
+        
+        if(subcodes.isQNameList())
+        {
+            return new SOAPFaultSubcodes(subcodes.getQNames());
+        }
+        else
+        {
+            //the wsoap:subcodes attribute contains an invalid value (i.e. not a list of 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.soap.SOAPBindingFaultExtensions#getSoapModules()
+     */
+    public SOAPModule[] getSoapModules() 
+    {
+        ExtensionElement[] extEls = ((WSDLElement)getParent())
+            .getExtensionElementsOfType(SOAPConstants.Q_ELEM_SOAP_MODULE);
+        int len = extEls.length;
+        SOAPModule[] soapMods = new SOAPModule[len];
+        System.arraycopy(extEls, 0, soapMods, 0, len);
+        return soapMods;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingFaultExtensions#getSoapHeaders()
+     */
+    public SOAPHeaderBlock[] getSoapHeaders() 
+    {
+        ExtensionElement[] extEls = ((WSDLElement)getParent())
+            .getExtensionElementsOfType(SOAPConstants.Q_ELEM_SOAP_HEADER);
+        int len = extEls.length;
+        SOAPHeaderBlock[] soapHeaders = new SOAPHeaderBlock[len];
+        System.arraycopy(extEls, 0, soapHeaders, 0, len);
+        return soapHeaders;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingFaultExtensions#getHttpContentEncoding()
+     * 
+     */
+    public String getHttpContentEncoding() 
+    {
+        Binding binding = (Binding) ((NestedComponent)getParent()).getParent();
+        SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding
+           .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
+        String version = soapBindExt.getSoapVersion();
+        URI protocol = soapBindExt.getSoapUnderlyingProtocol();
+        if(protocol == null) {
+            return null;
+        }
+        
+        if( (SOAPConstants.VERSION_1_2.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP12_HTTP)) ||
+            (SOAPConstants.VERSION_1_1.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP11_HTTP)) )
+        {
+            StringAttr contEncoding = (StringAttr) ((WSDLElement)getParent())
+               .getExtensionAttribute(HTTPConstants.Q_ATTR_CONTENT_ENCODING);
+            return contEncoding != null ? contEncoding.getString() : null;
+        } 
+        else 
+        {
+            return null;
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingFaultExtensions#getHttpHeaders()
+     */
+    public HTTPHeader[] getHttpHeaders() 
+    {
+        Binding binding = (Binding) ((NestedComponent)getParent()).getParent();
+        SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding
+           .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
+        String version = soapBindExt.getSoapVersion();
+        URI protocol = soapBindExt.getSoapUnderlyingProtocol();
+        if(protocol == null) {
+            return new HTTPHeader[0];
+        }
+        
+        if( (SOAPConstants.VERSION_1_2.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP12_HTTP)) ||
+            (SOAPConstants.VERSION_1_1.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP11_HTTP)) )
+        {
+            ExtensionElement[] extEls = ((WSDLElement)getParent())
+                .getExtensionElementsOfType(HTTPConstants.Q_ELEM_HTTP_HEADER);
+            int len = extEls.length;
+            HTTPHeader[] httpHeaders = new HTTPHeader[len];
+            System.arraycopy(extEls, 0, httpHeaders, 0, len);
+            return httpHeaders;
+        } 
+        else 
+        {
+            return new HTTPHeader[0];
+        }
+    }
+
+}

Added: webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsImpl.java?rev=809831&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsImpl.java (added)
+++ webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsImpl.java Tue Sep  1 05:49:02 2009
@@ -0,0 +1,97 @@
+/**
+ * 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.internal.wsdl20.extensions.soap;
+
+import java.net.URI;
+
+import org.apache.woden.ErrorReporter;
+import org.apache.woden.wsdl20.WSDLComponent;
+import org.apache.woden.wsdl20.extensions.BaseComponentExtensionContext;
+import org.apache.woden.wsdl20.extensions.ExtensionElement;
+import org.apache.woden.wsdl20.extensions.ExtensionProperty;
+import org.apache.woden.wsdl20.extensions.soap.SOAPBindingFaultReferenceExtensions;
+import org.apache.woden.wsdl20.extensions.soap.SOAPConstants;
+import org.apache.woden.wsdl20.extensions.soap.SOAPModule;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+
+/**
+ * This class defines the properties from the SOAP namespace
+ * added to the WSDL <code>BindingFaultReference</code> component as part 
+ * of the SOAP binding extension defined by the WSDL 2.0 spec. 
+ * 
+ * @author jkaputin@apache.org
+ */
+public class SOAPBindingFaultReferenceExtensionsImpl extends BaseComponentExtensionContext 
+                                                     implements SOAPBindingFaultReferenceExtensions 
+{
+
+    public SOAPBindingFaultReferenceExtensionsImpl(WSDLComponent parent, 
+            URI extNamespace, ErrorReporter errReporter) {
+        
+        super(parent, extNamespace, errReporter);
+    }
+    
+    /* ************************************************************
+     *  Methods declared by ComponentExtensionContext
+     *  
+     *  These are the abstract methods inherited from BaseComponentExtensionContext,
+     *  to be implemented by this subclass.
+     * ************************************************************/
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperties()
+     */
+    public ExtensionProperty[] getProperties() {
+        
+        return new ExtensionProperty[] {
+                getProperty(SOAPConstants.PROP_SOAP_MODULES)};
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperty(java.lang.String)
+     */
+    public ExtensionProperty getProperty(String propertyName) {
+        
+        if(SOAPConstants.PROP_SOAP_MODULES.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_MODULES, getSoapModules());
+            
+        } else {
+            return null; //the specified property name does not exist
+        }
+        
+    }
+    
+    /* ************************************************************
+     *  Additional methods declared by SOAPBindingFaultReferenceExtensions
+     * ************************************************************/
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingFaultReferenceExtensions#getSoapModules()
+     */
+    public SOAPModule[] getSoapModules() 
+    {
+        ExtensionElement[] extEls = ((WSDLElement)getParent())
+            .getExtensionElementsOfType(SOAPConstants.Q_ELEM_SOAP_MODULE);
+        int len = extEls.length;
+        SOAPModule[] soapMods = new SOAPModule[len];
+        System.arraycopy(extEls, 0, soapMods, 0, len);
+        return soapMods;
+    }
+
+}

Added: webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsImpl.java?rev=809831&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsImpl.java (added)
+++ webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsImpl.java Tue Sep  1 05:49:02 2009
@@ -0,0 +1,182 @@
+/**
+ * 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.internal.wsdl20.extensions.soap;
+
+import java.net.URI;
+
+import org.apache.woden.ErrorReporter;
+import org.apache.woden.wsdl20.Binding;
+import org.apache.woden.wsdl20.BindingOperation;
+import org.apache.woden.wsdl20.NestedComponent;
+import org.apache.woden.wsdl20.WSDLComponent;
+import org.apache.woden.wsdl20.extensions.BaseComponentExtensionContext;
+import org.apache.woden.wsdl20.extensions.ExtensionElement;
+import org.apache.woden.wsdl20.extensions.ExtensionProperty;
+import org.apache.woden.wsdl20.extensions.http.HTTPConstants;
+import org.apache.woden.wsdl20.extensions.http.HTTPHeader;
+import org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensions;
+import org.apache.woden.wsdl20.extensions.soap.SOAPBindingMessageReferenceExtensions;
+import org.apache.woden.wsdl20.extensions.soap.SOAPConstants;
+import org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlock;
+import org.apache.woden.wsdl20.extensions.soap.SOAPModule;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.apache.woden.xml.StringAttr;
+
+/**
+ * This class defines the properties from the SOAP namespace
+ * added to the WSDL <code>BindingMessageReference</code> component as part 
+ * of the SOAP binding extension defined by the WSDL 2.0 spec. 
+ * 
+ * @author jkaputin@apache.org
+ */
+public class SOAPBindingMessageReferenceExtensionsImpl extends BaseComponentExtensionContext 
+                                                       implements SOAPBindingMessageReferenceExtensions 
+{
+
+    public SOAPBindingMessageReferenceExtensionsImpl(WSDLComponent parent, 
+            URI extNamespace, ErrorReporter errReporter) {
+        
+        super(parent, extNamespace, errReporter);
+    }
+    
+    /* ************************************************************
+     *  Methods declared by ComponentExtensionContext
+     *  
+     *  These are the abstract methods inherited from BaseComponentExtensionContext,
+     *  to be implemented by this subclass.
+     * ************************************************************/
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperties()
+     */
+    public ExtensionProperty[] getProperties() {
+        
+        return new ExtensionProperty[] {
+                getProperty(SOAPConstants.PROP_SOAP_MODULES),
+                getProperty(SOAPConstants.PROP_SOAP_HEADERS)};
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperty(java.lang.String)
+     */
+    public ExtensionProperty getProperty(String propertyName) {
+        
+        if(SOAPConstants.PROP_SOAP_MODULES.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_MODULES, getSoapModules());
+            
+        } else if(SOAPConstants.PROP_SOAP_HEADERS.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_HEADERS, getSoapHeaders());
+            
+        } else {
+            return null; //the specified property name does not exist
+        }
+        
+    }
+    
+    /* ************************************************************
+     *  Additional methods declared by SOAPBindingFaultExtensions
+     * ************************************************************/
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingMessageReferenceExtensions#getSoapModules()
+     */
+    public SOAPModule[] getSoapModules() 
+    {
+        ExtensionElement[] extEls = ((WSDLElement)getParent())
+            .getExtensionElementsOfType(SOAPConstants.Q_ELEM_SOAP_MODULE);
+        int len = extEls.length;
+        SOAPModule[] soapMods = new SOAPModule[len];
+        System.arraycopy(extEls, 0, soapMods, 0, len);
+        return soapMods;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingMessageReferenceExtensions#getSoapHeaders()
+     */
+    public SOAPHeaderBlock[] getSoapHeaders() 
+    {
+        ExtensionElement[] extEls = ((WSDLElement)getParent())
+            .getExtensionElementsOfType(SOAPConstants.Q_ELEM_SOAP_HEADER);
+        int len = extEls.length;
+        SOAPHeaderBlock[] soapHeaders = new SOAPHeaderBlock[len];
+        System.arraycopy(extEls, 0, soapHeaders, 0, len);
+        return soapHeaders;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingMessageReferenceExtensions#getHttpContentEncoding()
+     * 
+     */
+    public String getHttpContentEncoding() 
+    {
+        BindingOperation bindingOp = (BindingOperation) ((NestedComponent)getParent()).getParent();
+        Binding binding = (Binding) bindingOp.getParent();
+        SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding
+           .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
+        String version = soapBindExt.getSoapVersion();
+        URI protocol = soapBindExt.getSoapUnderlyingProtocol();
+        if(protocol == null) {
+            return null;
+        }
+        
+        if( (SOAPConstants.VERSION_1_2.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP12_HTTP)) ||
+            (SOAPConstants.VERSION_1_1.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP11_HTTP)) )
+        {
+            StringAttr contEncoding = (StringAttr) ((WSDLElement)getParent())
+               .getExtensionAttribute(HTTPConstants.Q_ATTR_CONTENT_ENCODING);
+            return contEncoding != null ? contEncoding.getString() : null;
+        } 
+        else 
+        {
+            return null;
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingMessageReferenceExtensions#getHttpHeaders()
+     */
+    public HTTPHeader[] getHttpHeaders() 
+    {
+        BindingOperation bindingOp = (BindingOperation) ((NestedComponent)getParent()).getParent();
+        Binding binding = (Binding) bindingOp.getParent();
+        SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding
+           .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
+        String version = soapBindExt.getSoapVersion();
+        URI protocol = soapBindExt.getSoapUnderlyingProtocol();
+        if(protocol == null) {
+            return new HTTPHeader[0];
+        }
+        
+        if( (SOAPConstants.VERSION_1_2.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP12_HTTP)) ||
+            (SOAPConstants.VERSION_1_1.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP11_HTTP)) )
+        {
+            ExtensionElement[] extEls = ((WSDLElement)getParent())
+                .getExtensionElementsOfType(HTTPConstants.Q_ELEM_HTTP_HEADER);
+            int len = extEls.length;
+            HTTPHeader[] httpHeaders = new HTTPHeader[len];
+            System.arraycopy(extEls, 0, httpHeaders, 0, len);
+            return httpHeaders;
+        } 
+        else 
+        {
+            return new HTTPHeader[0];
+        }
+    }
+
+}

Added: webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingOperationExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingOperationExtensionsImpl.java?rev=809831&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingOperationExtensionsImpl.java (added)
+++ webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingOperationExtensionsImpl.java Tue Sep  1 05:49:02 2009
@@ -0,0 +1,219 @@
+/**
+ * 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.internal.wsdl20.extensions.soap;
+
+import java.net.URI;
+
+import org.apache.woden.ErrorReporter;
+import org.apache.woden.wsdl20.Binding;
+import org.apache.woden.wsdl20.NestedComponent;
+import org.apache.woden.wsdl20.WSDLComponent;
+import org.apache.woden.wsdl20.extensions.BaseComponentExtensionContext;
+import org.apache.woden.wsdl20.extensions.ExtensionElement;
+import org.apache.woden.wsdl20.extensions.ExtensionProperty;
+import org.apache.woden.wsdl20.extensions.http.HTTPConstants;
+import org.apache.woden.wsdl20.extensions.http.HTTPLocation;
+import org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensions;
+import org.apache.woden.wsdl20.extensions.soap.SOAPBindingOperationExtensions;
+import org.apache.woden.wsdl20.extensions.soap.SOAPConstants;
+import org.apache.woden.wsdl20.extensions.soap.SOAPModule;
+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 SOAP namespace
+ * added to the WSDL <code>BindingOperation</code> component as part 
+ * of the SOAP binding extension defined by the WSDL 2.0 spec. 
+ * 
+ * @author jkaputin@apache.org
+ */
+public class SOAPBindingOperationExtensionsImpl extends BaseComponentExtensionContext
+                                                implements SOAPBindingOperationExtensions 
+{
+
+    public SOAPBindingOperationExtensionsImpl(WSDLComponent parent, 
+            URI extNamespace, ErrorReporter errReporter) {
+        
+        super(parent, extNamespace, errReporter);
+    }
+    
+    /* ************************************************************
+     *  Methods declared by ComponentExtensionContext
+     *  
+     *  These are the abstract methods inherited from BaseComponentExtensionContext,
+     *  to be implemented by this subclass.
+     * ************************************************************/
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperties()
+     */
+    public ExtensionProperty[] getProperties() {
+        
+        return new ExtensionProperty[] {
+                getProperty(SOAPConstants.PROP_SOAP_MEP),
+                getProperty(SOAPConstants.PROP_SOAP_ACTION),
+                getProperty(SOAPConstants.PROP_SOAP_MODULES)};
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperty(java.lang.String)
+     */
+    public ExtensionProperty getProperty(String propertyName) {
+        
+        if(SOAPConstants.PROP_SOAP_MEP.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_MEP, getSoapMep());
+            
+        } else if(SOAPConstants.PROP_SOAP_ACTION.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_ACTION, getSoapAction());
+            
+        } else if(SOAPConstants.PROP_SOAP_MODULES.equals(propertyName)) {
+            return newExtensionProperty(SOAPConstants.PROP_SOAP_MODULES, getSoapModules());
+            
+        } else {
+            return null; //the specified property name does not exist
+        }
+        
+    }
+    
+    /* ************************************************************
+     *  Additional methods declared by SOAPBindingOperationExtensions
+     * ************************************************************/
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingOperationExtensions#getSoapMep()
+     */
+    public URI getSoapMep() 
+    {
+        URIAttr mep = (URIAttr) ((WSDLElement)getParent())
+            .getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_MEP);
+        return mep != null ? mep.getURI() : null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingOperationExtensions#getSoapAction()
+     */
+    public URI getSoapAction() 
+    {
+        URIAttr action = (URIAttr) ((WSDLElement)getParent())
+            .getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_ACTION);
+        return action != null ? action.getURI() : null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingOperationExtensions#getSoapModules()
+     */
+    public SOAPModule[] getSoapModules() 
+    {
+        ExtensionElement[] extEls = ((WSDLElement)getParent())
+            .getExtensionElementsOfType(SOAPConstants.Q_ELEM_SOAP_MODULE);
+        int len = extEls.length;
+        SOAPModule[] soapMods = new SOAPModule[len];
+        System.arraycopy(extEls, 0, soapMods, 0, len);
+        return soapMods;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingOperationExtensions#getHttpLocation()
+     */
+    public HTTPLocation getHttpLocation() {
+        
+        Binding binding = (Binding) ((NestedComponent)getParent()).getParent();
+        SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding
+           .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
+        String version = soapBindExt.getSoapVersion();
+        URI protocol = soapBindExt.getSoapUnderlyingProtocol();
+        if(protocol == null) {
+            return null;
+        }
+        
+        if( (SOAPConstants.VERSION_1_2.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP12_HTTP)) ||
+            (SOAPConstants.VERSION_1_1.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP11_HTTP)) )
+        {
+            StringAttr httpLoc = (StringAttr) ((WSDLElement)getParent())
+                .getExtensionAttribute(HTTPConstants.Q_ATTR_LOCATION);
+            return httpLoc != null ? new HTTPLocation(httpLoc.getString()) : null;
+        } 
+        else 
+        {
+            return null;
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingOperationExtensions#getHttpQueryParameterSeparator()
+     */
+    public String getHttpQueryParameterSeparator() {
+        
+        Binding binding = (Binding) ((NestedComponent)getParent()).getParent();
+        SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding
+           .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
+        String version = soapBindExt.getSoapVersion();
+        URI protocol = soapBindExt.getSoapUnderlyingProtocol();
+        if(protocol == null) {
+            return null;
+        }
+        
+        if( (SOAPConstants.VERSION_1_2.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP12_HTTP)) ||
+            (SOAPConstants.VERSION_1_1.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP11_HTTP)) )
+        {
+            StringAttr separator = (StringAttr) ((WSDLElement) getParent())
+                .getExtensionAttribute(HTTPConstants.Q_ATTR_QUERY_PARAMETER_SEPARATOR);
+            return separator != null ? separator.getString() : null;
+        } 
+        else 
+        {
+            return null;
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPBindingOperationExtensions#getHttpContentEncodingDefault()
+     */
+    public String getHttpContentEncodingDefault() {
+        
+        Binding binding = (Binding) ((NestedComponent)getParent()).getParent();
+        SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding
+           .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
+        String version = soapBindExt.getSoapVersion();
+        URI protocol = soapBindExt.getSoapUnderlyingProtocol();
+        if(protocol == null) {
+            return null;
+        }
+        
+        if( (SOAPConstants.VERSION_1_2.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP12_HTTP)) ||
+            (SOAPConstants.VERSION_1_1.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP11_HTTP)) )
+        {
+            StringAttr ceDef = (StringAttr) ((WSDLElement)getParent())
+               .getExtensionAttribute(HTTPConstants.Q_ATTR_CONTENT_ENCODING_DEFAULT);
+            return ceDef != null ? ceDef.getString() : null;
+        } 
+        else 
+        {
+            return null;
+        }
+    }
+    
+}

Added: webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPEndpointExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPEndpointExtensionsImpl.java?rev=809831&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPEndpointExtensionsImpl.java (added)
+++ webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPEndpointExtensionsImpl.java Tue Sep  1 05:49:02 2009
@@ -0,0 +1,151 @@
+/**
+ * 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.internal.wsdl20.extensions.soap;
+
+import java.net.URI;
+
+import org.apache.woden.ErrorReporter;
+import org.apache.woden.wsdl20.Binding;
+import org.apache.woden.wsdl20.Endpoint;
+import org.apache.woden.wsdl20.WSDLComponent;
+import org.apache.woden.wsdl20.extensions.BaseComponentExtensionContext;
+import org.apache.woden.wsdl20.extensions.ExtensionProperty;
+import org.apache.woden.wsdl20.extensions.http.HTTPAuthenticationScheme;
+import org.apache.woden.wsdl20.extensions.http.HTTPConstants;
+import org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensions;
+import org.apache.woden.wsdl20.extensions.soap.SOAPConstants;
+import org.apache.woden.wsdl20.extensions.soap.SOAPEndpointExtensions;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.apache.woden.xml.HTTPAuthenticationSchemeAttr;
+import org.apache.woden.xml.StringAttr;
+
+/**
+ * This interface represents the properties from the HTTP namespace added to the
+ * WSDL 2.0 <code>Endpoint</code> component when the binding type is SOAP and the
+ * underlying protocol is HTTP.
+ * 
+ * @author Arthur Ryman (ryman@ca.ibm.com, arthur.ryman@gmail.com)
+ * 
+ */
+public class SOAPEndpointExtensionsImpl extends BaseComponentExtensionContext
+		implements SOAPEndpointExtensions {
+
+
+    public SOAPEndpointExtensionsImpl(WSDLComponent parent, 
+            URI extNamespace, ErrorReporter errReporter) {
+        
+        super(parent, extNamespace, errReporter);
+    }
+    
+    /* ************************************************************
+     *  Methods declared by ComponentExtensionContext
+     *  
+     *  These are the abstract methods inherited from BaseComponentExtensionContext,
+     *  to be implemented by this subclass.
+     * ************************************************************/
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperties()
+     */
+    public ExtensionProperty[] getProperties() {
+        
+        return new ExtensionProperty[0]; //no SOAP extensions properties for Endpoint
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperty(java.lang.String)
+     */
+    public ExtensionProperty getProperty(String propertyName) {
+        
+        return null; //no SOAP extension properties for Endpoint
+        
+    }
+    
+    /* ************************************************************
+     *  Additional methods declared by SOAPEndpointExtensions
+     * ************************************************************/
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.woden.wsdl20.extensions.soap.SOAPEndpointExtensions#getHttpAuthenticationScheme()
+	 */
+	public HTTPAuthenticationScheme getHttpAuthenticationScheme() {
+
+        Endpoint endpoint = (Endpoint) getParent();
+        Binding binding = endpoint.getBinding();
+        if(binding == null) {
+            return null; //the wsdl is invalid  TODO - remove this check? (extensions require valid wsdl?)
+        }
+        
+        SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding
+           .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
+        String version = soapBindExt.getSoapVersion();
+        URI protocol = soapBindExt.getSoapUnderlyingProtocol();
+        if(protocol == null) {
+            return null;
+        }
+        
+        if( ("1.2".equals(version) && protocol.toString().equals(SOAPConstants.PROTOCOL_STRING_SOAP12_HTTP)) ||
+            ("1.1".equals(version) && protocol.toString().equals(SOAPConstants.PROTOCOL_STRING_SOAP11_HTTP)) )
+        {
+		    HTTPAuthenticationSchemeAttr scheme = (HTTPAuthenticationSchemeAttr) ((WSDLElement) getParent())
+				.getExtensionAttribute(HTTPConstants.Q_ATTR_AUTHENTICATION_SCHEME);
+		    return scheme != null ? scheme.getScheme() : null;
+        }
+        else
+        {
+            return null;
+        }
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.woden.wsdl20.extensions.soap.SOAPEndpointExtensions#getHttpAuthenticationRealm()
+	 */
+	public String getHttpAuthenticationRealm() {
+
+        Endpoint endpoint = (Endpoint) getParent();
+        Binding binding = endpoint.getBinding();
+        if(binding == null) {
+            return null; //the wsdl is invalid TODO - remove this check? (extensions require valid wsdl?)
+        }
+        
+        SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding
+            .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
+        String version = soapBindExt.getSoapVersion();
+        URI protocol = soapBindExt.getSoapUnderlyingProtocol();
+        if(protocol == null) {
+            return null;
+        }
+     
+        if( ("1.2".equals(version) && protocol.toString().equals(SOAPConstants.PROTOCOL_STRING_SOAP12_HTTP)) ||
+            ("1.1".equals(version) && protocol.toString().equals(SOAPConstants.PROTOCOL_STRING_SOAP11_HTTP)) )
+        {
+		    StringAttr realm = (StringAttr) ((WSDLElement) getParent())
+				.getExtensionAttribute(HTTPConstants.Q_ATTR_AUTHENTICATION_REALM);
+		    return realm != null ? realm.getString() : null;
+        }
+        else
+        {
+            return null;
+        }
+	}
+
+}

Added: webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java?rev=809831&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java (added)
+++ webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java Tue Sep  1 05:49:02 2009
@@ -0,0 +1,120 @@
+/**
+ * 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.internal.wsdl20.extensions.soap;
+
+import javax.xml.namespace.QName;
+
+import org.apache.woden.ErrorReporter;
+import org.apache.woden.WSDLException;
+import org.apache.woden.XMLElement;
+import org.apache.woden.internal.ErrorLocatorImpl;
+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.soap.SOAPConstants;
+import org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlockElement;
+import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentableElement;
+import org.apache.woden.wsdl20.xml.DocumentationElement;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+
+/**
+ * Deserializes the &lt;wsoap:header&gt; extension element into a SOAPHeaderBlockElement.
+ * 
+ * @author jkaputin@apache.org
+ *
+ */
+public class SOAPHeaderBlockDeserializer 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, 
+                                       XMLElement extEl,
+                                       DescriptionElement desc,
+                                       ExtensionRegistry extReg) 
+                                       throws WSDLException 
+    {
+        SOAPHeaderBlockElement soapHdr = 
+            (SOAPHeaderBlockElement) extReg.createExtElement(parentType, extType);
+        
+        soapHdr.setExtensionType(extType);
+        soapHdr.setParentElement((WSDLElement)parent);
+        
+        String elemDeclQN = extEl.getAttributeValue(Constants.ATTR_ELEMENT);
+        if(elemDeclQN != null)
+        {
+            try {
+                QName qname = extEl.getQName(elemDeclQN);
+                soapHdr.setElementName(qname);
+            } catch (WSDLException e) {
+                extReg.getErrorReporter().reportError( 
+                        new ErrorLocatorImpl(),  //TODO line&col nos.
+                        "WSDL505",
+                        new Object[] {elemDeclQN, extEl.getLocalName()}, 
+                        ErrorReporter.SEVERITY_ERROR);
+            }
+        }
+        
+        //This property defaults to 'false' if it is omitted.
+        String mustUnderstand = extEl.getAttributeValue(SOAPConstants.ATTR_MUSTUNDERSTAND);
+        soapHdr.setMustUnderstand(new Boolean(mustUnderstand));
+
+        //This property defaults to 'false' if it is omitted.
+        String required = extEl.getAttributeValue(Constants.ATTR_REQUIRED);
+        soapHdr.setRequired(new Boolean(required));
+
+        ((SOAPHeaderBlockImpl)soapHdr).setTypes(desc.getTypesElement());
+        
+        //TODO parseExtensionAttributes(el, SOAPHeaderBlockElement.class, soapHdr, desc);
+        
+        XMLElement tempEl = extEl.getFirstChildElement();
+
+        while (tempEl != null)
+        {
+        	if (Constants.Q_ELEM_DOCUMENTATION.equals(tempEl.getQName()))
+            {
+                soapHdr.addDocumentationElement(parseDocumentation(tempEl, desc));
+            }
+            else
+            {
+                //TODO parse ext elements
+            }
+            tempEl = tempEl.getNextSiblingElement();
+        }
+        
+        return soapHdr;
+    }
+
+    private DocumentationElement parseDocumentation(XMLElement docEl,
+                                                    DocumentableElement parent) 
+                                                    throws WSDLException
+    {
+        DocumentationElement documentation = parent.addDocumentationElement();
+        documentation.setContent(docEl);
+        
+        //TODO parseExtensionAttributes(docEl, DocumentationElement.class, documentation, desc);
+        //TODO parseExtensionElements(...)
+        
+        return documentation;
+    }
+
+}

Added: webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockImpl.java?rev=809831&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockImpl.java (added)
+++ webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockImpl.java Tue Sep  1 05:49:02 2009
@@ -0,0 +1,332 @@
+/**
+ * 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.internal.wsdl20.extensions.soap;
+
+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.wsdl20.Description;
+import org.apache.woden.wsdl20.ElementDeclaration;
+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.soap.SOAPHeaderBlock;
+import org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlockElement;
+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.TypesElement;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+import org.apache.woden.xml.XMLAttr;
+import org.apache.ws.commons.schema.XmlSchemaElement;
+
+/**
+ * This class represents the SOAPHeaderBlock Component and the &lt;wsoap:header&gt; 
+ * extension element that can appear within a Binding Fault or Binding Message 
+ * Reference.
+ * 
+ * @author jkaputin@apache.org
+ */
+public class SOAPHeaderBlockImpl implements SOAPHeaderBlock,
+                                            SOAPHeaderBlockElement 
+{
+    private WSDLElement fParent = null;
+    private List fDocumentationElements = new Vector();
+    private QName fExtElementType = null;
+    private Boolean fRequired = null;
+    private AttributeExtensibleImpl fAttrExt = new AttributeExtensibleImpl();
+    private ElementExtensibleImpl fElemExt = new ElementExtensibleImpl();
+    private QName fElementDeclQN = null;
+    private Boolean fMustUnderstand = null;
+    
+    private TypesImpl fTypes = null;
+
+
+    /* ***********************************************************************
+     *  Component model methods (SOAPHeaderBlock interface), some shared with Element model
+     * ***********************************************************************/
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlock#getElementDeclaration()
+     */
+    public ElementDeclaration getElementDeclaration() 
+    {
+        ElementDeclaration elemDecl = null;
+        Description desc = getDescriptionComponent(getParent());
+        elemDecl = desc.getElementDeclaration(fElementDeclQN);
+        return elemDecl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlock#mustUnderstand()
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlockElement#mustUnderstand()
+     */
+    public Boolean mustUnderstand() {
+        return fMustUnderstand;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlock#isRequired()
+     * @see org.apache.woden.wsdl20.extensions.ExtensionElement#isRequired()
+     */
+    public Boolean isRequired() {
+        return fRequired;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlock#getParent()
+     */
+    public WSDLComponent getParent() {
+        return (WSDLComponent)fParent;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlock#toElement()
+     */
+    public SOAPHeaderBlockElement toElement() {
+        return this;
+    }
+
+    
+    /* ***********************************************************************
+     *  Element model-only methods (SOAPHeaderBlockElement interface)
+     * ***********************************************************************/
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlockElement#setElementName(javax.xml.namespace.QName)
+     */
+    public void setElementName(QName qname) {
+        fElementDeclQN = qname;
+
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlockElement#getElementName()
+     */
+    public QName getElementName() {
+        return fElementDeclQN;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlockElement#getElement()
+     */
+    public XmlSchemaElement getElement() 
+    {
+        XmlSchemaElement xse = null;
+        if(fTypes != null) {
+            xse = fTypes.getElementDeclaration(fElementDeclQN);
+        }
+        return xse;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlockElement#setMustUnderstand(java.lang.Boolean)
+     */
+    public void setMustUnderstand(Boolean understood) {
+        fMustUnderstand = understood;
+
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlockElement#setParent(org.apache.woden.wsdl20.xml.WSDLElement)
+     */
+    public void setParentElement(WSDLElement wsdlEl) {
+        fParent = wsdlEl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlockElement#getParent()
+     */
+    public WSDLElement getParentElement() {
+        return fParent;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlockElement#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.soap.SOAPHeaderBlockElement#getDocumentationElements()
+     */
+    public DocumentationElement[] getDocumentationElements() 
+    {
+        DocumentationElement[] array = new DocumentationElement[fDocumentationElements.size()];
+        fDocumentationElements.toArray(array);
+        return array;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ExtensionElement#setElementQName(javax.xml.namespace.QName)
+     */
+    public void setExtensionType(QName qname) {
+        fExtElementType = qname;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ExtensionElement#getElementQName()
+     */
+    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;
+    }
+
+    /* ***********************************************************************
+     *  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
+     * ************************************************************/
+    
+    public void setTypes(TypesElement types) {
+        fTypes = (TypesImpl)types;
+    }
+
+    /*
+     * 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: webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java?rev=809831&view=auto
==============================================================================
--- webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java (added)
+++ webservices/woden/trunk/java/woden-commons/src/main/java/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java Tue Sep  1 05:49:02 2009
@@ -0,0 +1,118 @@
+/**
+ * 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.internal.wsdl20.extensions.soap;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.xml.namespace.QName;
+
+import org.apache.woden.ErrorReporter;
+import org.apache.woden.WSDLException;
+import org.apache.woden.XMLElement;
+import org.apache.woden.internal.ErrorLocatorImpl;
+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.soap.SOAPModuleElement;
+import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentableElement;
+import org.apache.woden.wsdl20.xml.DocumentationElement;
+import org.apache.woden.wsdl20.xml.WSDLElement;
+
+/**
+ * Deserializes the &lt;wsoap:module&gt; extension element into a SOAPModuleElement.
+ * 
+ * @author jkaputin@apache.org
+ *
+ */
+public class SOAPModuleDeserializer implements ExtensionDeserializer 
+{
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ExtensionDeserializer#unmarshall(java.lang.Class, 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 elementType,
+                                       XMLElement el,
+                                       DescriptionElement desc, 
+                                       ExtensionRegistry extReg)
+                                       throws WSDLException 
+    {
+        SOAPModuleElement soapMod = 
+            (SOAPModuleElement) extReg.createExtElement(parentType, elementType);
+        
+        soapMod.setExtensionType(elementType);
+        soapMod.setParentElement((WSDLElement)parent);
+
+        String ref = el.getAttributeValue(Constants.ATTR_REF);
+        if(ref != null) 
+        {
+            URI uri;
+            try {
+                uri = new URI(ref);
+                soapMod.setRef(uri);
+            } catch (URISyntaxException e) {
+                extReg.getErrorReporter().reportError(
+                        new ErrorLocatorImpl(),  //TODO line&col nos.
+                        "WSDL506", 
+                        new Object[] {ref}, 
+                        ErrorReporter.SEVERITY_ERROR, 
+                        e);
+            }
+        }
+        
+        //This property defaults to 'false' if it is omitted.
+        String required = el.getAttributeValue(Constants.ATTR_REQUIRED);
+        soapMod.setRequired(new Boolean(required));
+        
+        //TODO parseExtensionAttributes(el, SOAPModuleElement.class, soapMod, desc);
+        
+        XMLElement tempEl = el.getFirstChildElement();
+
+        while (tempEl != null)
+        {
+            if (Constants.Q_ELEM_DOCUMENTATION.equals(tempEl.getQName()))
+            {
+                soapMod.addDocumentationElement(parseDocumentation(tempEl, desc));
+            }
+            else
+            {
+                //TODO parse ext elements
+            }
+            tempEl = tempEl.getNextSiblingElement();
+        }
+        
+        return soapMod;
+    }
+            
+    private DocumentationElement parseDocumentation(XMLElement docEl,
+                                                    DocumentableElement parent) 
+                                                    throws WSDLException
+    {
+        DocumentationElement documentation = parent.addDocumentationElement();
+        documentation.setContent(docEl);
+        
+        //TODO parseExtensionAttributes(docEl, DocumentationElement.class, documentation, desc);
+        //TODO parseExtensionElements(...)
+        
+        return documentation;
+    }
+
+}



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