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/12/06 23:01:25 UTC

svn commit: r354583 - /incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java

Author: jkaputin
Date: Tue Dec  6 14:01:18 2005
New Revision: 354583

URL: http://svn.apache.org/viewcvs?rev=354583&view=rev
Log:
Removed some redundant comments and TODOs and improved
the info reported for error WSDL504 (QName error).

Modified:
    incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.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=354583&r1=354582&r2=354583&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java (original)
+++ incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java Tue Dec  6 14:01:18 2005
@@ -204,9 +204,6 @@
         
         desc.setDocumentBaseURI(getURI(documentBaseURI));
 
-        //TODO set extension registry here or let factory set it in newDescription?
-        
-        //target namespace is of type xs:AnyURI, so store the string
         String targetNamespace = 
             DOMUtils.getAttribute(descEl, Constants.ATTR_TARGET_NAMESPACE);
         
@@ -349,8 +346,7 @@
     {
         TypesElement types = desc.createTypesElement();
         
-        //TODO for now set to W3 XML Schema. Later,
-        //add support for non-XML Schema type systems
+        //TODO for now set to W3 XML Schema. Later, add support for non-XML Schema type systems
         types.setTypeSystem(Constants.TYPE_XSD_2001);
         
         parseExtensionAttributes(typesEl, TypesElement.class, types, desc);
@@ -534,11 +530,6 @@
             QName qname = new QName(desc.getTargetNamespace().toString(), name);
             intface.setName(qname);
         }
-        else
-        {
-            //If validation is on, let the validator handle this.
-            //TODO terminate if validation=false and continue-on-error=false.
-        }
         
         String styleDefault = DOMUtils.getAttribute(interfaceEl, Constants.ATTR_STYLE_DEFAULT);
         if(styleDefault != null)
@@ -637,7 +628,7 @@
                 getErrorReporter().reportError( 
                         new ErrorLocatorImpl(),  //TODO line&col nos.
                         "WSDL504",
-                        new Object[] {element, faultEl.getLocalName()}, 
+                        new Object[] {element, QNameUtils.newQName(faultEl)}, 
                         ErrorReporter.SEVERITY_ERROR);
             }
         }
@@ -687,11 +678,6 @@
             QName qname = new QName(desc.getTargetNamespace().toString(), name);
             oper.setName(qname);
         }
-        else
-        {
-            //Required, so if validation is on let the validator handle this.
-            //TODO terminate if validation=false and continue-on-error=false.
-        }
         
         String style = DOMUtils.getAttribute(operEl, Constants.ATTR_STYLE);
         if(style != null)
@@ -791,7 +777,7 @@
                 getErrorReporter().reportError( 
                         new ErrorLocatorImpl(),  //TODO line&col nos.
                         "WSDL504",
-                        new Object[] {ref, faultRefEl.getLocalName()}, 
+                        new Object[] {ref, QNameUtils.newQName(faultRefEl)}, 
                         ErrorReporter.SEVERITY_ERROR);
             }
         }
@@ -889,7 +875,7 @@
                     getErrorReporter().reportError( 
                             new ErrorLocatorImpl(),  //TODO line&col nos.
                             "WSDL504",
-                            new Object[] {element, msgRefEl.getLocalName()}, 
+                            new Object[] {element, QNameUtils.newQName(msgRefEl)}, 
                             ErrorReporter.SEVERITY_ERROR);
                 }
             }
@@ -937,7 +923,6 @@
     {
         BindingElement binding = desc.createBindingElement();
 
-        //'name' attribute
         String name = DOMUtils.getAttribute(bindEl, Constants.ATTR_NAME);
         if(name != null)
         {
@@ -945,7 +930,6 @@
             binding.setName(qname);
         }
         
-        //'interface' attribute
         String intface = DOMUtils.getAttribute(bindEl, Constants.ATTR_INTERFACE);
         if(intface != null)
         {
@@ -956,12 +940,11 @@
                 getErrorReporter().reportError( 
                         new ErrorLocatorImpl(),  //TODO line&col nos.
                         "WSDL504",
-                        new Object[] {intface, bindEl.getLocalName()}, 
+                        new Object[] {intface, QNameUtils.newQName(bindEl)}, 
                         ErrorReporter.SEVERITY_ERROR);
             }
         }
         
-        //'type' attribute
         String type = DOMUtils.getAttribute(bindEl, Constants.ATTR_TYPE);
         if(type != null) {
             binding.setType(getURI(type));
@@ -1019,7 +1002,6 @@
     {
         BindingFaultElement fault = desc.createBindingFaultElement();
         
-        //'ref' attribute
         String ref = DOMUtils.getAttribute(bindFaultEl, Constants.ATTR_REF);
         if(ref != null)
         {
@@ -1030,7 +1012,7 @@
                 getErrorReporter().reportError( 
                         new ErrorLocatorImpl(),  //TODO line&col nos.
                         "WSDL504",
-                        new Object[] {ref, bindFaultEl.getLocalName()}, 
+                        new Object[] {ref, QNameUtils.newQName(bindFaultEl)}, 
                         ErrorReporter.SEVERITY_ERROR);
             }
         }
@@ -1080,7 +1062,6 @@
     {
         BindingOperationElement oper = desc.createBindingOperationElement();
         
-        //'ref' attribute
         String ref = DOMUtils.getAttribute(bindOpEl, Constants.ATTR_REF);
         if(ref != null)
         {
@@ -1091,7 +1072,7 @@
                 getErrorReporter().reportError( 
                         new ErrorLocatorImpl(),  //TODO line&col nos.
                         "WSDL504",
-                        new Object[] {ref, bindOpEl.getLocalName()}, 
+                        new Object[] {ref, QNameUtils.newQName(bindOpEl)}, 
                         ErrorReporter.SEVERITY_ERROR);
             }
         }
@@ -1175,7 +1156,7 @@
                 getErrorReporter().reportError( 
                         new ErrorLocatorImpl(),  //TODO line&col nos.
                         "WSDL504",
-                        new Object[] {ref, faultRefEl.getLocalName()}, 
+                        new Object[] {ref, QNameUtils.newQName(faultRefEl)}, 
                         ErrorReporter.SEVERITY_ERROR);
             }
         }
@@ -1372,8 +1353,6 @@
      * may only be present if it contains the NMToken "#value", which
      * indicates that this <property> specifies a value, not a constraint.
      * 
-     * TODO validate usage of 'value' and 'constraint' (i.e. in the Validator)
-     * 
      * This method will parse all child elements of <property> without 
      * checking for any erroneous use of  <value> and <constraint>.
      * This will be done later by validation, if it's enabled. 
@@ -1435,15 +1414,12 @@
                                 QName qname = DOMUtils.getQName(textValue, tempEl, desc);
                                 property.setConstraintName(qname);
                             } catch (WSDLException e) {
-                                //Bad qname, so report the error, leave property's constraint 
-                                //field null and let validator handle it later.
                                 getErrorReporter().reportError(
                                         new ErrorLocatorImpl(),  //TODO line&col nos.
                                         "WSDL504",
-                                        new Object[] {textValue, tempEl.getLocalName()},
+                                        new Object[] {textValue, QNameUtils.newQName(tempEl)},
                                         ErrorReporter.SEVERITY_ERROR,
                                         e);
-                                //TODO terminate if validation is off and continue-on-error is off
                             }
                         }
                     }



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