You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by az...@apache.org on 2006/09/06 15:45:14 UTC

svn commit: r440713 - in /webservices/axis2/trunk/java/modules: kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java saaj/src/org/apache/axis2/saaj/SOAPElementImpl.java

Author: azeez
Date: Wed Sep  6 06:45:13 2006
New Revision: 440713

URL: http://svn.apache.org/viewvc?view=rev&rev=440713
Log:
1. Fixed issue AXIS2-1096
2. Variable name change


Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
    webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPElementImpl.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?view=diff&rev=440713&r1=440712&r2=440713
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java Wed Sep  6 06:45:13 2006
@@ -213,15 +213,14 @@
                         //Check for action header and set it in as soapAction in MessageContext
                         int index = contentType.indexOf("action");
                         if (index > -1) {
-                            String transientString = contentType.substring(index,contentType.length());
+                            String transientString = contentType.substring(index, contentType.length());
                             int equal = transientString.indexOf("=");
-                            int firstComma = transientString.indexOf(";");
+                            int firstSemiColon = transientString.indexOf(";");
                             String soapAction; // This will contain "" in the string
-                            if (firstComma > -1) {
-                                soapAction = transientString.substring(equal+1,firstComma);
-
+                            if (firstSemiColon > -1) {
+                                soapAction = transientString.substring(equal + 1, firstSemiColon - 1);
                             } else {
-                                soapAction = transientString.substring(equal+1,transientString.length());
+                                soapAction = transientString.substring(equal + 1, transientString.length());
                             }
                             if ((soapAction != null) && soapAction.startsWith("\"")
                                 && soapAction.endsWith("\"")) {

Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPElementImpl.java?view=diff&rev=440713&r1=440712&r2=440713
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPElementImpl.java (original)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPElementImpl.java Wed Sep  6 06:45:13 2006
@@ -24,12 +24,7 @@
 import org.apache.axiom.om.impl.dom.ElementImpl;
 import org.apache.axiom.om.impl.dom.NodeImpl;
 import org.apache.axiom.om.impl.dom.TextImpl;
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
+import org.w3c.dom.*;
 
 import javax.xml.namespace.QName;
 import javax.xml.soap.Name;
@@ -133,7 +128,7 @@
         childEle.element.setUserData(SAAJ_NODE, childEle, null);
         childEle.element.setNamespace(childEle.element.declareNamespace(namespaceURI, prefix));
         element.appendChild(childEle.element);
-        ((NodeImpl) childEle.element.getParentNode()).setUserData(SAAJ_NODE, this, null);
+        childEle.element.getParentNode().setUserData(SAAJ_NODE, this, null);
         childEle.setParentElement(this);
         return childEle;
     }
@@ -176,7 +171,7 @@
         childEle.element.setUserData(SAAJ_NODE, childEle, null);
         childEle.element.setNamespace(childEle.element.declareNamespace(namespaceURI, prefix));
         element.appendChild(childEle.element);
-        ((NodeImpl) childEle.element.getParentNode()).setUserData(SAAJ_NODE, this, null);
+        childEle.element.getParentNode().setUserData(SAAJ_NODE, this, null);
         childEle.setParentElement(this);
         return childEle;
     }
@@ -189,7 +184,7 @@
                 new SOAPElementImpl((ElementImpl) getOwnerDocument().createElement(localName));
         childEle.element.setUserData(SAAJ_NODE, childEle, null);
         element.appendChild(childEle.element);
-        ((NodeImpl) childEle.element.getParentNode()).setUserData(SAAJ_NODE, this, null);
+        childEle.element.getParentNode().setUserData(SAAJ_NODE, this, null);
         childEle.setParentElement(this);
         return childEle;
     }
@@ -425,6 +420,7 @@
       */
     public void setParent(OMContainer parentElement) {
         element.setParent(parentElement);
+        this.getAttributes();
     }
 
     /* (non-Javadoc)
@@ -693,5 +689,16 @@
         OMNode omNode = this.element.detach();
         this.parentElement = null;
         return omNode;
+    }
+
+    /**
+     * Returns the collection of attributes associated with this node, or null
+     * if none. At this writing, Element is the only type of node which will
+     * ever have attributes.
+     *
+     * @see org.apache.axiom.om.impl.dom.ElementImpl
+     */
+    public NamedNodeMap getAttributes() {
+        return element.getAttributes();
     }
 }



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