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 2008/02/04 08:21:32 UTC

svn commit: r618183 [1/2] - in /webservices/woden/branches/woden47/src/org/apache/woden: ant/ internal/ internal/wsdl20/ internal/wsdl20/extensions/ internal/wsdl20/extensions/http/ internal/wsdl20/extensions/rpc/ internal/wsdl20/extensions/soap/ wsdl2...

Author: jkaputin
Date: Sun Feb  3 23:21:25 2008
New Revision: 618183

URL: http://svn.apache.org/viewvc?rev=618183&view=rev
Log:
WODEN-47
Committed changes for the new extensions model,
removing references to ComponentExtensions and
replacing these with ComponentExtensionContext 
and adding support for PropertyExtensible which
provides generic accessor methods for
ExtensionProperty objects.

Modified:
    webservices/woden/branches/woden47/src/org/apache/woden/ant/CmExtensionsWriter.java
    webservices/woden/branches/woden47/src/org/apache/woden/ant/CmWriter.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/Messages.properties
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/ComponentModelBuilder.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/WSDLComponentImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/InterfaceOperationExtensionsImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/PopulatedExtensionRegistry.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingExtensionsImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingFaultExtensionsImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingOperationExtensionsImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPEndpointExtensionsImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/rpc/RPCInterfaceOperationExtensionsImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingExtensionsImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingFaultExtensionsImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingOperationExtensionsImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPEndpointExtensionsImpl.java
    webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/WSDLComponent.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/ExtensionRegistry.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/InterfaceOperationExtensions.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingExtensions.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingFaultExtensions.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensions.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/http/HTTPBindingOperationExtensions.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/http/HTTPEndpointExtensions.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/rpc/RPCInterfaceOperationExtensions.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/soap/SOAPBindingExtensions.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultExtensions.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensions.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensions.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/soap/SOAPBindingOperationExtensions.java
    webservices/woden/branches/woden47/src/org/apache/woden/wsdl20/extensions/soap/SOAPEndpointExtensions.java

Modified: webservices/woden/branches/woden47/src/org/apache/woden/ant/CmExtensionsWriter.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/ant/CmExtensionsWriter.java?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/ant/CmExtensionsWriter.java (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/ant/CmExtensionsWriter.java Sun Feb  3 23:21:25 2008
@@ -47,7 +47,7 @@
 
         out.beginElement(WSDL_INTERFACE_OPERATION_EXTENSION);
 
-        out.write(SAFETY, extensions.isSafety());
+        out.write(SAFETY, extensions.isSafe());
 
         out.endElement();
     }

Modified: webservices/woden/branches/woden47/src/org/apache/woden/ant/CmWriter.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/ant/CmWriter.java?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/ant/CmWriter.java (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/ant/CmWriter.java Sun Feb  3 23:21:25 2008
@@ -40,18 +40,22 @@
 import org.apache.woden.wsdl20.Service;
 import org.apache.woden.wsdl20.TypeDefinition;
 import org.apache.woden.wsdl20.extensions.ComponentExtensions;
+import org.apache.woden.wsdl20.extensions.WSDLExtensionConstants;
 import org.apache.woden.wsdl20.extensions.InterfaceOperationExtensions;
 import org.apache.woden.wsdl20.extensions.http.HTTPBindingExtensions;
 import org.apache.woden.wsdl20.extensions.http.HTTPBindingFaultExtensions;
 import org.apache.woden.wsdl20.extensions.http.HTTPBindingMessageReferenceExtensions;
 import org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions;
+import org.apache.woden.wsdl20.extensions.http.HTTPConstants;
 import org.apache.woden.wsdl20.extensions.http.HTTPEndpointExtensions;
+import org.apache.woden.wsdl20.extensions.rpc.RPCConstants;
 import org.apache.woden.wsdl20.extensions.rpc.RPCInterfaceOperationExtensions;
 import org.apache.woden.wsdl20.extensions.soap.SOAPBindingExtensions;
 import org.apache.woden.wsdl20.extensions.soap.SOAPBindingFaultExtensions;
 import org.apache.woden.wsdl20.extensions.soap.SOAPBindingFaultReferenceExtensions;
 import org.apache.woden.wsdl20.extensions.soap.SOAPBindingMessageReferenceExtensions;
 import org.apache.woden.wsdl20.extensions.soap.SOAPBindingOperationExtensions;
+import org.apache.woden.wsdl20.extensions.soap.SOAPConstants;
 import org.apache.woden.wsdl20.extensions.soap.SOAPEndpointExtensions;
 
 /**
@@ -126,9 +130,9 @@
         attributes += cmbase.idAttribute(component);
         out.beginElement("descriptionComponent", attributes);
 
-        URI[] extensions = { ComponentExtensions.NS_URI_WSDL_EXTENSIONS,
-                ComponentExtensions.NS_URI_HTTP,
-                ComponentExtensions.NS_URI_RPC, ComponentExtensions.NS_URI_SOAP };
+        URI[] extensions = { WSDLExtensionConstants.NS_URI_WSDL_EXTENSIONS,
+                HTTPConstants.NS_URI_HTTP,
+                RPCConstants.NS_URI_RPC, SOAPConstants.NS_URI_SOAP };
 
         cmbase.writeUris("extensions", extensions);
         write("interfaces", component.getInterfaces());
@@ -271,11 +275,11 @@
         cmbase.parent(component.getParent());
 
         InterfaceOperationExtensions extensions = (InterfaceOperationExtensions) component
-                .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_WSDL_EXTENSIONS);
+                .getComponentExtensionContext(WSDLExtensionConstants.NS_URI_WSDL_EXTENSIONS);
         cmextensions.wsdlInterfaceOperationExtension(extensions);
 
         RPCInterfaceOperationExtensions rpcExtensions = (RPCInterfaceOperationExtensions) component
-                .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_RPC);
+                .getComponentExtensionContext(RPCConstants.NS_URI_RPC);
         cmrpc.rpcInterfaceOperationExtension(rpcExtensions);
 
         out.endElement();
@@ -407,11 +411,11 @@
         write("bindingOperations", component.getBindingOperations());
 
         HTTPBindingExtensions http = (HTTPBindingExtensions) component
-                .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_HTTP);
+                .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
         cmhttp.httpBindingExtension(http);
 
         SOAPBindingExtensions soap = (SOAPBindingExtensions) component
-                .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
+                .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
         cmsoap.soapBindingExtension(soap);
 
         out.endElement();
@@ -459,11 +463,11 @@
         cmbase.parent(component.getParent());
 
         HTTPBindingFaultExtensions http = (HTTPBindingFaultExtensions) component
-                .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_HTTP);
+                .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
         cmhttp.httpBindingFaultExtension(http);
 
         SOAPBindingFaultExtensions soap = (SOAPBindingFaultExtensions) component
-                .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
+                .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
         cmsoap.soapBindingFaultExtension(soap);
 
         out.endElement();
@@ -506,11 +510,11 @@
         cmbase.parent(component.getParent());
 
         HTTPBindingOperationExtensions http = (HTTPBindingOperationExtensions) component
-                .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_HTTP);
+                .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
         cmhttp.httpBindingOperationExtension(http);
 
         SOAPBindingOperationExtensions soap = (SOAPBindingOperationExtensions) component
-                .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
+                .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
         cmsoap.soapBindingOperationExtension(soap);
 
         out.endElement();
@@ -554,11 +558,11 @@
         cmbase.parent(component.getParent());
 
         HTTPBindingMessageReferenceExtensions http = (HTTPBindingMessageReferenceExtensions) component
-                .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_HTTP);
+                .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
         cmhttp.httpBindingMessageReferenceExtension(http);
 
         SOAPBindingMessageReferenceExtensions soap = (SOAPBindingMessageReferenceExtensions) component
-                .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
+                .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
         cmsoap.soapBindingMessageReferenceExtension(soap);
 
         out.endElement();
@@ -608,7 +612,7 @@
         cmbase.parent(component.getParent());
 
         SOAPBindingFaultReferenceExtensions soap = (SOAPBindingFaultReferenceExtensions) component
-                .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
+                .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
         cmsoap.soapBindingFaultReferenceExtension(soap);
 
         out.endElement();
@@ -681,11 +685,11 @@
         cmbase.parent(component.getParent());
 
         HTTPEndpointExtensions http = (HTTPEndpointExtensions) component
-                .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_HTTP);
+                .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
         cmhttp.httpEndpointExtension(http);
 
         SOAPEndpointExtensions soap = (SOAPEndpointExtensions) component
-                .getComponentExtensionsForNamespace(ComponentExtensions.NS_URI_SOAP);
+                .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
         cmsoap.soapEndpointExtension(soap);
 
         out.endElement();

Modified: webservices/woden/branches/woden47/src/org/apache/woden/internal/Messages.properties
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/Messages.properties?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/internal/Messages.properties (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/internal/Messages.properties Sun Feb  3 23:21:25 2008
@@ -50,13 +50,17 @@
 WSDL013=The Java class "{0}" does not implement the "ExtensionElement" interface.
 WSDL014=Cannot specify a null Extension Registry.
 WSDL015=The extension namespace "{0}" in the context of "{1}" does not have a Java class registered.
-WSDL016=The Java class "{0}" does not implement the "ComponentExtensions" interface.
+WSDL016=The Java class "{0}" does not implement the "ComponentExtensionContext" interface.
 WSDL017=WSDL source represented by the type "{0}" cannot be read by the WSDLReader implementation class "{1}".
 WSDL018=WSDL cannot be represented by the type "{0}" in the WSDLSource implementation class "{1}".
 WSDL019=A WSDL element cannot be represented by the type "{0}" in the XMLElement implementation class "{1}".
 WSDL020=Woden extension registrar class "{0}" not found.
 WSDL021=Class "{0}" does not implement the Woden ExtensionRegistrar interface.
 WSDL022=Unable to instantiate the Woden extension registrar class "{0}".
+WSDL023=The extension namespace cannot be null.
+WSDL024=The extension property name cannot be null.
+WSDL025=The parent WSDLComponent cannot be null.
+
 # ------------ Parsing errors -------------------
 
 WSDL500={0} Parsing error in document located at {1}.

Modified: webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/ComponentModelBuilder.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/ComponentModelBuilder.java?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/ComponentModelBuilder.java (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/ComponentModelBuilder.java Sun Feb  3 23:21:25 2008
@@ -25,8 +25,6 @@
 
 import org.apache.woden.WSDLException;
 import org.apache.woden.internal.schema.SchemaConstants;
-import org.apache.woden.internal.wsdl20.extensions.ComponentExtensionsImpl;
-import org.apache.woden.internal.wsdl20.extensions.rpc.RPCConstants;
 import org.apache.woden.schema.Schema;
 import org.apache.woden.wsdl20.Binding;
 import org.apache.woden.wsdl20.BindingFault;
@@ -35,8 +33,11 @@
 import org.apache.woden.wsdl20.BindingOperation;
 import org.apache.woden.wsdl20.Endpoint;
 import org.apache.woden.wsdl20.InterfaceOperation;
-import org.apache.woden.wsdl20.extensions.ComponentExtensions;
+import org.apache.woden.wsdl20.WSDLComponent;
+import org.apache.woden.wsdl20.extensions.ComponentExtensionContext;
+import org.apache.woden.wsdl20.extensions.WSDLExtensionConstants;
 import org.apache.woden.wsdl20.extensions.ExtensionRegistry;
+import org.apache.woden.wsdl20.extensions.rpc.RPCConstants;
 import org.apache.woden.wsdl20.xml.BindingElement;
 import org.apache.woden.wsdl20.xml.BindingFaultElement;
 import org.apache.woden.wsdl20.xml.BindingFaultReferenceElement;
@@ -50,7 +51,6 @@
 import org.apache.woden.wsdl20.xml.InterfaceOperationElement;
 import org.apache.woden.wsdl20.xml.ServiceElement;
 import org.apache.woden.wsdl20.xml.TypesElement;
-import org.apache.woden.wsdl20.xml.WSDLElement;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaExternal;
 import org.apache.ws.commons.schema.XmlSchemaImport;
@@ -376,9 +376,9 @@
 		for (int i = 0; i < extNamespaces.length; i++) {
 			URI extNS = extNamespaces[i];
 			if (oper.hasExtensionAttributesForNamespace(extNS)) {
-				ComponentExtensions compExt = createComponentExtensions(
+				ComponentExtensionContext compExt = createComponentExtensions(
 						InterfaceOperation.class, oper, extNS);
-				oper.setComponentExtensions(extNS, compExt);
+				oper.setComponentExtensionContext(extNS, compExt);
 			}
 		}
         
@@ -387,13 +387,13 @@
          * so if an InterfaceOperationExtensions object has not already been
          * created, create one now.
          */
-        if (oper.getComponentExtensionsForNamespace(
-                ComponentExtensions.NS_URI_WSDL_EXTENSIONS) == null) {
-            ComponentExtensions compExt = createComponentExtensions(
+        if (oper.getComponentExtensionContext(
+                WSDLExtensionConstants.NS_URI_WSDL_EXTENSIONS) == null) {
+            ComponentExtensionContext compExt = createComponentExtensions(
                     InterfaceOperation.class, oper,
-                    ComponentExtensions.NS_URI_WSDL_EXTENSIONS);
-            oper.setComponentExtensions(
-                    ComponentExtensions.NS_URI_WSDL_EXTENSIONS, compExt);
+                    WSDLExtensionConstants.NS_URI_WSDL_EXTENSIONS);
+            oper.setComponentExtensionContext(
+                    WSDLExtensionConstants.NS_URI_WSDL_EXTENSIONS, compExt);
         }
         
         /*
@@ -413,13 +413,13 @@
         }
         
         if(isRPCStyle) {
-            if (oper.getComponentExtensionsForNamespace(
-                    ComponentExtensions.NS_URI_RPC) == null) {
-                ComponentExtensions compExt = createComponentExtensions(
+            if (oper.getComponentExtensionContext(
+                    RPCConstants.NS_URI_RPC) == null) {
+                ComponentExtensionContext compExt = createComponentExtensions(
                         InterfaceOperation.class, oper,
-                        ComponentExtensions.NS_URI_RPC);
-                oper.setComponentExtensions(
-                        ComponentExtensions.NS_URI_RPC, compExt);
+                        RPCConstants.NS_URI_RPC);
+                oper.setComponentExtensionContext(
+                        RPCConstants.NS_URI_RPC, compExt);
             }
         }
 	}
@@ -493,9 +493,9 @@
         
         fBindingType = binding.getType();
         if(fBindingType != null) {
-            ComponentExtensions compExt = createComponentExtensions(
+            ComponentExtensionContext compExt = createComponentExtensions(
                     Binding.class, binding, fBindingType);
-            binding.setComponentExtensions(fBindingType, compExt);
+            binding.setComponentExtensionContext(fBindingType, compExt);
         }
 	}
 
@@ -506,9 +506,9 @@
          */
         
         if(fBindingType != null) {
-            ComponentExtensions compExt = createComponentExtensions(
+            ComponentExtensionContext compExt = createComponentExtensions(
                     BindingFault.class, bindFault, fBindingType);
-            bindFault.setComponentExtensions(fBindingType, compExt);
+            bindFault.setComponentExtensionContext(fBindingType, compExt);
         }
 	}
 
@@ -519,9 +519,9 @@
          */
         
         if(fBindingType != null) {
-            ComponentExtensions compExt = createComponentExtensions(
+            ComponentExtensionContext compExt = createComponentExtensions(
                     BindingOperation.class, bindOper, fBindingType);
-            bindOper.setComponentExtensions(fBindingType, compExt);
+            bindOper.setComponentExtensionContext(fBindingType, compExt);
         }
 	}
 
@@ -533,9 +533,9 @@
          */
         
         if(fBindingType != null) {
-            ComponentExtensions compExt = createComponentExtensions(
+            ComponentExtensionContext compExt = createComponentExtensions(
                     BindingMessageReference.class, bindMsgRef, fBindingType);
-            bindMsgRef.setComponentExtensions(fBindingType, compExt);
+            bindMsgRef.setComponentExtensionContext(fBindingType, compExt);
         }
 	}
 
@@ -547,9 +547,9 @@
          */
         
         if(fBindingType != null) {
-            ComponentExtensions compExt = createComponentExtensions(
+            ComponentExtensionContext compExt = createComponentExtensions(
                     BindingFaultReference.class, bindFaultRef, fBindingType);
-            bindFaultRef.setComponentExtensions(fBindingType, compExt);
+            bindFaultRef.setComponentExtensionContext(fBindingType, compExt);
         }
 	}
 
@@ -581,23 +581,23 @@
          */
         
         if(fBindingType != null) {
-            ComponentExtensions compExt = createComponentExtensions(
+            ComponentExtensionContext compExt = createComponentExtensions(
                     Endpoint.class, endpoint, fBindingType);
-            endpoint.setComponentExtensions(fBindingType, compExt);
+            endpoint.setComponentExtensionContext(fBindingType, compExt);
         }
 	}
 
 	/*
 	 * This helper method factors out common code for creating
-	 * ComponentExtensions registered in the ExtensionRegistry.
+	 * ComponentExtensionContexts registered in the ExtensionRegistry.
 	 */
-	private ComponentExtensions createComponentExtensions(Class parentClass,
-			WSDLElement parentElem, URI extNS) {
+	private ComponentExtensionContext createComponentExtensions(Class parentClass,
+			WSDLComponent parentComp, URI extNS) {
 		ExtensionRegistry er = fDesc.getWsdlContext().extensionRegistry;
-		ComponentExtensions compExt = null;
+		ComponentExtensionContext compExt = null;
 		try {
-			compExt = er.createComponentExtension(parentClass, extNS);
-			((ComponentExtensionsImpl) compExt).init(parentElem, extNS);
+			compExt = er.createComponentExtension(parentClass, parentComp, extNS);
+			//TODO remove with woden-47 ((ComponentExtensionsImpl) compExt).init(parentElem, extNS);
 		} catch (WSDLException e) {
 			// This exception occurs if there is no Java class registered for
 			// the namespace, but

Modified: webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/WSDLComponentImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/WSDLComponentImpl.java?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/WSDLComponentImpl.java (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/WSDLComponentImpl.java Sun Feb  3 23:21:25 2008
@@ -17,14 +17,18 @@
 package org.apache.woden.internal.wsdl20;
 
 import java.net.URI;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Vector;
 
 import org.apache.woden.wsdl20.WSDLComponent;
+import org.apache.woden.wsdl20.extensions.BaseComponentExtensionContext;
+import org.apache.woden.wsdl20.extensions.ComponentExtensionContext;
 import org.apache.woden.wsdl20.extensions.ComponentExtensions;
-import org.apache.woden.wsdl20.fragids.FragmentIdentifier;
+import org.apache.woden.wsdl20.extensions.ExtensionProperty;
 
 /**
  * All classes implementing the WSDL 2.0 Component and Element
@@ -40,8 +44,11 @@
 public abstract class WSDLComponentImpl extends DocumentableImpl
                                      implements WSDLComponent
 {
+    //deprecated in M8, replaced with fCompExtensionsContexts
     private Map fCompExtensions = new HashMap(); //map of ComponentExtensions keyed by namespace
     
+    private Map fCompExtensionContexts = new HashMap(); //key=extNS, value=ComponentExtensionsContext
+    
     /* ************************************************************
      *  WSDLComponent interface methods (i.e. WSDL Component API)
      * ************************************************************/
@@ -57,14 +64,97 @@
         return super.equals(comp);
     }
     
-    /* (non-Javadoc)
+    /**
      * @see org.apache.woden.wsdl20.WSDLComponent#getWSDLExtensionsForNamespace(java.net.URI)
+     * @deprecated in Milestone 8, replaced with getComponentExtensionsContext
      */
     public ComponentExtensions getComponentExtensionsForNamespace(URI namespace)
     {
         return (ComponentExtensions)fCompExtensions.get(namespace);
     }
     
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.WSDLComponent#setComponentExtensionContext(java.net.URI, org.apache.woden.wsdl20.extensions.ComponentExtensionsContext)
+     */
+    public void setComponentExtensionContext(URI extNamespace, ComponentExtensionContext compExtCtx) {
+        
+        if(extNamespace == null) {
+            String msg = getWsdlContext().errorReporter.getFormattedMessage("WSDL023", null);
+            throw new NullPointerException(msg);
+        }
+        
+        if(compExtCtx != null) {
+            fCompExtensionContexts.put(extNamespace.toString(), compExtCtx);
+        } else {
+            fCompExtensionContexts.remove(extNamespace.toString());
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.WSDLComponent#getComponentExtensionContext(java.net.URI)
+     */
+    public ComponentExtensionContext getComponentExtensionContext(URI extNamespace) {
+        if(extNamespace == null) {
+            return null;
+        }
+        return (ComponentExtensionContext) fCompExtensionContexts.get(extNamespace.toString());
+    }
+        
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.PropertyExtensible#getExtensionProperties()
+     */
+    public ExtensionProperty[] getExtensionProperties() {
+        int i, len;
+        List properties = new Vector();
+        Collection compExtCtxs = fCompExtensionContexts.values();
+        Iterator it = compExtCtxs.iterator();
+        while(it.hasNext()) {
+            BaseComponentExtensionContext compExtCtx = (BaseComponentExtensionContext)it.next();
+            ExtensionProperty[] extProps = compExtCtx.getProperties();
+            len = extProps.length;
+            for(i=0; i<len; i++) {
+                properties.add(extProps[i]);
+            }
+        }
+        
+        ExtensionProperty[] array = new ExtensionProperty[properties.size()];
+        properties.toArray(array);
+        return array;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.PropertyExtensible#getExtensionProperties(java.net.URI)
+     */
+    public ExtensionProperty[] getExtensionProperties(URI extNamespace) {
+        if(extNamespace == null) {
+            return new ExtensionProperty[] {};
+        }
+        
+        ComponentExtensionContext compExtCtx = getComponentExtensionContext(extNamespace);
+        if(compExtCtx == null) {
+            return new ExtensionProperty[] {};
+        }
+        
+        return compExtCtx.getProperties();
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.PropertyExtensible#getExtensionProperty(java.net.URI, java.lang.String)
+     */
+    public ExtensionProperty getExtensionProperty(URI extNamespace, String propertyName) {
+        if(extNamespace == null || propertyName == null) {
+            return null;
+        }
+        
+        ComponentExtensionContext compExtCtx = getComponentExtensionContext(extNamespace);
+        if(compExtCtx == null) {
+            return null;
+        }
+        
+        return compExtCtx.getProperty(propertyName);
+    }
+    
     /* ************************************************************
      *  Non-API implementation methods
      * ************************************************************/
@@ -86,11 +176,13 @@
     }
     
     
-    /*
+    /**
      * Store the extensions in a map using the namespace string as the key.
      * If the extensions value is null, delete any existing entry in the map
      * for this namespace. If the namespace string is null, do nothing.
      * TODO check if still needed after compbuilder refactored.
+     * 
+     * @deprecated in Milestone 8, replaced with setComponentExtensionsContext
      */
     public void setComponentExtensions(URI namespace, ComponentExtensions extensions)
     {
@@ -107,4 +199,6 @@
     public String toString() {
         return getFragmentIdentifier().toString();
     }
+    
+    
 }

Modified: webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/InterfaceOperationExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/InterfaceOperationExtensionsImpl.java?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/InterfaceOperationExtensionsImpl.java (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/InterfaceOperationExtensionsImpl.java Sun Feb  3 23:21:25 2008
@@ -16,7 +16,16 @@
  */
 package org.apache.woden.internal.wsdl20.extensions;
 
+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.InterfaceOperationExtensions;
+import org.apache.woden.wsdl20.extensions.rpc.RPCConstants;
+import org.apache.woden.wsdl20.xml.WSDLElement;
 import org.apache.woden.xml.BooleanAttr;
 
 /**
@@ -27,13 +36,56 @@
  * @author Arthur Ryman (ryman@ca.ibm.com)
  */
 
-public class InterfaceOperationExtensionsImpl extends ComponentExtensionsImpl
+public class InterfaceOperationExtensionsImpl extends BaseComponentExtensionContext
 		implements InterfaceOperationExtensions {
 
-	public boolean isSafety() {
+    public InterfaceOperationExtensionsImpl(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(WSDLExtensionConstants.PROP_SAFE)};
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperty(java.lang.String)
+     */
+    public ExtensionProperty getProperty(String propertyName) {
+        
+        if(WSDLExtensionConstants.PROP_SAFE.equals(propertyName) ) {
+            BooleanAttr safe = (BooleanAttr) ((WSDLElement)getParent())
+            .getExtensionAttribute(WSDLExtensionConstants.Q_ATTR_SAFE);
+            return newExtensionProperty(WSDLExtensionConstants.PROP_SAFE, 
+                    safe != null ? safe.getBoolean() : Boolean.FALSE);
+        } else {
+            return null; //the specified property name does not exist
+        }
+    }
+    
+    /* ************************************************************
+     *  Additional methods declared by InterfaceOperationExtensions
+     * ************************************************************/
 
-		BooleanAttr safe = 
-            (BooleanAttr)fParentElement.getExtensionAttribute(ExtensionConstants.Q_ATTR_SAFE);
-        return safe != null ? safe.getBoolean().booleanValue() : false;
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.InterfaceOperationExtensionContext#isSafe()
+     */
+	public boolean isSafe() {
+		Boolean safe = (Boolean)getProperty(WSDLExtensionConstants.PROP_SAFE).getContent();
+		return safe == Boolean.TRUE ? true : false;
 	}
 }

Modified: webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/PopulatedExtensionRegistry.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/PopulatedExtensionRegistry.java?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/PopulatedExtensionRegistry.java (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/PopulatedExtensionRegistry.java Sun Feb  3 23:21:25 2008
@@ -26,18 +26,15 @@
 import org.apache.woden.internal.wsdl20.extensions.http.HTTPBindingFaultExtensionsImpl;
 import org.apache.woden.internal.wsdl20.extensions.http.HTTPBindingMessageReferenceExtensionsImpl;
 import org.apache.woden.internal.wsdl20.extensions.http.HTTPBindingOperationExtensionsImpl;
-import org.apache.woden.internal.wsdl20.extensions.http.HTTPConstants;
 import org.apache.woden.internal.wsdl20.extensions.http.HTTPEndpointExtensionsImpl;
 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.soap.SOAPBindingExtensionsImpl;
 import org.apache.woden.internal.wsdl20.extensions.soap.SOAPBindingFaultExtensionsImpl;
 import org.apache.woden.internal.wsdl20.extensions.soap.SOAPBindingFaultReferenceExtensionsImpl;
 import org.apache.woden.internal.wsdl20.extensions.soap.SOAPBindingMessageReferenceExtensionsImpl;
 import org.apache.woden.internal.wsdl20.extensions.soap.SOAPBindingOperationExtensionsImpl;
-import org.apache.woden.internal.wsdl20.extensions.soap.SOAPConstants;
 import org.apache.woden.internal.wsdl20.extensions.soap.SOAPEndpointExtensionsImpl;
 import org.apache.woden.internal.wsdl20.extensions.soap.SOAPHeaderBlockDeserializer;
 import org.apache.woden.internal.wsdl20.extensions.soap.SOAPHeaderBlockImpl;
@@ -59,8 +56,12 @@
 import org.apache.woden.wsdl20.Endpoint;
 import org.apache.woden.wsdl20.InterfaceOperation;
 import org.apache.woden.wsdl20.extensions.ComponentExtensions;
+import org.apache.woden.wsdl20.extensions.WSDLExtensionConstants;
 import org.apache.woden.wsdl20.extensions.ExtensionRegistrar;
 import org.apache.woden.wsdl20.extensions.ExtensionRegistry;
+import org.apache.woden.wsdl20.extensions.http.HTTPConstants;
+import org.apache.woden.wsdl20.extensions.rpc.RPCConstants;
+import org.apache.woden.wsdl20.extensions.soap.SOAPConstants;
 import org.apache.woden.wsdl20.xml.BindingElement;
 import org.apache.woden.wsdl20.xml.BindingFaultElement;
 import org.apache.woden.wsdl20.xml.BindingFaultReferenceElement;
@@ -102,12 +103,12 @@
 
 		// ------------ WSDL extension attributes ------------
 		registerExtAttributeType(InterfaceOperationElement.class,
-				ExtensionConstants.Q_ATTR_SAFE, BooleanAttrImpl.class);
+				WSDLExtensionConstants.Q_ATTR_SAFE, BooleanAttrImpl.class);
 
 		// ------------ WSDL Component Extensions ------------
 
 		registerComponentExtension(InterfaceOperation.class,
-				ComponentExtensions.NS_URI_WSDL_EXTENSIONS,
+				WSDLExtensionConstants.NS_URI_WSDL_EXTENSIONS,
 				InterfaceOperationExtensionsImpl.class);
 
 		// ------------ RPC extension attributes ------------
@@ -117,7 +118,7 @@
 
 		// ------------ RPC Component Extensions ------------
 		registerComponentExtension(InterfaceOperation.class,
-				ComponentExtensions.NS_URI_RPC,
+		        RPCConstants.NS_URI_RPC,
 				RPCInterfaceOperationExtensionsImpl.class);
 
 		// ------------ SOAP extension attributes ------------
@@ -199,27 +200,27 @@
 		// ------------ SOAP Component Extensions ------------
 
 		registerComponentExtension(Binding.class,
-				ComponentExtensions.NS_URI_SOAP,
+				SOAPConstants.NS_URI_SOAP,
 				SOAPBindingExtensionsImpl.class);
 
 		registerComponentExtension(BindingFault.class,
-				ComponentExtensions.NS_URI_SOAP,
+		        SOAPConstants.NS_URI_SOAP,
 				SOAPBindingFaultExtensionsImpl.class);
 
 		registerComponentExtension(BindingOperation.class,
-				ComponentExtensions.NS_URI_SOAP,
+		        SOAPConstants.NS_URI_SOAP,
 				SOAPBindingOperationExtensionsImpl.class);
 
 		registerComponentExtension(BindingMessageReference.class,
-				ComponentExtensions.NS_URI_SOAP,
+		        SOAPConstants.NS_URI_SOAP,
 				SOAPBindingMessageReferenceExtensionsImpl.class);
 
 		registerComponentExtension(BindingFaultReference.class,
-				ComponentExtensions.NS_URI_SOAP,
+		        SOAPConstants.NS_URI_SOAP,
 				SOAPBindingFaultReferenceExtensionsImpl.class);
 
         registerComponentExtension(Endpoint.class,
-                ComponentExtensions.NS_URI_SOAP,
+                SOAPConstants.NS_URI_SOAP,
                 SOAPEndpointExtensionsImpl.class);
 
 		// ------------ HTTP extension attributes ------------
@@ -303,23 +304,23 @@
 		// ------------ HTTP Component Extensions ------------
 
 		registerComponentExtension(Binding.class,
-				ComponentExtensions.NS_URI_HTTP,
+				HTTPConstants.NS_URI_HTTP,
 				HTTPBindingExtensionsImpl.class);
 
 		registerComponentExtension(BindingFault.class,
-				ComponentExtensions.NS_URI_HTTP,
+				HTTPConstants.NS_URI_HTTP,
 				HTTPBindingFaultExtensionsImpl.class);
 
 		registerComponentExtension(BindingOperation.class,
-				ComponentExtensions.NS_URI_HTTP,
+				HTTPConstants.NS_URI_HTTP,
 				HTTPBindingOperationExtensionsImpl.class);
 
 		registerComponentExtension(BindingMessageReference.class,
-				ComponentExtensions.NS_URI_HTTP,
+				HTTPConstants.NS_URI_HTTP,
 				HTTPBindingMessageReferenceExtensionsImpl.class);
 
 		registerComponentExtension(Endpoint.class,
-				ComponentExtensions.NS_URI_HTTP,
+				HTTPConstants.NS_URI_HTTP,
 				HTTPEndpointExtensionsImpl.class);
         
         //Register other, user-defined WSDL extensions.

Modified: webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingExtensionsImpl.java?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingExtensionsImpl.java (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingExtensionsImpl.java Sun Feb  3 23:21:25 2008
@@ -16,8 +16,14 @@
  */
 package org.apache.woden.internal.wsdl20.extensions.http;
 
-import org.apache.woden.internal.wsdl20.extensions.ComponentExtensionsImpl;
+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.ExtensionProperty;
 import org.apache.woden.wsdl20.extensions.http.HTTPBindingExtensions;
+import org.apache.woden.wsdl20.extensions.http.HTTPConstants;
 import org.apache.woden.wsdl20.xml.WSDLElement;
 import org.apache.woden.xml.BooleanAttr;
 import org.apache.woden.xml.StringAttr;
@@ -29,16 +35,71 @@
  * 
  * @author John Kaputin (jkaputin@apache.org)
  */
-public class HTTPBindingExtensionsImpl extends ComponentExtensionsImpl
+public class HTTPBindingExtensionsImpl extends BaseComponentExtensionContext
                                        implements HTTPBindingExtensions 
 {
 
+    public HTTPBindingExtensionsImpl(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(HTTPConstants.PROP_HTTP_METHOD_DEFAULT),
+                getProperty(HTTPConstants.PROP_HTTP_QUERY_PARAMETER_SEPARATOR_DEFAULT),
+                getProperty(HTTPConstants.PROP_HTTP_COOKIES),
+                getProperty(HTTPConstants.PROP_HTTP_CONTENT_ENCODING_DEFAULT)};
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperty(java.lang.String)
+     */
+    public ExtensionProperty getProperty(String propertyName) {
+        
+        if(HTTPConstants.PROP_HTTP_METHOD_DEFAULT.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_METHOD_DEFAULT, getHttpMethodDefault());
+            
+        } else if(HTTPConstants.PROP_HTTP_QUERY_PARAMETER_SEPARATOR_DEFAULT.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_QUERY_PARAMETER_SEPARATOR_DEFAULT, 
+                    getHttpQueryParameterSeparatorDefault());
+            
+        } else if(HTTPConstants.PROP_HTTP_COOKIES.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_COOKIES, isHttpCookies());
+            
+        } else if(HTTPConstants.PROP_HTTP_CONTENT_ENCODING_DEFAULT.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_CONTENT_ENCODING_DEFAULT, getHttpContentEncodingDefault());
+            
+        } else {
+            return null; //the specified property name does not exist
+        }
+        
+    }
+    
+    /* ************************************************************
+     *  Additional methods declared by HTTPBindingExtensions
+     * ************************************************************/
+
     /* (non-Javadoc)
      * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingExtensions#getHttpMethodDefault()
      */
     public String getHttpMethodDefault() 
     {
-        StringAttr methodDef = (StringAttr) ((WSDLElement)fParent)
+        StringAttr methodDef = (StringAttr) ((WSDLElement)getParent())
             .getExtensionAttribute(HTTPConstants.Q_ATTR_METHOD_DEFAULT);
         return methodDef != null ? methodDef.getString() : null;
     }
@@ -49,7 +110,7 @@
     public String getHttpQueryParameterSeparatorDefault() 
     {
         //TODO monitor ws-desc proposal 19May06 on changing handling of defaults in spec Part 2
-        StringAttr qpsDef = (StringAttr) ((WSDLElement)fParent)
+        StringAttr qpsDef = (StringAttr) ((WSDLElement)getParent())
             .getExtensionAttribute(HTTPConstants.Q_ATTR_QUERY_PARAMETER_SEPARATOR_DEFAULT);
         return qpsDef != null ? qpsDef.getString() : HTTPConstants.QUERY_SEP_AMPERSAND;
     }
@@ -59,7 +120,7 @@
      */
     public Boolean isHttpCookies() 
     {
-        BooleanAttr cookiesUsed = (BooleanAttr) ((WSDLElement)fParent)
+        BooleanAttr cookiesUsed = (BooleanAttr) ((WSDLElement)getParent())
             .getExtensionAttribute(HTTPConstants.Q_ATTR_COOKIES);
         return cookiesUsed != null ? cookiesUsed.getBoolean() : new Boolean(false); //defaults to false if omitted
     }
@@ -69,7 +130,7 @@
      */
     public String getHttpContentEncodingDefault() 
     {
-        StringAttr ceDef = (StringAttr) ((WSDLElement)fParent)
+        StringAttr ceDef = (StringAttr) ((WSDLElement)getParent())
             .getExtensionAttribute(HTTPConstants.Q_ATTR_CONTENT_ENCODING_DEFAULT);
         return ceDef != null ? ceDef.getString() : null;
     }

Modified: webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingFaultExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingFaultExtensionsImpl.java?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingFaultExtensionsImpl.java (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingFaultExtensionsImpl.java Sun Feb  3 23:21:25 2008
@@ -16,10 +16,16 @@
  */
 package org.apache.woden.internal.wsdl20.extensions.http;
 
-import org.apache.woden.internal.wsdl20.extensions.ComponentExtensionsImpl;
+import java.net.URI;
+
+import org.apache.woden.ErrorReporter;
 import org.apache.woden.internal.xml.IntOrTokenAnyAttrImpl;
+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.HTTPBindingFaultExtensions;
+import org.apache.woden.wsdl20.extensions.http.HTTPConstants;
 import org.apache.woden.wsdl20.extensions.http.HTTPErrorStatusCode;
 import org.apache.woden.wsdl20.extensions.http.HTTPHeader;
 import org.apache.woden.wsdl20.xml.WSDLElement;
@@ -32,10 +38,60 @@
  * 
  * @author John Kaputin (jkaputin@apache.org)
  */
-public class HTTPBindingFaultExtensionsImpl extends ComponentExtensionsImpl
+public class HTTPBindingFaultExtensionsImpl extends BaseComponentExtensionContext
                                             implements HTTPBindingFaultExtensions 
 {
 
+    public HTTPBindingFaultExtensionsImpl(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(HTTPConstants.PROP_HTTP_ERROR_STATUS_CODE),
+                getProperty(HTTPConstants.PROP_HTTP_CONTENT_ENCODING),
+                getProperty(HTTPConstants.PROP_HTTP_HEADERS)};
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperty(java.lang.String)
+     */
+    public ExtensionProperty getProperty(String propertyName) {
+        
+        if(HTTPConstants.PROP_HTTP_ERROR_STATUS_CODE.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_ERROR_STATUS_CODE, getHttpErrorStatusCode());
+            
+        } else if(HTTPConstants.PROP_HTTP_CONTENT_ENCODING.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_CONTENT_ENCODING, getHttpContentEncoding());
+            
+        } else if(HTTPConstants.PROP_HTTP_HEADERS.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_HEADERS, getHttpHeaders());
+            
+        } else {
+            return null; //the specified property name does not exist
+        }
+        
+    }
+    
+    /* ************************************************************
+     *  Additional methods declared by HTTPBindingFaultExtensions
+     * ************************************************************/
+
     /* (non-Javadoc)
      * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingFaultExtensions#getHttpErrorStatusCode()
      */
@@ -45,8 +101,8 @@
          * 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);
+        IntOrTokenAnyAttrImpl code = (IntOrTokenAnyAttrImpl) ((WSDLElement) getParent())
+            .getExtensionAttribute(HTTPConstants.Q_ATTR_CODE);
         
         if(code == null)
         {
@@ -77,7 +133,7 @@
     public String getHttpContentEncoding() 
     {
         String ce = null;
-        StringAttr contEncoding = (StringAttr) ((WSDLElement)fParent)
+        StringAttr contEncoding = (StringAttr) ((WSDLElement) getParent())
             .getExtensionAttribute(HTTPConstants.Q_ATTR_CONTENT_ENCODING);
         if(contEncoding != null) {
             ce = contEncoding.getString();
@@ -90,7 +146,7 @@
      */
     public HTTPHeader[] getHttpHeaders() 
     {
-        ExtensionElement[] extEls =  ((WSDLElement)fParent)
+        ExtensionElement[] extEls =  ((WSDLElement) getParent())
             .getExtensionElementsOfType(HTTPConstants.Q_ELEM_HTTP_HEADER);
         int len = extEls.length;
         HTTPHeader[] httpHeaders = new HTTPHeader[len];

Modified: webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsImpl.java?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsImpl.java (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingMessageReferenceExtensionsImpl.java Sun Feb  3 23:21:25 2008
@@ -16,9 +16,15 @@
  */
 package org.apache.woden.internal.wsdl20.extensions.http;
 
-import org.apache.woden.internal.wsdl20.extensions.ComponentExtensionsImpl;
+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.HTTPBindingMessageReferenceExtensions;
+import org.apache.woden.wsdl20.extensions.http.HTTPConstants;
 import org.apache.woden.wsdl20.extensions.http.HTTPHeader;
 import org.apache.woden.wsdl20.xml.WSDLElement;
 import org.apache.woden.xml.StringAttr;
@@ -30,17 +36,63 @@
  * 
  * @author John Kaputin (jkaputin@apache.org)
  */
-public class HTTPBindingMessageReferenceExtensionsImpl extends ComponentExtensionsImpl 
+public class HTTPBindingMessageReferenceExtensionsImpl extends BaseComponentExtensionContext 
                                           implements HTTPBindingMessageReferenceExtensions 
 {
 
+    public HTTPBindingMessageReferenceExtensionsImpl(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(HTTPConstants.PROP_HTTP_CONTENT_ENCODING),
+                getProperty(HTTPConstants.PROP_HTTP_HEADERS)};
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperty(java.lang.String)
+     */
+    public ExtensionProperty getProperty(String propertyName) {
+        
+        if(HTTPConstants.PROP_HTTP_CONTENT_ENCODING.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_CONTENT_ENCODING, getHttpContentEncoding());
+            
+        } else if(HTTPConstants.PROP_HTTP_HEADERS.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_HEADERS, getHttpHeaders());
+            
+        } else {
+            return null; //the specified property name does not exist
+        }
+        
+    }
+    
+    /* ************************************************************
+     *  Additional methods declared by HTTPBindingMessageReferenceExtensions
+     * ************************************************************/
+    
     /* (non-Javadoc)
      * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingMessageReferenceExtensions#getHttpContentEncoding()
      * 
      */
     public String getHttpContentEncoding() 
     {
-        StringAttr contentEncoding = (StringAttr) ((WSDLElement)fParent)
+        StringAttr contentEncoding = (StringAttr) ((WSDLElement) getParent())
             .getExtensionAttribute(HTTPConstants.Q_ATTR_CONTENT_ENCODING);
         
         return (contentEncoding != null ? contentEncoding.getString() : null);
@@ -51,7 +103,7 @@
      */
     public HTTPHeader[] getHttpHeaders() 
     {
-        ExtensionElement[] extEls =  ((WSDLElement)fParent)
+        ExtensionElement[] extEls =  ((WSDLElement)getParent())
             .getExtensionElementsOfType(HTTPConstants.Q_ELEM_HTTP_HEADER);
         int len = extEls.length;
         HTTPHeader[] httpHeaders = new HTTPHeader[len];

Modified: webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingOperationExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingOperationExtensionsImpl.java?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingOperationExtensionsImpl.java (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPBindingOperationExtensionsImpl.java Sun Feb  3 23:21:25 2008
@@ -18,14 +18,18 @@
 
 import java.net.URI;
 
-import org.apache.woden.internal.wsdl20.extensions.ComponentExtensionsImpl;
-import org.apache.woden.internal.wsdl20.extensions.ExtensionConstants;
+import org.apache.woden.ErrorReporter;
 import org.apache.woden.wsdl20.Binding;
 import org.apache.woden.wsdl20.BindingOperation;
 import org.apache.woden.wsdl20.InterfaceOperation;
+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.InterfaceOperationExtensions;
 import org.apache.woden.wsdl20.extensions.http.HTTPBindingExtensions;
 import org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions;
+import org.apache.woden.wsdl20.extensions.http.HTTPConstants;
 import org.apache.woden.wsdl20.extensions.http.HTTPLocation;
 import org.apache.woden.wsdl20.xml.WSDLElement;
 import org.apache.woden.xml.BooleanAttr;
@@ -40,15 +44,87 @@
  * @author Arthur Ryman (ryman@ca.ibm.com, arthur.ryman@gmail.com) - added
  *         support for {http location ignore uncited}
  */
-public class HTTPBindingOperationExtensionsImpl extends ComponentExtensionsImpl
+public class HTTPBindingOperationExtensionsImpl extends BaseComponentExtensionContext
 		implements HTTPBindingOperationExtensions {
-	/*
+
+    public HTTPBindingOperationExtensionsImpl(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(HTTPConstants.PROP_HTTP_LOCATION),
+                getProperty(HTTPConstants.PROP_HTTP_LOCATION_IGNORE_UNCITED),
+                getProperty(HTTPConstants.PROP_HTTP_METHOD),
+                getProperty(HTTPConstants.PROP_HTTP_INPUT_SERIALIZATION),
+                getProperty(HTTPConstants.PROP_HTTP_OUTPUT_SERIALIZATION),
+                getProperty(HTTPConstants.PROP_HTTP_FAULT_SERIALIZATION),
+                getProperty(HTTPConstants.PROP_HTTP_QUERY_PARAMETER_SEPARATOR),
+                getProperty(HTTPConstants.PROP_HTTP_CONTENT_ENCODING_DEFAULT)};
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperty(java.lang.String)
+     */
+    public ExtensionProperty getProperty(String propertyName) {
+        
+        if(HTTPConstants.PROP_HTTP_LOCATION.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_LOCATION, getHttpLocation());
+            
+        } else if(HTTPConstants.PROP_HTTP_LOCATION_IGNORE_UNCITED.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_LOCATION_IGNORE_UNCITED, isHttpLocationIgnoreUncited());
+            
+        } else if(HTTPConstants.PROP_HTTP_METHOD.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_METHOD, getHttpMethod());
+            
+        } else if(HTTPConstants.PROP_HTTP_INPUT_SERIALIZATION.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_INPUT_SERIALIZATION, getHttpInputSerialization());
+            
+        } else if(HTTPConstants.PROP_HTTP_OUTPUT_SERIALIZATION.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_OUTPUT_SERIALIZATION, getHttpOutputSerialization());
+            
+        } else if(HTTPConstants.PROP_HTTP_FAULT_SERIALIZATION.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_FAULT_SERIALIZATION, getHttpFaultSerialization());
+            
+        } else if(HTTPConstants.PROP_HTTP_QUERY_PARAMETER_SEPARATOR.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_QUERY_PARAMETER_SEPARATOR, 
+                    getHttpQueryParameterSeparator());
+            
+        } else if(HTTPConstants.PROP_HTTP_CONTENT_ENCODING_DEFAULT.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_CONTENT_ENCODING_DEFAULT, getHttpContentEncodingDefault());
+            
+        } else {
+            return null; //the specified property name does not exist
+        }
+        
+    }
+    
+    /* ************************************************************
+     *  Additional methods declared by HTTPBindingOperationExtensions
+     * ************************************************************/
+    
+    /*
 	 * (non-Javadoc)
 	 * 
 	 * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions#getHttpLocation()
 	 */
 	public HTTPLocation getHttpLocation() {
-		StringAttr httpLoc = (StringAttr) ((WSDLElement) fParent)
+		StringAttr httpLoc = (StringAttr) ((WSDLElement) getParent())
 				.getExtensionAttribute(HTTPConstants.Q_ATTR_LOCATION);
 		return httpLoc != null ? new HTTPLocation(httpLoc.getString()) : null;
 	}
@@ -63,7 +139,7 @@
 	 */
 	public Boolean isHttpLocationIgnoreUncited() {
 
-		BooleanAttr ignoreUncited = (BooleanAttr) ((WSDLElement) fParent)
+		BooleanAttr ignoreUncited = (BooleanAttr) ((WSDLElement) getParent())
 				.getExtensionAttribute(HTTPConstants.Q_ATTR_IGNORE_UNCITED);
 		
 		return ignoreUncited != null ? ignoreUncited.getBoolean()
@@ -89,7 +165,7 @@
 	public String getHttpMethod() {
 
 		// 1. try whttp:method
-		StringAttr methodAttr = (StringAttr) ((WSDLElement) fParent)
+		StringAttr methodAttr = (StringAttr) ((WSDLElement) getParent())
 				.getExtensionAttribute(HTTPConstants.Q_ATTR_METHOD);
 		if (methodAttr != null) {
 			return methodAttr.getString();
@@ -147,7 +223,7 @@
 	 */
 	public String getHttpInputSerialization() {
         
-		StringAttr serialization = (StringAttr) ((WSDLElement) fParent)
+		StringAttr serialization = (StringAttr) ((WSDLElement) getParent())
 				.getExtensionAttribute(HTTPConstants.Q_ATTR_INPUT_SERIALIZATION);
 		if (serialization != null) {
 			return serialization.getString();
@@ -176,7 +252,7 @@
      * value.
 	 */
 	public String getHttpOutputSerialization() {
-		StringAttr serialization = (StringAttr) ((WSDLElement) fParent)
+		StringAttr serialization = (StringAttr) ((WSDLElement) getParent())
 				.getExtensionAttribute(HTTPConstants.Q_ATTR_OUTPUT_SERIALIZATION);
 		return serialization != null ? serialization.getString()
 				: HTTPConstants.SERIAL_APP_XML;
@@ -190,7 +266,7 @@
      * Per Part 2, sect 6.4.5, if attribute omitted default to application/xml.
 	 */
 	public String getHttpFaultSerialization() {
-		StringAttr serialization = (StringAttr) ((WSDLElement) fParent)
+		StringAttr serialization = (StringAttr) ((WSDLElement) getParent())
 				.getExtensionAttribute(HTTPConstants.Q_ATTR_FAULT_SERIALIZATION);
 		return serialization != null ? serialization.getString()
 				: HTTPConstants.SERIAL_APP_XML;
@@ -203,7 +279,7 @@
 	 */
 	public String getHttpQueryParameterSeparator() {
         
-		StringAttr separator = (StringAttr) ((WSDLElement) fParent)
+		StringAttr separator = (StringAttr) ((WSDLElement) getParent())
 				.getExtensionAttribute(HTTPConstants.Q_ATTR_QUERY_PARAMETER_SEPARATOR);
         return separator != null ? separator.getString() : null;
 	}
@@ -214,7 +290,7 @@
 	 * @see org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions#getHttpContentEncodingDefault()
 	 */
 	public String getHttpContentEncodingDefault() {
-		StringAttr contEncodingDef = (StringAttr) ((WSDLElement) fParent)
+		StringAttr contEncodingDef = (StringAttr) ((WSDLElement) getParent())
 				.getExtensionAttribute(HTTPConstants.Q_ATTR_CONTENT_ENCODING_DEFAULT);
 		return contEncodingDef != null ? contEncodingDef.getString() : null;
 	}
@@ -234,10 +310,10 @@
         if(method != null) return method;
         
         // 2. try whttp:methodDefault
-        Binding binding = (Binding) ((BindingOperation) fParent).getParent();
+        Binding binding = (Binding) ((BindingOperation) getParent()).getParent();
         
         HTTPBindingExtensions httpBindExts = (HTTPBindingExtensions) binding
-                .getComponentExtensionsForNamespace(HTTPConstants.NS_URI_HTTP);
+                .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
         
         // no need to check for a null httpBindExts because Binding has REQUIRED
         // http extension properties
@@ -245,12 +321,11 @@
         if (methodDef != null) return methodDef;
                
         // 3. try {safety} equals True
-        InterfaceOperation intOper = ((BindingOperation) fParent)
-                .getInterfaceOperation();
+        InterfaceOperation intOper = ((BindingOperation) getParent()).getInterfaceOperation();
         if (intOper != null) {
             InterfaceOperationExtensions intOperExts = (InterfaceOperationExtensions) intOper
-                    .getComponentExtensionsForNamespace(ExtensionConstants.NS_URI_WSDL_EXTENSIONS);
-           if (intOperExts != null && intOperExts.isSafety()) {
+                    .getComponentExtensionContext(WSDLExtensionConstants.NS_URI_WSDL_EXTENSIONS);
+           if (intOperExts != null && intOperExts.isSafe()) {
               return HTTPConstants.METHOD_GET;
            }
         }

Modified: webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPEndpointExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPEndpointExtensionsImpl.java?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPEndpointExtensionsImpl.java (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPEndpointExtensionsImpl.java Sun Feb  3 23:21:25 2008
@@ -16,8 +16,14 @@
  */
 package org.apache.woden.internal.wsdl20.extensions.http;
 
-import org.apache.woden.internal.wsdl20.extensions.ComponentExtensionsImpl;
+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.ExtensionProperty;
 import org.apache.woden.wsdl20.extensions.http.HTTPAuthenticationScheme;
+import org.apache.woden.wsdl20.extensions.http.HTTPConstants;
 import org.apache.woden.wsdl20.extensions.http.HTTPEndpointExtensions;
 import org.apache.woden.wsdl20.xml.WSDLElement;
 import org.apache.woden.xml.HTTPAuthenticationSchemeAttr;
@@ -31,9 +37,55 @@
  * @author Arthur Ryman (ryman@ca.ibm.com, arthur.ryman@gmail.com)
  * 
  */
-public class HTTPEndpointExtensionsImpl extends ComponentExtensionsImpl
+public class HTTPEndpointExtensionsImpl extends BaseComponentExtensionContext
 		implements HTTPEndpointExtensions {
 
+    public HTTPEndpointExtensionsImpl(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(HTTPConstants.PROP_HTTP_AUTHENTICATION_SCHEME),
+                getProperty(HTTPConstants.PROP_HTTP_AUTHENTICATION_REALM)};
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.woden.wsdl20.extensions.ComponentExtensionContext#getProperty(java.lang.String)
+     */
+    public ExtensionProperty getProperty(String propertyName) {
+        
+        if(HTTPConstants.PROP_HTTP_AUTHENTICATION_SCHEME.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_AUTHENTICATION_SCHEME, getHttpAuthenticationScheme());
+            
+        } else if(HTTPConstants.PROP_HTTP_AUTHENTICATION_REALM.equals(propertyName)) {
+            return newExtensionProperty(HTTPConstants.PROP_HTTP_AUTHENTICATION_REALM, getHttpAuthenticationRealm());
+            
+        } else {
+            return null; //the specified property name does not exist
+        }
+        
+    }
+    
+    /* ************************************************************
+     *  Additional methods declared by HTTPEndpointExtensions
+     * ************************************************************/
+
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -41,7 +93,7 @@
 	 */
 	public HTTPAuthenticationScheme getHttpAuthenticationScheme() {
 
-		HTTPAuthenticationSchemeAttr scheme = (HTTPAuthenticationSchemeAttr) ((WSDLElement) fParent)
+		HTTPAuthenticationSchemeAttr scheme = (HTTPAuthenticationSchemeAttr) ((WSDLElement) getParent())
 				.getExtensionAttribute(HTTPConstants.Q_ATTR_AUTHENTICATION_SCHEME);
 
 		return scheme != null ? scheme.getScheme() : null;
@@ -54,7 +106,7 @@
 	 */
 	public String getHttpAuthenticationRealm() {
 
-		StringAttr realm = (StringAttr) ((WSDLElement) fParent)
+		StringAttr realm = (StringAttr) ((WSDLElement) getParent())
 				.getExtensionAttribute(HTTPConstants.Q_ATTR_AUTHENTICATION_REALM);
 
 		return realm != null ? realm.getString() : null;

Modified: webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/rpc/RPCInterfaceOperationExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/rpc/RPCInterfaceOperationExtensionsImpl.java?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/rpc/RPCInterfaceOperationExtensionsImpl.java (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/rpc/RPCInterfaceOperationExtensionsImpl.java Sun Feb  3 23:21:25 2008
@@ -17,10 +17,19 @@
 
 package org.apache.woden.internal.wsdl20.extensions.rpc;
 
-import org.apache.woden.internal.wsdl20.extensions.ComponentExtensionsImpl;
+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
@@ -30,9 +39,48 @@
  * @author Arthur Ryman (ryman@ca.ibm.com)
  */
 
-public class RPCInterfaceOperationExtensionsImpl extends
-		ComponentExtensionsImpl implements RPCInterfaceOperationExtensions {
+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)
 	 * 
@@ -40,7 +88,7 @@
 	 */
 	public Argument[] getRPCSignature() {
 
-		ArgumentArrayAttr args = (ArgumentArrayAttr) fParentElement
+		ArgumentArrayAttr args = (ArgumentArrayAttr) ((WSDLElement)getParent())
 				.getExtensionAttribute(RPCConstants.Q_ATTR_RPC_SIGNATURE);
 
 		if (args == null)

Modified: webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingExtensionsImpl.java
URL: http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingExtensionsImpl.java?rev=618183&r1=618182&r2=618183&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingExtensionsImpl.java (original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPBindingExtensionsImpl.java Sun Feb  3 23:21:25 2008
@@ -18,10 +18,14 @@
 
 import java.net.URI;
 
-import org.apache.woden.internal.wsdl20.extensions.ComponentExtensionsImpl;
-import org.apache.woden.internal.wsdl20.extensions.http.HTTPConstants;
+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;
@@ -35,17 +39,72 @@
  * 
  * @author jkaputin@apache.org
  */
-public class SOAPBindingExtensionsImpl extends ComponentExtensionsImpl
+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)fParentElement.getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_VERSION);
+        StringAttr version = (StringAttr) ((WSDLElement)getParent())
+            .getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_VERSION);
         return version != null ? version.getString() : "1.2";
     }
 
@@ -54,8 +113,8 @@
      */
     public URI getSoapUnderlyingProtocol() 
     {
-        URIAttr protocol = 
-            (URIAttr)fParentElement.getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_PROTOCOL);
+        URIAttr protocol = (URIAttr) ((WSDLElement)getParent())
+            .getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_PROTOCOL);
         return protocol != null ? protocol.getURI() : null;
     }
 
@@ -64,8 +123,8 @@
      */
     public URI getSoapMepDefault() 
     {
-        URIAttr mepDefault = 
-            (URIAttr)fParentElement.getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_MEPDEFAULT);
+        URIAttr mepDefault = (URIAttr) ((WSDLElement)getParent())
+            .getExtensionAttribute(SOAPConstants.Q_ATTR_SOAP_MEPDEFAULT);
         return mepDefault != null ? mepDefault.getURI() : null;
     }
 
@@ -74,7 +133,8 @@
      */
     public SOAPModule[] getSoapModules() 
     {
-        ExtensionElement[] extEls = fParentElement.getExtensionElementsOfType(SOAPConstants.Q_ELEM_SOAP_MODULE);
+        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);
@@ -94,7 +154,7 @@
         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)fParent)
+            StringAttr qpsDef = (StringAttr) ((WSDLElement)getParent())
                 .getExtensionAttribute(HTTPConstants.Q_ATTR_QUERY_PARAMETER_SEPARATOR_DEFAULT);
             return qpsDef != null ? qpsDef.getString() : HTTPConstants.QUERY_SEP_AMPERSAND;
         } 
@@ -117,7 +177,7 @@
         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)fParent)
+            BooleanAttr cookiesUsed = (BooleanAttr) ((WSDLElement)getParent())
                 .getExtensionAttribute(HTTPConstants.Q_ATTR_COOKIES);
             return cookiesUsed != null ? cookiesUsed.getBoolean() : new Boolean(false); //defaults to false if omitted
         } 
@@ -140,7 +200,7 @@
         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)fParent)
+            StringAttr ceDef = (StringAttr) ((WSDLElement)getParent())
                 .getExtensionAttribute(HTTPConstants.Q_ATTR_CONTENT_ENCODING_DEFAULT);
             return ceDef != null ? ceDef.getString() : null;
         } 



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