axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r157528 - in webservices/axis/trunk/java/modules: core/src/java/org/apache/axis/addressing/ core/src/java/org/apache/axis/engine/ om/src/java/org/apache/axis/om/impl/llom/ samples/src/test/org/apache/axis/engine/
Date Tue, 15 Mar 2005 06:58:45 GMT
Author: chinthaka
Date: Mon Mar 14 22:58:42 2005
New Revision: 157528

URL: http://svn.apache.org/viewcvs?view=rev&rev=157528
Log:
Fixing the bug in setParent method.

Modified:
    webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/addressing/AddressingConstants.java
    webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/addressing/AnyContentType.java
    webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/AxisEngine.java
    webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMElementImpl.java
    webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMNodeImpl.java
    webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java
    webservices/axis/trunk/java/modules/samples/src/test/org/apache/axis/engine/HandlerFailureTest.java

Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/addressing/AddressingConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/addressing/AddressingConstants.java?view=diff&r1=157527&r2=157528
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/addressing/AddressingConstants.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/addressing/AddressingConstants.java
Mon Mar 14 22:58:42 2005
@@ -68,4 +68,5 @@
     public static final String EPR_REFERENCE_PARAMETERS = "ReferenceParameters";
     public static final String EPR_PORT_TYPE = "PortType";
     public static final String EPR_SERVICE_NAME = "ServiceName";
+    public static final String EPR_SERVICE_NAME_PORT_NAME = "PortName";
 }

Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/addressing/AnyContentType.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/addressing/AnyContentType.java?view=diff&r1=157527&r2=157528
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/addressing/AnyContentType.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/addressing/AnyContentType.java
Mon Mar 14 22:58:42 2005
@@ -17,6 +17,7 @@
 
 import javax.xml.namespace.QName;
 import java.util.HashMap;
+import java.util.Iterator;
 
 /**
  * Class AnyContentType
@@ -57,5 +58,9 @@
      */
     public String getReferenceValue(QName name) {
         return (String) valueHolder.get(name);
+    }
+
+    public Iterator getKeys(){
+        return valueHolder.keySet().iterator();
     }
 }

Modified: webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/AxisEngine.java?view=diff&r1=157527&r2=157528
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/AxisEngine.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/java/org/apache/axis/engine/AxisEngine.java
Mon Mar 14 22:58:42 2005
@@ -149,7 +149,7 @@
             body.addFault(new AxisFault(e.getMessage(), e));
             faultContext.setEnvelope(envelope);
 
-            // send the error
+             // send the error
             executeOutFlow(faultContext, EngineRegistry.FAULTFLOW);
         } else if (!serverSide) {
 

Modified: webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMElementImpl.java?view=diff&r1=157527&r2=157528
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMElementImpl.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMElementImpl.java
Mon Mar 14 22:58:42 2005
@@ -237,14 +237,17 @@
         if ((firstChild == null) && !done) {
             builder.next();
         }
+
+
+        child.setParent(this);
+
         child.setPreviousSibling(null);
         child.setNextSibling(firstChild);
         if (firstChild != null) {
             OMNodeImpl firstChildImpl = (OMNodeImpl) firstChild;
             firstChildImpl.setPreviousSibling(child);
         }
-        child.setParent(this);
-        firstChild = child;
+        this.setFirstChild(child);
     }
 
     /**

Modified: webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMNodeImpl.java?view=diff&r1=157527&r2=157528
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMNodeImpl.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/OMNodeImpl.java
Mon Mar 14 22:58:42 2005
@@ -91,7 +91,15 @@
      * @param element
      */
     public void setParent(OMElement element) {
+
+        if( ((OMElement)this.parent) == element){
+            return;
+        }
+
         if (element instanceof OMNodeImpl) {
+            if(this.parent != null){
+                this.detach();
+            }
             this.parent = (OMElementImpl) element;
         }
     }

Modified: webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java?view=diff&r1=157527&r2=157528
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java
Mon Mar 14 22:58:42 2005
@@ -77,8 +77,7 @@
         this.e = e;
         StringWriter sw = new StringWriter();
         e.printStackTrace(new PrintWriter(sw));
-        this.setDetailInformation(OMFactory.newInstance().createText(this,
-                        sw.getBuffer().toString()));
+        this.setDetailInformation(OMFactory.newInstance().createText(sw.getBuffer().toString()));
     }
 
     /**
@@ -230,16 +229,16 @@
     /**
      * Method setDetailInformation
      *
-     * @param detail
+     * @param detailInformation
      */
-    public void setDetailInformation(OMNode detail) {
+    public void setDetailInformation(OMNode detailInformation) {
         if (detailElement != null) {
             detailElement.detach();
         }
         detailElement =
         new OMElementImpl(OMConstants.SOAPFAULT_DETAIL_LOCAL_NAME, this.ns);
         this.addChild(detailElement);
-        detailElement.addChild(detail);
+        detailElement.addChild(detailInformation);
     }
 
     /**
@@ -263,7 +262,7 @@
                             this.ns.getName(), OMConstants.SOAPFAULT_DETAIL_LOCAL_NAME,
                             this.ns.getPrefix()));
             if (detailElement != null) {
-                return this.getDetailInformation();
+                return detailElement;
             }
         }
         return null;

Modified: webservices/axis/trunk/java/modules/samples/src/test/org/apache/axis/engine/HandlerFailureTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/test/org/apache/axis/engine/HandlerFailureTest.java?view=diff&r1=157527&r2=157528
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/test/org/apache/axis/engine/HandlerFailureTest.java
(original)
+++ webservices/axis/trunk/java/modules/samples/src/test/org/apache/axis/engine/HandlerFailureTest.java
Mon Mar 14 22:58:42 2005
@@ -18,33 +18,22 @@
 
 //todo
 
-import javax.xml.namespace.QName;
-
 import junit.framework.TestCase;
-
 import org.apache.axis.addressing.AddressingConstants;
 import org.apache.axis.addressing.EndpointReference;
 import org.apache.axis.context.MessageContext;
-import org.apache.axis.description.AxisOperation;
-import org.apache.axis.description.AxisService;
-import org.apache.axis.description.Flow;
-import org.apache.axis.description.FlowImpl;
-import org.apache.axis.description.Parameter;
-import org.apache.axis.description.ParameterImpl;
-import org.apache.axis.description.SimpleAxisOperationImpl;
+import org.apache.axis.description.*;
 import org.apache.axis.handlers.AbstractHandler;
 import org.apache.axis.integration.UtilServer;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.SOAPBody;
-import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.om.*;
 import org.apache.axis.providers.RawXMLProvider;
 import org.apache.axis.transport.http.SimpleHTTPServer;
 import org.apache.axis.util.Utils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import javax.xml.namespace.QName;
+
 
 public class HandlerFailureTest extends TestCase {
     private Log log = LogFactory.getLog(getClass());
@@ -166,6 +155,7 @@
 
 
             SOAPBody sb = resEnv.getBody();
+
             if (sb.hasFault()) {
                 String message = sb.getFault().getException().getMessage();
                 throw new AxisFault(message);



Mime
View raw message