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/01 12:53:50 UTC

svn commit: r330035 - in /incubator/woden/java/src/org/apache/woden/internal: DOMWSDLReader.java wsdl20/InterfaceFaultReferenceImpl.java

Author: jkaputin
Date: Tue Nov  1 03:53:40 2005
New Revision: 330035

URL: http://svn.apache.org/viewcvs?rev=330035&view=rev
Log:
Implementation of parseInterfaceFaultReference and
related bits of InterfaceFaultReferenceImpl.

Modified:
    incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultReferenceImpl.java

Modified: incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java?rev=330035&r1=330034&r2=330035&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java (original)
+++ incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java Tue Nov  1 03:53:40 2005
@@ -571,10 +571,56 @@
     }
 
     private FaultReferenceElement parseInterfaceFaultReference(
-                                         Element inputEl,
+                                         Element faultRefEl,
                                          DescriptionElement desc)
+                                         throws WSDLException
     {
-        return null; //TODO
+        FaultReferenceElement faultRef = desc.createInterfaceFaultReferenceElement();
+        
+        String ref = DOMUtils.getAttribute(faultRefEl, Constants.ATTR_REF);
+        if(ref != null)
+        {
+            try {
+                QName qname = DOMUtils.getQName(ref, faultRefEl, desc);
+                faultRef.setRef(qname);
+            } catch (WSDLException e) {
+                getErrorReporter().reportError( 
+                        new ErrorLocatorImpl(),  //TODO line&col nos.
+                        "WSDL504",
+                        new Object[] {ref, faultRefEl.getLocalName()}, 
+                        ErrorReporter.SEVERITY_ERROR);
+            }
+        }
+
+        faultRef.setMessageLabel(DOMUtils.getAttribute(faultRefEl, Constants.ATTR_MESSAGE_LABEL));
+        
+        //TODO extension attributes
+
+        Element tempEl = DOMUtils.getFirstChildElement(faultRefEl);
+
+        while (tempEl != null)
+        {
+            if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
+            {
+                faultRef.addDocumentationElement(parseDocumentation(tempEl, desc));
+            }
+            else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
+            {
+                faultRef.addFeatureElement(parseFeature(tempEl, desc));
+            }
+            else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
+            {
+                faultRef.addPropertyElement(parseProperty(tempEl, desc));
+            }
+            else
+            {
+                //TODO extension elements
+            }
+            
+            tempEl = DOMUtils.getNextSiblingElement(tempEl);
+        }
+        
+        return faultRef;
     }
 
     /* ******************************************************************

Modified: incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultReferenceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultReferenceImpl.java?rev=330035&r1=330034&r2=330035&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultReferenceImpl.java (original)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceFaultReferenceImpl.java Tue Nov  1 03:53:40 2005
@@ -20,6 +20,7 @@
 import org.apache.woden.wsdl20.Component;
 import org.apache.woden.wsdl20.InterfaceFault;
 import org.apache.woden.wsdl20.InterfaceFaultReference;
+import org.apache.woden.wsdl20.InterfaceOperation;
 import org.apache.woden.wsdl20.xml.FaultReferenceElement;
 
 /**
@@ -32,13 +33,20 @@
                                          implements InterfaceFaultReference,
                                                     FaultReferenceElement 
 {
+    //WSDL Component model data
+    private InterfaceFault fInterfaceFault = null;
+    private String fMessageLabel = null;
+    private String fDirection = null;
+    private InterfaceOperation fParent = null;
+    
+    //XML Element model data
+    QName fRef = null;
 
     /* (non-Javadoc)
      * @see org.apache.woden.wsdl20.InterfaceFaultReference#getInterfaceFault()
      */
     public InterfaceFault getInterfaceFault() {
-        // TODO Auto-generated method stub
-        return null;
+        return fInterfaceFault;
     }
 
     /* (non-Javadoc)
@@ -46,23 +54,21 @@
      * @see org.apache.woden.wsdl20.xml.FaultReferenceElement#getMessageLabel()
      */
     public String getMessageLabel() {
-        // TODO Auto-generated method stub
-        return null;
+        return fMessageLabel;
     }
 
     /* (non-Javadoc)
      * @see org.apache.woden.wsdl20.InterfaceFaultReference#getDirection()
      */
     public String getDirection() {
-        // TODO Auto-generated method stub
-        return null;
+        return fDirection;
     }
 
     /* (non-Javadoc)
      * @see org.apache.woden.wsdl20.xml.FaultReferenceElement#setRef(javax.xml.namespace.QName)
      */
     public void setRef(QName faultQName) {
-        // TODO Auto-generated method stub
+        fRef = faultQName;
 
     }
 
@@ -70,24 +76,21 @@
      * @see org.apache.woden.wsdl20.xml.FaultReferenceElement#getRef()
      */
     public QName getRef() {
-        // TODO Auto-generated method stub
-        return null;
+        return fRef;
     }
 
     /* (non-Javadoc)
      * @see org.apache.woden.wsdl20.xml.FaultReferenceElement#setMessageLabel(java.lang.String)
      */
     public void setMessageLabel(String msgLabel) {
-        // TODO Auto-generated method stub
-
+        fMessageLabel = msgLabel;
     }
 
     /* (non-Javadoc)
      * @see org.apache.woden.wsdl20.NestedComponent#getParent()
      */
     public Component getParent() {
-        // TODO Auto-generated method stub
-        return null;
+        return fParent;
     }
 
 }



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