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 2005/11/27 02:07:55 UTC

svn commit: r349163 - in /incubator/woden/java/src/org/apache/woden: internal/wsdl20/ wsdl20/ wsdl20/xml/

Author: jkaputin
Date: Sat Nov 26 17:07:38 2005
New Revision: 349163

URL: http://svn.apache.org/viewcvs?rev=349163&view=rev
Log:
Binding model work in progress. Binding, Binding Fault,
Binding Operation. Binding message ref and fault ref
still to complete.

Added:
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingFaultImpl.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingImpl.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingOperationImpl.java
Modified:
    incubator/woden/java/src/org/apache/woden/wsdl20/Binding.java
    incubator/woden/java/src/org/apache/woden/wsdl20/BindingFault.java
    incubator/woden/java/src/org/apache/woden/wsdl20/BindingFaultReference.java
    incubator/woden/java/src/org/apache/woden/wsdl20/BindingMessageReference.java
    incubator/woden/java/src/org/apache/woden/wsdl20/BindingOperation.java
    incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingElement.java
    incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingFaultElement.java
    incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingOperationElement.java

Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingFaultImpl.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingFaultImpl.java?rev=349163&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingFaultImpl.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingFaultImpl.java Sat Nov 26 17:07:38 2005
@@ -0,0 +1,87 @@
+/**
+ * Copyright 2005 Apache Software Foundation 
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+package org.apache.woden.internal.wsdl20;
+
+import javax.xml.namespace.QName;
+
+import org.apache.woden.wsdl20.BindingFault;
+import org.apache.woden.wsdl20.InterfaceFault;
+import org.apache.woden.wsdl20.xml.BindingFaultElement;
+import org.apache.woden.wsdl20.xml.InterfaceFaultElement;
+
+/**
+ * This class represents the BindingFault component from the WSDL 2.0 Component Model 
+ * and the <fault> child element of the WSDL <binding> element.
+ * 
+ * @author jkaputin@apache.org
+ */
+public class BindingFaultImpl extends NestedConfigurableImpl 
+                              implements BindingFault, BindingFaultElement 
+{
+    private QName fRef = null;
+    private InterfaceFaultImpl fInterfaceFault = null;
+    
+    /* ************************************************************
+     *  BindingFault interface methods (i.e. WSDL Component model)
+     * ************************************************************/
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.BindingFault#getInterfaceFault()
+     */
+    public InterfaceFault getInterfaceFault() {
+        //TODO consider retrieval from a common store using fRef, rather than a local copy.
+        return fInterfaceFault;
+    }
+
+    /*
+     * @see org.apache.woden.wsdl20.BindingFault#toElement()
+     */
+    public BindingFaultElement toElement() {
+        return this;
+    }
+    
+    /* ************************************************************
+     *  BindingFaultElement interface methods (the XML Element model)
+     * ************************************************************/
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingFaultElement#setRef(javax.xml.namespace.QName)
+     */
+    public void setRef(QName qname) {
+        fRef = qname;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingFaultElement#getRef()
+     */
+    public QName getRef() {
+        return fRef;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingFaultElement#getInterfaceFaultElement()
+     */
+    public InterfaceFaultElement getInterfaceFaultElement() {
+        //TODO consider retrieval from a common store using fRef, rather than a local copy.
+        return fInterfaceFault;
+    }
+    
+    /* ************************************************************
+     *  Non-API implementation methods
+     * ************************************************************/
+    
+
+}

Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingImpl.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingImpl.java?rev=349163&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingImpl.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingImpl.java Sat Nov 26 17:07:38 2005
@@ -0,0 +1,306 @@
+/**
+ * Copyright 2005 Apache Software Foundation 
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */package org.apache.woden.internal.wsdl20;
+
+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 javax.xml.namespace.QName;
+
+import org.apache.woden.wsdl20.Binding;
+import org.apache.woden.wsdl20.BindingFault;
+import org.apache.woden.wsdl20.BindingOperation;
+import org.apache.woden.wsdl20.Interface;
+import org.apache.woden.wsdl20.xml.BindingElement;
+import org.apache.woden.wsdl20.xml.BindingFaultElement;
+import org.apache.woden.wsdl20.xml.BindingOperationElement;
+import org.apache.woden.wsdl20.xml.InterfaceElement;
+
+/**
+ * This class represents the Binding component from the WSDL 2.0 Component Model 
+ * and the WSDL <binding> element.
+ * 
+ * @author jkaputin@apache.org
+ */
+public class BindingImpl extends ConfigurableImpl 
+                         implements Binding, BindingElement 
+{
+    private QName fName = null;
+    private QName fInterfaceName = null;
+    private InterfaceImpl fInterface = null;
+    private URI fType = null;
+    
+    /*
+     * TODO determine type of retrieval required for binding faults and operations
+     * as this may influence the choice of collection type - e.g. Map for keyed access, 
+     * or a List for sequential access.
+     * A Map of binding faults or operations is keyed by the 'ref' attribute qname.
+     * When the 'ref' qname is missing, we can store these objects in the Map 
+     * inside a List keyed by null rather than as individual objects keyed by qname.
+     * 
+     * TODO Final implementation choice will probably depend on what the resulting code 
+     * looks like, its readability, etc. It may be that List is a better implementation choice, 
+     * even for retrieval based on a 'ref' qname key, because the null key problem does not arise.
+     * For now, I have implemented binding faults as a Map and binding operations as a List
+     * to compare the implementations. 
+     */
+    private Map fFaults = new HashMap();
+    private List fOperations = new Vector();
+    
+    /* ************************************************************
+     *  Binding interface methods (i.e. WSDL Component model)
+     * ************************************************************/
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.Binding#getName()
+     * @see org.apache.woden.wsdl20.xml.BindingElement#getName()
+     */
+    public QName getName() {
+        return fName;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.Binding#getInterface()
+     */
+    public Interface getInterface() {
+        //TODO consider retrieval from a common store using fInterfaceName, rather than a local copy
+        return fInterface;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.Binding#getType()
+     * @see org.apache.woden.wsdl20.xml.BindingElement#getType()
+     */
+    public URI getType() {
+        return fType;
+    }
+
+    /*
+     * TODO see previous comments for fFaults about the null key problem 
+     * with the use of Map, rather than List.
+     * 
+     * Binding faults are stored as a Map of BindingFaultImpl keyed by 'ref' qname.
+     * If a binding fault 'ref' qname is missing, it gets stored in the fFaults Map in a
+     * List of BindingFaultImpl keyed by null. To return a collection of all binding faults
+     * we need to combine this collection with the collection of binding faults that do have
+     * a 'ref' qname and have been stored in the Map against this key.
+     * 
+     * This need to accomodate null keyed binding faults, makes Map a complicated choice
+     * compared to List, where the null key problem does not arise.
+     * Map may be a suitable choice where retrieval by 'ref' qname is required, but even that
+     * can be achieved with a List implementation. See fOperations and getBindingOperations()
+     * to compare the List implementation. 
+     * 
+     * @see org.apache.woden.wsdl20.Binding#getBindingFaults()
+     */
+    public BindingFault[] getBindingFaults() 
+    {
+        Collection coll = null;
+        if(fFaults.containsKey(null)) {
+            coll = (Collection)fFaults.get(null);  //collect faults without a 'ref' qname
+            Map map = new HashMap();
+            map.putAll(fFaults);
+            map.remove(null);                      //collect faults with a 'ref' qname
+            coll.addAll(map.values());             //collect all faults (with and without 'ref')
+        } else {
+            coll = fFaults.values();               //all faults have a 'ref' qname
+        }
+        
+        BindingFault[] array = new BindingFault[coll.size()];
+        coll.toArray(array);
+        return array;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.Binding#getBindingOperations()
+     */
+    public BindingOperation[] getBindingOperations() {
+        BindingOperation[] array = new BindingOperation[fOperations.size()];
+        fOperations.toArray(array);
+        return array;
+    }
+
+    /*
+     * @see org.apache.woden.wsdl20.Binding#toElement()
+     */
+    public BindingElement toElement() {
+        return this;
+    }
+    
+    /* ************************************************************
+     *  BindingElement interface methods (the XML Element model)
+     * ************************************************************/
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingElement#setName(javax.xml.namespace.QName)
+     */
+    public void setName(QName qname) {
+        fName = qname;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingElement#setInterfaceName(javax.xml.namespace.QName)
+     */
+    public void setInterfaceName(QName qname) {
+        fInterfaceName = qname;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingElement#getInterfaceName()
+     */
+    public QName getInterfaceName() {
+        return fInterfaceName;
+    }
+
+    /* 
+     * @see org.apache.woden.wsdl20.xml.BindingElement#getInterfaceElement()
+     */
+    public InterfaceElement getInterfaceElement() {
+        //TODO consider retrieval from a common store using fInterfaceName, rather than a local copy
+        return fInterface;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingElement#setType(java.net.URI)
+     */
+    public void setType(URI type) {
+        fType = type;
+    }
+
+    /* 
+     * TODO see previous comments for fFaults and getBindingFaults() about the null key problem
+     * with the use of Map, rather than List.
+     * 
+     * @see org.apache.woden.wsdl20.xml.BindingElement#addBindingFaultElement(org.apache.woden.wsdl20.xml.BindingFaultElement)
+     */
+    public void addBindingFaultElement(BindingFaultElement fault) 
+    {
+        QName qname = fault.getRef();
+        if(qname != null) 
+        {
+            fFaults.put(qname, fault);
+        } 
+        else 
+        {
+            //Any binding faults missing their 'ref' qname, are stored in a list keyed by null.
+            List list = (List)fFaults.get(null);
+            if(list == null) {
+                list = new Vector();
+                fFaults.put(null, list);
+            }
+            list.add(fault);
+        }
+    }
+
+    /* 
+     * TODO see previous comments for fFaults and getBindingFaults() about the null key problem
+     * with the use of Map, rather than List.
+     * 
+     * @see org.apache.woden.wsdl20.xml.BindingElement#getBindingFaultElements()
+     */
+    public BindingFaultElement[] getBindingFaultElements() 
+    {
+        Collection coll = null;
+        if(fFaults.containsKey(null)) {
+            coll = (Collection)fFaults.get(null);  //collect faults without a 'ref' qname
+            Map map = new HashMap();
+            map.putAll(fFaults);
+            map.remove(null);                      //collect faults with a 'ref' qname
+            coll.addAll(map.values());             //collect all faults (with and without 'ref')
+        } else {
+            coll = fFaults.values();               //all faults have a 'ref' qname
+        }
+        
+        BindingFaultElement[] array = new BindingFaultElement[coll.size()];
+        coll.toArray(array);
+        return array;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingElement#addBindingOperationElement(org.apache.woden.wsdl20.xml.BindingOperationElement)
+     */
+    public void addBindingOperationElement(BindingOperationElement operation) 
+    {
+        fOperations.add(operation);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingElement#getBindingOperationElements()
+     */
+    public BindingOperationElement[] getBindingOperationElements() {
+        BindingOperationElement[] array = new BindingOperationElement[fOperations.size()];
+        fOperations.toArray(array);
+        return array;
+    }
+    
+    //TODO extensions
+
+    /* ************************************************************
+     *  Non-API implementation methods
+     * ************************************************************/
+    
+    /* 
+     * Get the binding fault with the specified 'ref' attribute qname.
+     * 
+     * TODO decide if this type of qname-based accessor is needed, either internally or on API. 
+     */
+    public BindingFaultElement getBindingFaultElement(QName qname) 
+    {
+        if(qname != null) {
+            return (BindingFaultElement)fFaults.get(qname);
+        } else {
+            return null;
+        }
+    }
+
+    /*
+     * Get the binding operation with the specified 'ref' attribute qname.
+     * 
+     * TODO decide if this type of qname-based accessor is needed, either internally or on API.
+     * 
+     * Note that for this type of key-based access, the choice of List rather than Map 
+     * makes the implementation more complicated - see getBindingFaultElement(QName) for 
+     * a comparison. However, List may still be a better choice as it hides the null key
+     * problem that arises when the binding operation is missing its 'ref' attribute qname.
+     * 
+     * TODO see previous comments for fFaults and getBindingFaults() about the null key problem
+     * with the use of Map, rather than List.
+     */
+    public BindingOperationElement getBindingOperationElement(QName qname) 
+    {
+        BindingOperationElement operation = null;
+        if(qname != null)
+        {
+            BindingOperationElement bindOp = null;
+            Iterator i = fOperations.iterator();
+            while(i.hasNext())
+            {
+                bindOp = (BindingOperationElement)i.next();
+                if(qname.equals(bindOp.getRef())) 
+                {
+                    operation = bindOp;
+                    break;
+                }
+            }
+        }
+        return operation;
+    }
+
+}

Added: incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingOperationImpl.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingOperationImpl.java?rev=349163&view=auto
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingOperationImpl.java (added)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/BindingOperationImpl.java Sat Nov 26 17:07:38 2005
@@ -0,0 +1,159 @@
+/**
+ * Copyright 2005 Apache Software Foundation 
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+package org.apache.woden.internal.wsdl20;
+
+import java.util.List;
+import java.util.Vector;
+
+import javax.xml.namespace.QName;
+
+import org.apache.woden.wsdl20.BindingFaultReference;
+import org.apache.woden.wsdl20.BindingMessageReference;
+import org.apache.woden.wsdl20.BindingOperation;
+import org.apache.woden.wsdl20.InterfaceOperation;
+import org.apache.woden.wsdl20.xml.BindingMessageReferenceElement;
+import org.apache.woden.wsdl20.xml.BindingOperationElement;
+import org.apache.woden.wsdl20.xml.FaultReferenceElement;
+import org.apache.woden.wsdl20.xml.InterfaceOperationElement;
+
+/**
+ * This class represents the BindingOperation component from the WSDL 2.0 Component Model 
+ * and the <operation> child element of the WSDL <binding> element.
+ * 
+ * @author jkaputin@apache.org
+ */
+public class BindingOperationImpl extends NestedConfigurableImpl 
+                                  implements BindingOperation, BindingOperationElement 
+{
+    private QName fRef = null;
+    private InterfaceOperationImpl fInterfaceOperation = null;
+    private List fMessageRefs = new Vector();
+    private List fFaultRefs = new Vector();
+
+    /* ************************************************************
+     *  BindingOperation interface methods (i.e. WSDL Component model)
+     * ************************************************************/
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.BindingOperation#getInterfaceOperation()
+     */
+    public InterfaceOperation getInterfaceOperation() {
+        //TODO consider retrieval from a common store using fRef, rather than a local copy.
+        return fInterfaceOperation;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.BindingOperation#getBindingMessageReferences()
+     */
+    public BindingMessageReference[] getBindingMessageReferences() {
+        BindingMessageReference[] array = new BindingMessageReference[fMessageRefs.size()];
+        fMessageRefs.toArray(array);
+        return array;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.BindingOperation#getBindingFaultReferences()
+     */
+    public BindingFaultReference[] getBindingFaultReferences() {
+        BindingFaultReference[] array = new BindingFaultReference[fFaultRefs.size()];
+        fFaultRefs.toArray(array);
+        return array;
+    }
+
+    /*
+     * @see org.apache.woden.wsdl20.BindingOperation#toElement()
+     */
+    public BindingOperationElement toElement() {
+        return this;
+    }
+    
+    /* ************************************************************
+     *  BindingFaultElement interface methods (the XML Element model)
+     * ************************************************************/
+    
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingOperationElement#setRef(javax.xml.namespace.QName)
+     */
+    public void setRef(QName qname) {
+        fRef = qname;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingOperationElement#getRef()
+     */
+    public QName getRef() {
+        return fRef;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingOperationElement#getInterfaceOperationElement()
+     */
+    public InterfaceOperationElement getInterfaceOperationElement() {
+        //TODO consider retrieval from a common store using fRef, rather than a local copy.
+        return fInterfaceOperation;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingOperationElement#addMessageReferenceElement(org.apache.woden.wsdl20.xml.BindingMessageReferenceElement)
+     */
+    public void addMessageReferenceElement(BindingMessageReferenceElement msgRef) {
+        fMessageRefs.add(msgRef);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingOperationElement#removeMessageReferenceElement(org.apache.woden.wsdl20.xml.BindingMessageReferenceElement)
+     */
+    public void removeMessageReferenceElement(BindingMessageReferenceElement msgRef) {
+        fMessageRefs.remove(msgRef);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingOperationElement#getMessageReferenceElements()
+     */
+    public BindingMessageReferenceElement[] getMessageReferenceElements() {
+        BindingMessageReferenceElement[] array = new BindingMessageReferenceElement[fMessageRefs.size()];
+        fMessageRefs.toArray(array);
+        return array;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingOperationElement#addFaultReferenceElement(org.apache.woden.wsdl20.xml.FaultReferenceElement)
+     */
+    public void addFaultReferenceElement(FaultReferenceElement faultRef) {
+        fFaultRefs.add(faultRef);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingOperationElement#removeFaultReferenceElement(org.apache.woden.wsdl20.xml.FaultReferenceElement)
+     */
+    public void removeFaultReferenceElement(FaultReferenceElement faultRef) {
+        fFaultRefs.remove(faultRef);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.woden.wsdl20.xml.BindingOperationElement#getFaultReferenceElements()
+     */
+    public FaultReferenceElement[] getFaultReferenceElements() {
+        FaultReferenceElement[] array = new FaultReferenceElement[fFaultRefs.size()];
+        fFaultRefs.toArray(array);
+        return array;
+    }
+
+    /* ************************************************************
+     *  Non-API implementation methods
+     * ************************************************************/
+    
+}

Modified: incubator/woden/java/src/org/apache/woden/wsdl20/Binding.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/Binding.java?rev=349163&r1=349162&r2=349163&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/Binding.java (original)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/Binding.java Sat Nov 26 17:07:38 2005
@@ -16,21 +16,27 @@
 package org.apache.woden.wsdl20;
 
 import java.net.URI;
+
 import javax.xml.namespace.QName;
 
+import org.apache.woden.wsdl20.xml.BindingElement;
+
 /**
+ * Represents the Binding component from the WSDL 2.0 Component model.
+ * 
  * @author jkaputin@apache.org
  */
-public interface Binding extends ConfigurableComponent {
-
+public interface Binding extends ConfigurableComponent 
+{
     public QName getName();
     
     public Interface getInterface();
     
     public URI getType();
     
-    public BindingFault[] getFaults();
-    
-    public BindingOperation[] getOperations();
+    public BindingFault[] getBindingFaults();
     
+    public BindingOperation[] getBindingOperations();
+
+    public BindingElement toElement();
 }

Modified: incubator/woden/java/src/org/apache/woden/wsdl20/BindingFault.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/BindingFault.java?rev=349163&r1=349162&r2=349163&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/BindingFault.java (original)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/BindingFault.java Sat Nov 26 17:07:38 2005
@@ -15,11 +15,16 @@
  */
 package org.apache.woden.wsdl20;
 
+import org.apache.woden.wsdl20.xml.BindingFaultElement;
+
 /**
+ * This interface represents the BindingFault component from the WSDL 2.0 Component model.
+ * 
  * @author jkaputin@apache.org
  */
-public interface BindingFault extends NestedComponent, ConfigurableComponent {
-
+public interface BindingFault extends NestedComponent, ConfigurableComponent 
+{
     public InterfaceFault getInterfaceFault();
-
+    
+    public BindingFaultElement toElement();
 }

Modified: incubator/woden/java/src/org/apache/woden/wsdl20/BindingFaultReference.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/BindingFaultReference.java?rev=349163&r1=349162&r2=349163&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/BindingFaultReference.java (original)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/BindingFaultReference.java Sat Nov 26 17:07:38 2005
@@ -15,11 +15,14 @@
  */
 package org.apache.woden.wsdl20;
 
+import org.apache.woden.wsdl20.xml.FaultReferenceElement;
+
 /**
  * @author jkaputin@apache.org
  */
-public interface BindingFaultReference extends NestedComponent, ConfigurableComponent {
-    
+public interface BindingFaultReference extends NestedComponent, ConfigurableComponent 
+{
     public InterfaceFaultReference getInterfaceFaultReference();
     
+    public FaultReferenceElement toElement();
 }

Modified: incubator/woden/java/src/org/apache/woden/wsdl20/BindingMessageReference.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/BindingMessageReference.java?rev=349163&r1=349162&r2=349163&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/BindingMessageReference.java (original)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/BindingMessageReference.java Sat Nov 26 17:07:38 2005
@@ -15,11 +15,14 @@
  */
 package org.apache.woden.wsdl20;
 
+import org.apache.woden.wsdl20.xml.BindingMessageReferenceElement;
+
 /**
  * @author jkaputin@apache.org
  */
-public interface BindingMessageReference extends NestedComponent, ConfigurableComponent {
-    
+public interface BindingMessageReference extends NestedComponent, ConfigurableComponent 
+{
     public InterfaceMessageReference getInterfaceMessageReference();
     
+    public BindingMessageReferenceElement toElement();
 }

Modified: incubator/woden/java/src/org/apache/woden/wsdl20/BindingOperation.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/BindingOperation.java?rev=349163&r1=349162&r2=349163&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/BindingOperation.java (original)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/BindingOperation.java Sat Nov 26 17:07:38 2005
@@ -15,15 +15,20 @@
  */
 package org.apache.woden.wsdl20;
 
+import org.apache.woden.wsdl20.xml.BindingOperationElement;
+
 /**
+ * This interface represents the BindingOperation component from the WSDL 2.0 Component model.
+ * 
  * @author jkaputin@apache.org
  */
-public interface BindingOperation extends NestedComponent, ConfigurableComponent {
-    
+public interface BindingOperation extends NestedComponent, ConfigurableComponent 
+{
     public InterfaceOperation getInterfaceOperation();
     
     public BindingMessageReference[] getBindingMessageReferences();
     
     public BindingFaultReference[] getBindingFaultReferences();
 
+    public BindingOperationElement toElement();
 }

Modified: incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingElement.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingElement.java?rev=349163&r1=349162&r2=349163&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingElement.java (original)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingElement.java Sat Nov 26 17:07:38 2005
@@ -15,6 +15,10 @@
  */
 package org.apache.woden.wsdl20.xml;
 
+import java.net.URI;
+
+import javax.xml.namespace.QName;
+
 /**
  * This interface represents a WSDL <binding> element. 
  * 
@@ -23,5 +27,58 @@
 public interface BindingElement extends DocumentableElement,
                                         ConfigurableElement
 {
-    //TODO
+    /*
+     * Attributes
+     */
+
+    /**
+     * Set the QName that represents the <tt>name</tt> attribute of the  
+     * &lt;binding&gt; element. 
+     * 
+     * @param qname the QName that identifies the binding.
+     */
+    public void setName(QName qname);
+    public QName getName();
+    
+    /**
+     * Set the QName that represents the <tt>interface</tt> attribute of the 
+     * &lt;binding&gt; element. This associates the binding with an interface.
+     * 
+     * @param qname the QName that identifies interface for this binding
+     */
+    public void setInterfaceName(QName qname);
+    public QName getInterfaceName();
+    
+    /**
+     * Get the InterfaceElement identified by the QName specified in the
+     * <tt>interface</tt> attribute of this &lt;binding&gt; element.
+     * 
+     * @return InterfaceElement the interface associated with this binding
+     */
+    public InterfaceElement getInterfaceElement();
+    
+    /**
+     * Set the URI that represents the <tt>type</tt> attribute of the 
+     * &lt;binding&gt; element. This indicates the type of concrete binding
+     * extensions contained within this binding.
+     * 
+     * @param URI the URI indicating the concrete binding
+     */
+    public void setType(URI type);
+    public URI getType();
+    
+    /*
+     * Elements
+     */
+    
+    public void addBindingFaultElement(BindingFaultElement fault);
+    public BindingFaultElement[] getBindingFaultElements();
+    //TODO remove method
+    
+    public void addBindingOperationElement(BindingOperationElement operation);
+    public BindingOperationElement[] getBindingOperationElements();
+    //TODO remove method
+    
+    //TODO extension elements
+
 }

Modified: incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingFaultElement.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingFaultElement.java?rev=349163&r1=349162&r2=349163&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingFaultElement.java (original)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingFaultElement.java Sat Nov 26 17:07:38 2005
@@ -15,9 +15,10 @@
  */
 package org.apache.woden.wsdl20.xml;
 
+import javax.xml.namespace.QName;
+
 /**
- * This interface represents the &lt;fault&gt; child element of a
- * WSDL &lt;binding&gt; element. 
+ * This interface represents the &lt;fault&gt; child element of a &lt;binding&gt; element. 
  * 
  * @author jkaputin@apache.org
  */
@@ -25,5 +26,20 @@
                                              ConfigurableElement,
                                              NestedElement
 {
-
+    /**
+     * Set the 'ref' attribute to the specified QName, which identifies the
+     * interface fault referenced by this binding fault.
+     *
+     * @param qname identifies the associated interface fault.
+     */
+    public void setRef(QName qname);
+    public QName getRef();
+    
+    /**
+     * Get the InterfaceFaultElement identified by the QName specified in the
+     * <tt>ref</tt> attribute of this binding &lt;fault&gt; element.
+     * 
+     * @return the InterfaceFaultElement associated with this binding fault
+     */
+    public InterfaceFaultElement getInterfaceFaultElement();
 }

Modified: incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingOperationElement.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingOperationElement.java?rev=349163&r1=349162&r2=349163&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingOperationElement.java (original)
+++ incubator/woden/java/src/org/apache/woden/wsdl20/xml/BindingOperationElement.java Sat Nov 26 17:07:38 2005
@@ -15,6 +15,8 @@
  */
 package org.apache.woden.wsdl20.xml;
 
+import javax.xml.namespace.QName;
+
 /**
  * This interface represents the &lt;operation&gt; child element of a
  * WSDL &lt;binding&gt; element. 
@@ -25,5 +27,37 @@
                                                  ConfigurableElement, 
                                                  NestedElement 
 {
+    /*
+     * Attributes
+     */
+    
+    /**
+     * Set the 'ref' attribute to the specified QName, which identifies the
+     * interface operation referenced by this binding operation.
+     *
+     * @param qname identifies the associated interface operation.
+     */
+    public void setRef(QName qname);
+    public QName getRef();
+
+    /**
+     * Get the InterfaceOperationElement identified by the QName specified in the
+     * <tt>ref</tt> attribute of this binding &lt;operation&gt; element.
+     * 
+     * @return the InterfaceOperationElement associated with this binding operation
+     */
+    public InterfaceOperationElement getInterfaceOperationElement();
+    
+    /*
+     * Elements
+     */
+    
+    public void addMessageReferenceElement(BindingMessageReferenceElement msgRef);
+    public void removeMessageReferenceElement(BindingMessageReferenceElement msgRef);
+    public BindingMessageReferenceElement[] getMessageReferenceElements();
 
+    public void addFaultReferenceElement(FaultReferenceElement faultRef);
+    public void removeFaultReferenceElement(FaultReferenceElement faultRef);
+    public FaultReferenceElement[] getFaultReferenceElements();
+    
 }



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