axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruchi...@apache.org
Subject svn commit: r365337 - in /webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2: om/impl/dom/ChildNode.java om/impl/dom/ElementImpl.java soap/impl/dom/soap11/SOAP11FaultImpl.java
Date Mon, 02 Jan 2006 12:26:42 GMT
Author: ruchithf
Date: Mon Jan  2 04:26:30 2006
New Revision: 365337

URL: http://svn.apache.org/viewcvs?rev=365337&view=rev
Log:
Changes to DOOM: 
- Fixed insertSiblingBefore in Childnode
- Override getRole in SOAP11FaultImpl to return the actor properly
- Changes to ElementImpl.serialize() to be consistent with changes of revision 358290 to OMElement
impl


Modified:
    webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ChildNode.java
    webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java
    webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultImpl.java

Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ChildNode.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ChildNode.java?rev=365337&r1=365336&r2=365337&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ChildNode.java
(original)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ChildNode.java
Mon Jan  2 04:26:30 2006
@@ -142,15 +142,26 @@
 	 * Insert the given sibling before this item
 	 */
 	public void insertSiblingBefore(OMNode sibling) throws OMException {
-		((OMNodeEx)sibling).setParent(this.parentNode);
+//		((OMNodeEx)sibling).setParent(this.parentNode);
 		if(sibling instanceof ChildNode) {
-			ChildNode domSibling = (ChildNode)sibling;
-			domSibling.nextSibling = this;
-			if(this.previousSibling != null) {
-				this.previousSibling.nextSibling = domSibling;
-			}
-			domSibling.previousSibling = this.previousSibling;
-			this.previousSibling = domSibling;
+//			ChildNode domSibling = (ChildNode)sibling;
+//			domSibling.nextSibling = this;
+//			if(this.previousSibling != null) {
+//				this.previousSibling.nextSibling = domSibling;
+//			}
+//			domSibling.previousSibling = this.previousSibling;
+//			this.previousSibling = domSibling;
+            ChildNode siblingImpl = (ChildNode) sibling;
+            siblingImpl.nextSibling = this;
+            if (previousSibling == null) {
+                this.parentNode.setFirstChild(siblingImpl);
+                siblingImpl.previousSibling = null;
+            } else {
+                siblingImpl.setParent(this.parentNode);
+                previousSibling.setNextOMSibling(siblingImpl);
+                siblingImpl.setPreviousOMSibling(previousSibling);
+            }
+            previousSibling = siblingImpl;
 			
 		} else {
 			throw new OMException("The given child is not of type " + ChildNode.class);

Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java?rev=365337&r1=365336&r2=365337&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/om/impl/dom/ElementImpl.java
Mon Jan  2 04:26:30 2006
@@ -849,11 +849,15 @@
             //has nothing to do if the element is already built!
             if (this.done) {
                 OMSerializerUtil.serializeStartpart(this, omOutput);
-                //serializeAndConsume children
-                Iterator children = this.getChildren();
-                while (children.hasNext()) {
-                    //A call to the  Serialize or the serializeAndConsume wont make a difference
here
-                    ((OMNodeEx) children.next()).serializeAndConsume(omOutput);
+                ChildNode child = this.firstChild;
+                while(child != null && ((!(child instanceof OMElement)) || child.isComplete()))
{
+                    child.serializeAndConsume(omOutput);
+                    child = child.nextSibling;
+                }
+                if(child != null) {
+                    OMElement element = (OMElement) child;
+                    element.getBuilder().setCache(false);
+                    OMSerializerUtil.serializeByPullStream(element, omOutput, cache);
                 }
                 OMSerializerUtil.serializeEndpart(omOutput);
             } else {

Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultImpl.java?rev=365337&r1=365336&r2=365337&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/soap/impl/dom/soap11/SOAP11FaultImpl.java
Mon Jan  2 04:26:30 2006
@@ -16,8 +16,11 @@
 
 package org.apache.axis2.soap.impl.dom.soap11;
 
+import javax.xml.stream.XMLStreamException;
+
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.soap.SOAP11Constants;
 import org.apache.axis2.soap.SOAPBody;
 import org.apache.axis2.soap.SOAPFault;
 import org.apache.axis2.soap.SOAPFaultCode;
@@ -28,8 +31,6 @@
 import org.apache.axis2.soap.SOAPProcessingException;
 import org.apache.axis2.soap.impl.dom.SOAPFaultImpl;
 
-import javax.xml.stream.XMLStreamException;
-
 public class SOAP11FaultImpl extends SOAPFaultImpl {
 
     public SOAP11FaultImpl(SOAPBody parent, Exception e) throws SOAPProcessingException {
@@ -113,5 +114,10 @@
     protected void serializeFaultNode(org.apache.axis2.om.impl.OMOutputImpl omOutput) throws
XMLStreamException {
         
     }
+    
+    public SOAPFaultRole getRole() {
+		return (SOAP11FaultRoleImpl) this
+				.getChildWithName(SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME);
+	}
 
 }



Mime
View raw message