Author: jkaputin
Date: Thu Oct 19 03:56:25 2006
New Revision: 465567

URL: http://svn.apache.org/viewvc?view=rev&rev=465567
Log:
Renamed XMLElement.getAttribute(String) to 
getAttributeValue(String).
Commented out the XMLElement.getAttributes() method
for the time being as it is not yet required.

Modified:
    incubator/woden/branches/WODEN-44/src/org/apache/woden/XMLElement.java
    
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseWSDLReader.java
    
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseXMLElement.java
    
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMWSDLReader.java
    
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMXMLElement.java
    
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/OMXMLElement.java
    
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java
    
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java
    
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java
    
incubator/woden/branches/WODEN-44/test/org/apache/woden/DOMXMLElementTest.java
    
incubator/woden/branches/WODEN-44/test/org/apache/woden/OMXMLElementTest.java

Modified: incubator/woden/branches/WODEN-44/src/org/apache/woden/XMLElement.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/src/org/apache/woden/XMLElement.java?view=diff&rev=465567&r1=465566&r2=465567
==============================================================================
--- incubator/woden/branches/WODEN-44/src/org/apache/woden/XMLElement.java 
(original)
+++ incubator/woden/branches/WODEN-44/src/org/apache/woden/XMLElement.java Thu 
Oct 19 03:56:25 2006
@@ -59,10 +59,16 @@
      * Methods for Accessing the contents of the element
      * **********************************************************************/
 
-    /**
+    /* TODO This method is not yet needed but can be added if it's required.
+     * It will require the creation of XMLAttribute with the methods 
getLocalName,
+     * getNamespaceURI, getPrefix and getValue. Then, the 
parseExtensionAttributes
+     * method can be refactored into BaseWSDLReader. Will also need to consider
+     * overlap/synergy with the XMLAttr classes used for extension attributes.
+     * 
      * @return a list of attributes associated with the XML element
-     */
-    public List getAttributes();
+     *
+    public XMLAttribute[] getAttributes();
+    */
 
     /**
      * Returns the value of the specified attribute or null if it is not found.
@@ -70,7 +76,7 @@
      * @param attrName name of attribute to look for
      * @return the attribute value including prefix if present
      */
-    public String getAttribute(String attrName);
+    public String getAttributeValue(String attrName);
 
     /**
      *

Modified: 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseWSDLReader.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseWSDLReader.java?view=diff&rev=465567&r1=465566&r2=465567
==============================================================================
--- 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseWSDLReader.java
 (original)
+++ 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseWSDLReader.java
 Thu Oct 19 03:56:25 2006
@@ -338,7 +338,7 @@
         desc.setDocumentBaseURI(getURI(documentBaseURI));
 
         String targetNamespace = 
-            descEl.getAttribute(Constants.ATTR_TARGET_NAMESPACE);
+            descEl.getAttributeValue(Constants.ATTR_TARGET_NAMESPACE);
         
         if(targetNamespace != null)
         {
@@ -443,8 +443,8 @@
 
         ImportElement imp = desc.addImportElement();
 
-        String namespaceURI = importEl.getAttribute(Constants.ATTR_NAMESPACE);
-        String locationURI = importEl.getAttribute(Constants.ATTR_LOCATION);
+        String namespaceURI = 
importEl.getAttributeValue(Constants.ATTR_NAMESPACE);
+        String locationURI = 
importEl.getAttributeValue(Constants.ATTR_LOCATION);
 
         parseExtensionAttributes(importEl, ImportElement.class, imp, desc);
 
@@ -474,7 +474,7 @@
 
         IncludeElement include = desc.addIncludeElement();
 
-        String locationURI = includeEl.getAttribute(Constants.ATTR_LOCATION);
+        String locationURI = 
includeEl.getAttributeValue(Constants.ATTR_LOCATION);
 
         parseExtensionAttributes(includeEl, IncludeElement.class, include, 
desc);
 
@@ -556,14 +556,14 @@
         
         InterfaceElement intface = desc.addInterfaceElement();
 
-        String name = interfaceEl.getAttribute(Constants.ATTR_NAME);
+        String name = interfaceEl.getAttributeValue(Constants.ATTR_NAME);
 
         if(name != null)
         {
             intface.setName(new NCName(name));
         }
 
-        String styleDefault = 
interfaceEl.getAttribute(Constants.ATTR_STYLE_DEFAULT);
+        String styleDefault = 
interfaceEl.getAttributeValue(Constants.ATTR_STYLE_DEFAULT);
         if(styleDefault != null)
         {
             List stringList = StringUtils.parseNMTokens(styleDefault);
@@ -576,7 +576,7 @@
             }
         }
 
-        String extendsAtt = interfaceEl.getAttribute(Constants.ATTR_EXTENDS);
+        String extendsAtt = 
interfaceEl.getAttributeValue(Constants.ATTR_EXTENDS);
         if(extendsAtt != null)
         {
             List stringList = StringUtils.parseNMTokens(extendsAtt);
@@ -653,13 +653,13 @@
         InterfaceFaultElement fault = parent.addInterfaceFaultElement();
         fault.setParentElement(parent);
 
-        String name = faultEl.getAttribute(Constants.ATTR_NAME);
+        String name = faultEl.getAttributeValue(Constants.ATTR_NAME);
         if(name != null)
         {
             fault.setName(new NCName(name));
         }
 
-        String element = faultEl.getAttribute(Constants.ATTR_ELEMENT);
+        String element = faultEl.getAttributeValue(Constants.ATTR_ELEMENT);
         if(element != null)
         {
             try {
@@ -716,13 +716,13 @@
         InterfaceOperationElement oper = parent.addInterfaceOperationElement();
         oper.setParentElement(parent);
 
-        String name = operEl.getAttribute(Constants.ATTR_NAME);
+        String name = operEl.getAttributeValue(Constants.ATTR_NAME);
         if(name != null)
         {
             oper.setName(new NCName(name));
         }
 
-        String style = operEl.getAttribute(Constants.ATTR_STYLE);
+        String style = operEl.getAttributeValue(Constants.ATTR_STYLE);
         if(style != null)
         {
             List stringList = StringUtils.parseNMTokens(style);
@@ -735,7 +735,7 @@
             }
         }
 
-        String pat = operEl.getAttribute(Constants.ATTR_PATTERN);
+        String pat = operEl.getAttributeValue(Constants.ATTR_PATTERN);
         if(pat != null)
         {
             oper.setPattern(getURI(pat));
@@ -813,7 +813,7 @@
             faultRef.setDirection(Direction.OUT);
         }
 
-        String ref = faultRefEl.getAttribute(Constants.ATTR_REF);
+        String ref = faultRefEl.getAttributeValue(Constants.ATTR_REF);
         if(ref != null)
         {
             try {
@@ -828,7 +828,7 @@
             }
         }
 
-        String msgLabel = 
faultRefEl.getAttribute(Constants.ATTR_MESSAGE_LABEL);
+        String msgLabel = 
faultRefEl.getAttributeValue(Constants.ATTR_MESSAGE_LABEL);
         if(msgLabel != null)
         {
             faultRef.setMessageLabel(new NCName(msgLabel));
@@ -883,7 +883,7 @@
             message.setDirection(Direction.OUT);
         }
 
-        String msgLabel = msgRefEl.getAttribute(Constants.ATTR_MESSAGE_LABEL);
+        String msgLabel = 
msgRefEl.getAttributeValue(Constants.ATTR_MESSAGE_LABEL);
         if(msgLabel != null) 
         {
             message.setMessageLabel(new NCName(msgLabel));
@@ -901,7 +901,7 @@
             }
         }
 
-        String element = msgRefEl.getAttribute(Constants.ATTR_ELEMENT);
+        String element = msgRefEl.getAttributeValue(Constants.ATTR_ELEMENT);
         if(element != null)
         {
             if(element.equals(Constants.NMTOKEN_ANY) ||
@@ -973,14 +973,14 @@
 
         BindingElement binding = desc.addBindingElement();
 
-        String name = bindEl.getAttribute(Constants.ATTR_NAME);
+        String name = bindEl.getAttributeValue(Constants.ATTR_NAME);
         if(name != null)
         {
             binding.setName(new NCName(name));
         }
 
         QName intfaceQN = null;
-        String intface = bindEl.getAttribute(Constants.ATTR_INTERFACE);
+        String intface = bindEl.getAttributeValue(Constants.ATTR_INTERFACE);
         if(intface != null)
         {
             try {
@@ -995,7 +995,7 @@
             }
         }
 
-        String type = bindEl.getAttribute(Constants.ATTR_TYPE);
+        String type = bindEl.getAttributeValue(Constants.ATTR_TYPE);
         if(type != null) {
             binding.setType(getURI(type));
         }
@@ -1057,7 +1057,7 @@
         fault.setParentElement(parent);
 
         QName intFltQN = null;
-        String ref = bindFaultEl.getAttribute(Constants.ATTR_REF);
+        String ref = bindFaultEl.getAttributeValue(Constants.ATTR_REF);
         if(ref != null)
         {
             try {
@@ -1122,7 +1122,7 @@
         oper.setParentElement(parent);
 
         QName refQN = null;
-        String ref = bindOpEl.getAttribute(Constants.ATTR_REF);
+        String ref = bindOpEl.getAttributeValue(Constants.ATTR_REF);
         if(ref != null)
         {
             try {
@@ -1203,7 +1203,7 @@
         faultRef.setParentElement(parent);
 
         QName refQN = null;
-        String ref = faultRefEl.getAttribute(Constants.ATTR_REF);
+        String ref = faultRefEl.getAttributeValue(Constants.ATTR_REF);
         if(ref != null)
         {
             try {
@@ -1218,7 +1218,7 @@
             }
         }
 
-        String msgLabel = 
faultRefEl.getAttribute(Constants.ATTR_MESSAGE_LABEL);
+        String msgLabel = 
faultRefEl.getAttributeValue(Constants.ATTR_MESSAGE_LABEL);
         if(msgLabel != null)
         {
             faultRef.setMessageLabel(new NCName(msgLabel));
@@ -1280,7 +1280,7 @@
             message.setDirection(Direction.OUT);
         }
 
-        String msgLabel = msgRefEl.getAttribute(Constants.ATTR_MESSAGE_LABEL);
+        String msgLabel = 
msgRefEl.getAttributeValue(Constants.ATTR_MESSAGE_LABEL);
         if(msgLabel != null) 
         {
             message.setMessageLabel(new NCName(msgLabel));
@@ -1345,14 +1345,14 @@
 
         ServiceElement service = desc.addServiceElement();
 
-        String name = serviceEl.getAttribute(Constants.ATTR_NAME);
+        String name = serviceEl.getAttributeValue(Constants.ATTR_NAME);
         if(name != null)
         {
             service.setName(new NCName(name));
         }
 
         QName intfaceQN = null;
-        String intface = serviceEl.getAttribute(Constants.ATTR_INTERFACE);
+        String intface = serviceEl.getAttributeValue(Constants.ATTR_INTERFACE);
         if(intface != null)
         {
             try {
@@ -1421,14 +1421,14 @@
         EndpointElement endpoint = parent.addEndpointElement();
         endpoint.setParentElement(parent);
 
-        String name = endpointEl.getAttribute(Constants.ATTR_NAME);
+        String name = endpointEl.getAttributeValue(Constants.ATTR_NAME);
         if(name != null)
         {
             endpoint.setName(new NCName(name));
         }
 
         QName bindingQN = null;
-        String binding = endpointEl.getAttribute(Constants.ATTR_BINDING);
+        String binding = endpointEl.getAttributeValue(Constants.ATTR_BINDING);
         if(binding != null)
         {
             try {
@@ -1443,7 +1443,7 @@
             }
         }
 
-        String address = endpointEl.getAttribute(Constants.ATTR_ADDRESS);
+        String address = endpointEl.getAttributeValue(Constants.ATTR_ADDRESS);
 
         if(address != null)
         {
@@ -1498,13 +1498,13 @@
         FeatureElement feature = parent.addFeatureElement();
         feature.setParentElement(parent);
 
-        String ref = featEl.getAttribute(Constants.ATTR_REF);
+        String ref = featEl.getAttributeValue(Constants.ATTR_REF);
         if(ref != null)
         {
             feature.setRef(getURI(ref));
         }
 
-        String req = featEl.getAttribute(Constants.ATTR_REQUIRED);
+        String req = featEl.getAttributeValue(Constants.ATTR_REQUIRED);
         feature.setRequired(Constants.VALUE_TRUE.equals(req) ? true : false);
         //TODO t.b.c. what if attr value is not 'true' or 'false'? (eg, 
missing, mispelt or not lower case.
 

Modified: 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseXMLElement.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseXMLElement.java?view=diff&rev=465567&r1=465566&r2=465567
==============================================================================
--- 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseXMLElement.java
 (original)
+++ 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/BaseXMLElement.java
 Thu Oct 19 03:56:25 2006
@@ -57,17 +57,17 @@
      * (non-Javadoc)
      * @see org.apache.woden.XMLElement#getAttribute(java.lang.String)
      */
-    public final String getAttribute(String attrName) {
+    public final String getAttributeValue(String attrName) {
        
        if(fSource != null) {
-               return doGetAttribute(attrName);
+               return doGetAttributeValue(attrName);
        } else { 
                return null;
        }
        
     }
     
-    protected abstract String doGetAttribute(String attrName);
+    protected abstract String doGetAttributeValue(String attrName);
 
     /*
      * (non-Javadoc)

Modified: 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMWSDLReader.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMWSDLReader.java?view=diff&rev=465567&r1=465566&r2=465567
==============================================================================
--- 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMWSDLReader.java
 (original)
+++ 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMWSDLReader.java
 Thu Oct 19 03:56:25 2006
@@ -259,9 +259,9 @@
     {
         InlinedSchemaImpl schema = new InlinedSchemaImpl();
         
-        schema.setId(schemaEl.getAttribute(Constants.ATTR_ID));
+        schema.setId(schemaEl.getAttributeValue(Constants.ATTR_ID));
         
-        String tns = schemaEl.getAttribute(Constants.ATTR_TARGET_NAMESPACE);
+        String tns = 
schemaEl.getAttributeValue(Constants.ATTR_TARGET_NAMESPACE);
         if(tns != null) {
             schema.setNamespace(getURI(tns));
         }
@@ -313,12 +313,12 @@
     {
         ImportedSchemaImpl schema = new ImportedSchemaImpl();
         
-        String ns = importEl.getAttribute(Constants.ATTR_NAMESPACE);
+        String ns = importEl.getAttributeValue(Constants.ATTR_NAMESPACE);
         if(ns != null) {
             schema.setNamespace(getURI(ns));
         }
         
-        String sloc = 
importEl.getAttribute(SchemaConstants.ATTR_SCHEMA_LOCATION);
+        String sloc = 
importEl.getAttributeValue(SchemaConstants.ATTR_SCHEMA_LOCATION);
         if(sloc != null) {
             schema.setSchemaLocation(getURI(sloc));
         }
@@ -458,7 +458,7 @@
         PropertyElement property = parent.addPropertyElement();
         property.setParentElement(parent);
         
-        String ref = propEl.getAttribute(Constants.ATTR_REF);
+        String ref = propEl.getAttributeValue(Constants.ATTR_REF);
         if(ref != null)
         {
             property.setRef(getURI(ref));

Modified: 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMXMLElement.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMXMLElement.java?view=diff&rev=465567&r1=465566&r2=465567
==============================================================================
--- 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMXMLElement.java
 (original)
+++ 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/DOMXMLElement.java
 Thu Oct 19 03:56:25 2006
@@ -60,29 +60,32 @@
 
     }
 
-    //TODO refactor this as per the other methods and return XMLAttribute[].
-    public List getAttributes() {
-        String nodename, prefix;
-        if (fSource instanceof Element){
-            Element el = (Element)fSource;
-            List attrs = new Vector();
-            NamedNodeMap attrMap = el.getAttributes();
-            for(int i = 0; i < attrMap.getLength(); i++){
-              nodename = attrMap.item(i).getNodeName();
-              prefix = attrMap.item(i).getPrefix();
+    /*TODO complete this method if it's added to XMLElement.
+     * 
+    public XMLAttribute[] getAttributes() {
 
-              if ( !(Constants.ATTR_XMLNS.equals(nodename) || 
-                        Constants.ATTR_XMLNS.equals(prefix)) ) {
-                  attrs.add(attrMap.item(i));
-              }
+        String nodename, prefix;
+        Element el = (Element)fSource;
+        List attrs = new Vector();
+        NamedNodeMap attrMap = el.getAttributes();
+        for(int i = 0; i < attrMap.getLength(); i++){
+            nodename = attrMap.item(i).getNodeName();
+            prefix = attrMap.item(i).getPrefix();
+            if ( !(Constants.ATTR_XMLNS.equals(nodename) || 
+                    Constants.ATTR_XMLNS.equals(prefix)) ) {
+                //TODO create an XMLAttribute from attrMap.item(i)
+                //attrs.add(xmlAttribute);
             }
-
-            return attrs;
         }
-        return null;
+
+        XMLElement[] array = new XMLElement[attrs.size()];
+        attrs.toArray(array);
+        return array;
     }
+    */
+
 
-    protected String doGetAttribute(String attrName) {
+    protected String doGetAttributeValue(String attrName) {
        
        Element el = (Element)fSource;
        return getAttribute(el, attrName);

Modified: 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/OMXMLElement.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/OMXMLElement.java?view=diff&rev=465567&r1=465566&r2=465567
==============================================================================
--- 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/OMXMLElement.java
 (original)
+++ 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/OMXMLElement.java
 Thu Oct 19 03:56:25 2006
@@ -52,7 +52,10 @@
 
     }
 
-    public List getAttributes() {
+    /*TODO complete this method if it's added to XMLElement.
+     *
+    public XMLAttribute[] getAttributes() {
+
         if (fSource instanceof OMElement){
             OMElement elem = (OMElement)fSource;
             List attrs = new Vector();
@@ -60,14 +63,18 @@
             while (iter.hasNext()){
                 //No need to check for xmlns, since AXIOM knows that if it's 
prefixed
                 // with xmlns, that it's not an attribute
-                attrs.add(iter.next());
+                //TODO create an XMLAttribute from iter.next()
+                //attrs.add(xmlAttribute);
             }
-            return attrs;
         }
-        return null;
+
+        XMLElement[] array = new XMLElement[attrs.size()];
+        attrs.toArray(array);
+        return array;
     }
+     */
 
-    public String getAttribute(String attrName) {
+    public String getAttributeValue(String attrName) {
         if (fSource instanceof OMElement){
             OMElement elem = (OMElement)fSource;
             return elem.getAttributeValue(new QName(attrName));

Modified: 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java?view=diff&rev=465567&r1=465566&r2=465567
==============================================================================
--- 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java
 (original)
+++ 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java
 Thu Oct 19 03:56:25 2006
@@ -56,10 +56,10 @@
         httpHdr.setExtensionType(extType);
         httpHdr.setParentElement((WSDLElement)parent);
         
-        String name = extEl.getAttribute(Constants.ATTR_NAME);
+        String name = extEl.getAttributeValue(Constants.ATTR_NAME);
         httpHdr.setName(name);
         
-        String typeQN = extEl.getAttribute(Constants.ATTR_TYPE);
+        String typeQN = extEl.getAttributeValue(Constants.ATTR_TYPE);
         if(typeQN != null)
         {
             try {
@@ -75,7 +75,7 @@
         }
 
         //TRUE if attribute is "true", FALSE if it is "false", omitted or 
non-boolean.
-        String required = extEl.getAttribute(Constants.ATTR_REQUIRED);
+        String required = extEl.getAttributeValue(Constants.ATTR_REQUIRED);
         httpHdr.setRequired(new Boolean(required));
 
         return httpHdr;

Modified: 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java?view=diff&rev=465567&r1=465566&r2=465567
==============================================================================
--- 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java
 (original)
+++ 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java
 Thu Oct 19 03:56:25 2006
@@ -58,7 +58,7 @@
         soapHdr.setExtensionType(extType);
         soapHdr.setParentElement((WSDLElement)parent);
         
-        String elemDeclQN = extEl.getAttribute(Constants.ATTR_ELEMENT);
+        String elemDeclQN = extEl.getAttributeValue(Constants.ATTR_ELEMENT);
         if(elemDeclQN != null)
         {
             try {
@@ -74,11 +74,11 @@
         }
         
         //This property defaults to 'false' if it is omitted.
-        String mustUnderstand = 
extEl.getAttribute(SOAPConstants.ATTR_MUSTUNDERSTAND);
+        String mustUnderstand = 
extEl.getAttributeValue(SOAPConstants.ATTR_MUSTUNDERSTAND);
         soapHdr.setMustUnderstand(new Boolean(mustUnderstand));
 
         //This property defaults to 'false' if it is omitted.
-        String required = extEl.getAttribute(Constants.ATTR_REQUIRED);
+        String required = extEl.getAttributeValue(Constants.ATTR_REQUIRED);
         soapHdr.setRequired(new Boolean(required));
 
         ((SOAPHeaderBlockImpl)soapHdr).setTypes(desc.getTypesElement());

Modified: 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java?view=diff&rev=465567&r1=465566&r2=465567
==============================================================================
--- 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java
 (original)
+++ 
incubator/woden/branches/WODEN-44/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java
 Thu Oct 19 03:56:25 2006
@@ -61,7 +61,7 @@
         soapMod.setExtensionType(elementType);
         soapMod.setParentElement((WSDLElement)parent);
 
-        String ref = el.getAttribute(Constants.ATTR_REF);
+        String ref = el.getAttributeValue(Constants.ATTR_REF);
         if(ref != null) 
         {
             URI uri;
@@ -79,7 +79,7 @@
         }
         
         //This property defaults to 'false' if it is omitted.
-        String required = el.getAttribute(Constants.ATTR_REQUIRED);
+        String required = el.getAttributeValue(Constants.ATTR_REQUIRED);
         soapMod.setRequired(new Boolean(required));
         
         //TODO parseExtensionAttributes(el, SOAPModuleElement.class, soapMod, 
desc);

Modified: 
incubator/woden/branches/WODEN-44/test/org/apache/woden/DOMXMLElementTest.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/test/org/apache/woden/DOMXMLElementTest.java?view=diff&rev=465567&r1=465566&r2=465567
==============================================================================
--- 
incubator/woden/branches/WODEN-44/test/org/apache/woden/DOMXMLElementTest.java 
(original)
+++ 
incubator/woden/branches/WODEN-44/test/org/apache/woden/DOMXMLElementTest.java 
Thu Oct 19 03:56:25 2006
@@ -70,6 +70,8 @@
       assertNotNull(domXMLElement.getFirstChildElement());
   }
 
+  /* TODO implement this method only if getAttributes() is added to XMLElement.
+   * 
   public void testGetAttributes() throws WSDLException {
 
       //The <binding> element in the hotelReservation WSDL has many attributes
@@ -89,8 +91,9 @@
           }
       }
   }
+  */
 
-    public void testGetAttribute() throws WSDLException {
+    public void testGetAttributeValue() throws WSDLException {
         //The <binding> element in the hotelReservation WSDL has many 
attributes
        //So, let's test with that element
        DOMXMLElement domXMLElement = new DOMXMLElement(errorReporter);
@@ -102,7 +105,7 @@
            while (tempEl != null){
                  if (DOMQNameUtils.matches(Constants.Q_ELEM_BINDING, tempEl)){
                      domXMLElement.setSource(tempEl);
-                     assertNotNull(domXMLElement.getAttribute("name"));
+                     assertNotNull(domXMLElement.getAttributeValue("name"));
                  }
                tempEl = DOMUtils.getNextSiblingElement(tempEl);
            }

Modified: 
incubator/woden/branches/WODEN-44/test/org/apache/woden/OMXMLElementTest.java
URL: 
http://svn.apache.org/viewvc/incubator/woden/branches/WODEN-44/test/org/apache/woden/OMXMLElementTest.java?view=diff&rev=465567&r1=465566&r2=465567
==============================================================================
--- 
incubator/woden/branches/WODEN-44/test/org/apache/woden/OMXMLElementTest.java 
(original)
+++ 
incubator/woden/branches/WODEN-44/test/org/apache/woden/OMXMLElementTest.java 
Thu Oct 19 03:56:25 2006
@@ -58,6 +58,8 @@
       assertNotNull(omXMLElement.getFirstChildElement());
   }
 
+  /* TODO implement this method only if getAttributes() is added to XMLElement.
+   * 
     public void testGetAttributes() throws WSDLException {
 
         //The <binding> element in the hotelReservation WSDL has many 
attributes
@@ -78,8 +80,9 @@
             }
         }
     }
+    */
 
-    public void testGetAttribute() throws WSDLException {
+    public void testGetAttributeValue() throws WSDLException {
         OMXMLElement omXMLElement = new OMXMLElement(errorReporter);
         omXMLElement.setSource(elem);
         Object obj;
@@ -91,7 +94,7 @@
                 OMElement childEl = (OMElement) childEls.next();
                  if (OMQNameUtils.matches(Constants.Q_ELEM_BINDING, childEl)){
                     omXMLElement.setSource(childEl);
-                    assertNotNull(omXMLElement.getAttribute("name"));
+                    assertNotNull(omXMLElement.getAttributeValue("name"));
                      break;
                 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to