axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/transport/http AxisServlet.java
Date Thu, 08 Feb 2001 22:12:09 GMT
gdaniels    01/02/08 14:12:08

  Modified:    java/src/org/apache/axis Constants.java MessageContext.java
               java/src/org/apache/axis/transport/http AxisServlet.java
  Log:
  AxisServlet now uses it's own TARGET String ("AxisServlet") to send to
  the engine.  This results in the "AxisServlet" chain being run, which
  contains an HTTPAction handler that moves the action header into the
  TARGET property of the MessageContext, and then a Router which
  dispatches to the "real" service.  This demonstrates the beginnings of
  transport-specific chains and more flexible routing.
  
  Revision  Changes    Path
  1.2       +7 -1      xml-axis/java/src/org/apache/axis/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Constants.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Constants.java	2001/02/07 13:52:04	1.1
  +++ Constants.java	2001/02/08 22:11:53	1.2
  @@ -70,7 +70,9 @@
     // (A hierarchical namespace is strongly suggested 
     //  in order to lower the chance for conflicts)
     //////////////////////////////////////////////////////////////////////////
  -  public static String MC_SVC_HANDLER = "service.handler" ;   // Handler
  +  public static String MC_SVC_HANDLER   = "service.handler" ;   // Handler
  +  
  +  public static String MC_TARGET        = "service.target";
   
     public static String MC_HTTP_STATUS_CODE    = "transport.http.statusCode" ;    
                                                                 // Integer
  @@ -123,4 +125,8 @@
     // Misc Strings
     //////////////////////////////////////////////////////////////////////////
     public static String URI_DEBUG = "http://xml.apache.org/axis/debug" ;
  +  
  +  /** For demonstration purposes only... --Glen
  +   */
  +  public static String SERVLET_TARGET = "AxisServlet";
   }
  
  
  
  1.6       +65 -58    xml-axis/java/src/org/apache/axis/MessageContext.java
  
  Index: MessageContext.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/MessageContext.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MessageContext.java	2001/01/31 19:49:48	1.5
  +++ MessageContext.java	2001/02/08 22:11:55	1.6
  @@ -65,63 +65,70 @@
    * @author Doug Davis (dug@us.ibm.com)
    */
   public class MessageContext {
  -  /**
  -   * Just a placeholder until we figure out how many messages we'll actually
  -   * be passing around.
  -   */
  -  private Message inMessage ;
  -
  -  /**
  -   * Just a placeholder until we figure out how many messages we'll actually
  -   * be passing around.
  -   */
  -  private Message outMessage ;
  -
  -  /**
  -   * 
  -   */
  -  private Hashtable bag ;
  -
  -  public MessageContext() {}
  -
  -  public MessageContext( Message inMsg ) {
  -    setIncomingMessage( inMsg );
  -  }
  -
  -  /**
  -   * Placeholder.
  -   */
  -  public Message getIncomingMessage() { 
  -    return inMessage ; 
  -  };
  -
  -  /**
  -   * Placeholder.
  -   */
  -  public void setIncomingMessage(Message inMsg) { 
  -    inMessage = inMsg ; 
  -  };
  -
  -  /**
  -   * Placeholder.
  -   */
  -  public Message getOutgoingMessage() { return outMessage ; }
  -
  -  /**
  -   * Placeholder.
  -   */
  -  public void setOutgoingMessage(Message inMsg) { 
  -    outMessage = inMsg ;
  -  };
  -
  -  public Object getProperty(String propName) {
  -    if ( bag == null ) return( null );
  -    return( bag.get(propName) );
  -  }
  -
  -  public void setProperty(String propName, Object propValue) {
  -    if ( bag == null ) bag = new Hashtable() ;
  -    bag.put( propName, propValue );
  -  }
  +    /**
  +     * Just a placeholder until we figure out how many messages we'll actually
  +     * be passing around.
  +     */
  +    private Message inMessage ;
  +
  +    /**
  +     * Just a placeholder until we figure out how many messages we'll actually
  +     * be passing around.
  +     */
  +    private Message outMessage ;
  +
  +    /**
  +     * 
  +     */
  +    private Hashtable bag ;
  +
  +    public MessageContext() {}
  +
  +    public MessageContext( Message inMsg ) {
  +        setIncomingMessage( inMsg );
  +    }
  +
  +    /**
  +     * Placeholder.
  +     */
  +    public Message getIncomingMessage() { 
  +        return inMessage ; 
  +    };
  +
  +    /**
  +     * Placeholder.
  +     */
  +    public void setIncomingMessage(Message inMsg) { 
  +        inMessage = inMsg ; 
  +    };
  +
  +    /**
  +     * Placeholder.
  +     */
  +    public Message getOutgoingMessage() { return outMessage ; }
  +
  +    /**
  +     * Placeholder.
  +     */
  +    public void setOutgoingMessage(Message inMsg) { 
  +        outMessage = inMsg ;
  +    };
  +
  +    public Object getProperty(String propName) {
  +        if ( bag == null ) return( null );
  +        return( bag.get(propName) );
  +    }
  +
  +    public void setProperty(String propName, Object propValue) {
  +        if ( bag == null ) bag = new Hashtable() ;
  +        bag.put( propName, propValue );
  +    }
  +    
  +    public void clearProperty(String propName)
  +    {
  +        if (bag != null) {
  +            bag.remove(propName);
  +        }
  +    }
   
   };
  
  
  
  1.2       +7 -0      xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
  
  Index: AxisServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AxisServlet.java	2001/02/07 13:52:06	1.1
  +++ AxisServlet.java	2001/02/08 22:12:04	1.2
  @@ -111,6 +111,13 @@
       Message           msg        = new Message( req, "ServletRequest" );
   
       msgContext.setIncomingMessage( msg );
  +    
  +    /** Set the target which tells the engine where to dispatch.  In the
  +     * real world, this would probably be gotten from the servlet
  +     * configuration.
  +     */
  +    msgContext.setProperty(Constants.MC_TARGET, Constants.SERVLET_TARGET);
  +    
   
       /* Save the SOAPAction header in the MessageContext bag - this will */
       /* be used to tell the Axis Engine which service is being invoked.  */
  
  
  

Mime
View raw message