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 he...@apache.org on 2005/02/17 07:40:49 UTC

svn commit: r154134 - in webservices/axis/trunk/java/dev/scratch/prototype2/src: java/org/apache/axis/context/ java/org/apache/axis/engine/ java/org/apache/axis/om/impl/llom/ java/org/apache/axis/om/impl/llom/factory/ samples/general/sample2/ samples/general/sample2/conf/ samples/general/sample2/src/ samples/general/sample3/ samples/general/sample3/conf/ samples/general/sample3/src/ samples/general/sample4/ samples/general/sample4/conf/ samples/general/sample4/src/ samples/userguide/sample1/ samples/userguide/sample2/ samples/userguide/sample3/

Author: hemapani
Date: Wed Feb 16 22:40:47 2005
New Revision: 154134

URL: http://svn.apache.org/viewcvs?view=rev&rev=154134
Log:
move the userguide samples to general

Added:
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/general/sample2/
      - copied from r154112, webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample2/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/general/sample2/build.xml
      - copied unchanged from r154133, webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample2/build.xml
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/general/sample2/conf/
      - copied from r154133, webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample2/conf/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/general/sample2/src/
      - copied from r154133, webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample2/src/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/general/sample3/
      - copied from r154112, webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/general/sample3/build.xml
      - copied unchanged from r154133, webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/build.xml
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/general/sample3/conf/
      - copied from r154133, webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/conf/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/general/sample3/src/
      - copied from r154133, webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/src/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/general/sample4/
      - copied from r154112, webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/general/sample4/build.xml
      - copied unchanged from r154133, webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/build.xml
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/general/sample4/conf/
      - copied from r154133, webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/conf/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/general/sample4/src/
      - copied from r154133, webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/src/
Removed:
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample1/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample2/
    webservices/axis/trunk/java/dev/scratch/prototype2/src/samples/userguide/sample3/
Modified:
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/context/MessageContext.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/AxisEngine.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/OMAttributeImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/factory/OMLinkedListImplFactory.java

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/context/MessageContext.java?view=diff&r1=154133&r2=154134
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/context/MessageContext.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/context/MessageContext.java Wed Feb 16 22:40:47 2005
@@ -82,9 +82,9 @@
     
     /**
      * 
-     * @param er
-     * @param initialProperties
-     * @param sessionContext
+     * @param Engine registry
+     * @param initialProperties of the message context, should be null if no properties  
+     * @param sessionContext of the message context, should be null if no sessionContext
      * @throws AxisFault
      */
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/AxisEngine.java?view=diff&r1=154133&r2=154134
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/AxisEngine.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/engine/AxisEngine.java Wed Feb 16 22:40:47 2005
@@ -39,11 +39,34 @@
         this.registry = registry;
     }
 
+    /**
+     * This methods represents the outflow of the Axis, this could be either at the server side or the client side.
+     * Here the <code>ExecutionChain</code> is created using the Phases. The Handlers at the each Phases is ordered in 
+     * deployment time by the deployment module
+     * @see MessageContext
+     * @see ExecutionChain
+     * @see Phase
+     * @see Handler
+     * @param context
+     * @throws AxisFault
+     */
     public void send(MessageContext context) throws AxisFault {
         executeOutFlow(context, EngineRegistry.OUTFLOW);
         log.info("end the send()");
     }
 
+    /**
+     * This methods represents the inflow of the Axis, this could be either at the server side or the client side.
+     * Here the <code>ExecutionChain</code> is created using the Phases. The Handlers at the each Phases is ordered in 
+     * deployment time by the deployment module
+     * @see MessageContext
+     * @see ExecutionChain
+     * @see Phase
+     * @see Handler
+     * @param context
+     * @throws AxisFault
+     */
+
     public void receive(MessageContext context) throws AxisFault {
         try {
             //          org.TimeRecorder.START = System.currentTimeMillis();
@@ -51,7 +74,7 @@
             //let us always start with a fresh EC
             context.setExecutionChain(new ExecutionChain());
             ExecutionChain chain = context.getExecutionChain();
-            
+
             // Receiving is always a matter of running the transport handlers first
             AxisTransport transport = context.getTransport();
             if (transport != null) {
@@ -59,36 +82,44 @@
                 chain.addPhases(transport.getPhases(EngineRegistry.INFLOW));
             }
             //Add the phases that are are at Global scope
-            AxisGlobal global = context.getGlobalContext().getRegistry().getGlobal();
+            AxisGlobal global =
+                context.getGlobalContext().getRegistry().getGlobal();
             chain.addPhases(global.getPhases(EngineRegistry.INFLOW));
-            
+
             //create a Dispatch Phase and add it to the Execution Chain
             Dispatcher dispatcher = new Dispatcher();
             Phase dispatchPhase = new Phase("DispatchPhase");
             dispatchPhase.addHandler(dispatcher);
             chain.addPhase(dispatchPhase);
-            
+
             //Start rolling the Service Handlers will,be added by the Dispatcher 
             chain.invoke(context);
             log.info("ending the out flow");
-//            org.TimeRecorder.END = System.currentTimeMillis();
-//            org.TimeRecorder.dump();
+            //            org.TimeRecorder.END = System.currentTimeMillis();
+            //            org.TimeRecorder.dump();
         } catch (Throwable e) {
             handleFault(context, e);
         }
     }
 
-    private void handleFault(MessageContext context,
-                             Throwable e)
-            throws AxisFault {
+    /**
+     * If error occurs at inflow or the out flow this method will call to handle the error. But if the 
+     * execution reach this method twice, means the sending the error handling failed an in that case the 
+     * this method just log the error and exit</p> 
+     * @param context
+     * @param e
+     * @throws AxisFault
+     */
+    private void handleFault(MessageContext context, Throwable e)
+        throws AxisFault {
         boolean serverSide = context.isServerSide();
         log.error("Error Ocurred", e);
         if (serverSide && !context.isProcessingFault()) {
             context.setProcessingFault(true);
-            
+
             //create a SOAP envelope with the Fault
             SOAPEnvelope envelope =
-                    OMFactory.newInstance().getDefaultEnvelope();
+                OMFactory.newInstance().getDefaultEnvelope();
             //TODO do we need to set old Headers back?
             envelope.getBody().addFault(new AxisFault(e.getMessage(), e));
             context.setEnvelope(envelope);
@@ -102,9 +133,17 @@
             log.error("Error in fault flow", e);
         }
     }
-
-
-    private void executeOutFlow(MessageContext context, int flow) throws AxisFault {
+    
+    /**
+     *  <p>This method shows the execution of sending the SOAP message. That can be either a 
+     * sending the message at the Client side or the sending the response at the Server side or the 
+     * Seding the fault flow at the Server side.</p>  
+     * @param context
+     * @param flow
+     * @throws AxisFault
+     */
+    private void executeOutFlow(MessageContext context, int flow)
+        throws AxisFault {
         try {
             context.setExecutionChain(new ExecutionChain());
             ExecutionChain chain = context.getExecutionChain();
@@ -120,7 +159,8 @@
                 }
             }
             //Add the phases that are are at Global scope
-            AxisGlobal global = context.getGlobalContext().getRegistry().getGlobal();
+            AxisGlobal global =
+                context.getGlobalContext().getRegistry().getGlobal();
             chain.addPhases(global.getPhases(flow));
 
             // Receiving is always a matter of running the transport handlers first
@@ -137,17 +177,4 @@
             handleFault(context, error);
         }
     }
-//    /**
-//     * @return Returns the registry.
-//     */
-//    public EngineRegistry getRegistry() {
-//        return registry;
-//    }
-//
-//    /**
-//     * @param registry The registry to set.
-//     */
-//    public void setRegistry(EngineRegistry registry) {
-//        this.registry = registry;
-//    }
 }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/OMAttributeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/OMAttributeImpl.java?view=diff&r1=154133&r2=154134
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/OMAttributeImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/OMAttributeImpl.java Wed Feb 16 22:40:47 2005
@@ -38,10 +38,10 @@
         setOMNamespace(ns);
     }
 
-    private static String replaceQuoteWithEntity(String value) {
-        matcher.reset(value);
-        return matcher.replaceAll(QUOTE_ENTITY);
-    }
+//    private static String replaceQuoteWithEntity(String value) {
+//        matcher.reset(value);
+//        return matcher.replaceAll(QUOTE_ENTITY);
+//    }
 
     public QName getQName() {
         String namespaceName = namespace != null ? namespace.getName() : null;

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java?view=diff&r1=154133&r2=154134
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/SOAPFaultImpl.java Wed Feb 16 22:40:47 2005
@@ -149,7 +149,6 @@
             while (childrenIter.hasNext()) {
                 Object o = childrenIter.next();
                 if (!(o instanceof OMText && "".equals(((OMText) o).getValue()))) {
-                    StringWriter sw = new StringWriter();
                     return (OMNode) o;
                 }
             }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/factory/OMLinkedListImplFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/factory/OMLinkedListImplFactory.java?view=diff&r1=154133&r2=154134
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/factory/OMLinkedListImplFactory.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/impl/llom/factory/OMLinkedListImplFactory.java Wed Feb 16 22:40:47 2005
@@ -25,8 +25,7 @@
  */
 public class OMLinkedListImplFactory extends OMFactory {
     public static final int MAX_TO_POOL = 100;
-    private Stack elements = new Stack();
-    private Stack textNodes = new Stack();
+ 
 
 
     public OMElement createOMElement(String localName, OMNamespace ns) {