axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/utils Admin.java
Date Sun, 04 Feb 2001 13:45:36 GMT
dug         01/02/04 05:45:36

  Modified:    java/samples/xml deploy.xml
               java/src/org/apache/axis AxisFault.java
               java/src/org/apache/axis/client HTTPCall.java
               java/src/org/apache/axis/message SOAPEnvelope.java
                        SOAPHeader.java
               java/src/org/apache/axis/server/transports AxisServlet.java
               java/src/org/apache/axis/utils Admin.java
  Log:
  Added a header to the soapenv to send over a debug flag to the
  server.  This will cause the server to print debug info as it
  runs.  Just a test of the header processing stuff - will remove
  once we get 'real' headers.
  
  Revision  Changes    Path
  1.5       +2 -1      xml-axis/java/samples/xml/deploy.xml
  
  Index: deploy.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/xml/deploy.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- deploy.xml	2001/02/01 22:21:21	1.4
  +++ deploy.xml	2001/02/04 13:45:35	1.5
  @@ -8,12 +8,13 @@
   <!-- This file will be replaced by WSDD once it's ready         -->
   
   <deploy>
  +  <handler name="debug" class="org.apache.axis.handlers.DebugHandler" />
     <handler name="log" class="org.apache.axis.handlers.LogHandler" />
     <handler name="echo" class="org.apache.axis.handlers.EchoHandler" />
     <handler name="error" class="org.apache.axis.handlers.ErrorHandler" />
   
     <chain name="pre" flow="log" />
  -  <chain name="echoChain" input="log" pivot="echo" output="log" />
  +  <chain name="echoChain" input="debug,log" pivot="echo" output="log" />
     <chain name="errorChain" input="log,log" pivot="error" output="log,log" />
   
     <service name="EchoService" handler="echoChain" />
  
  
  
  1.7       +7 -1      xml-axis/java/src/org/apache/axis/AxisFault.java
  
  Index: AxisFault.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/AxisFault.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AxisFault.java	2001/01/28 18:05:34	1.6
  +++ AxisFault.java	2001/02/04 13:45:35	1.7
  @@ -57,6 +57,7 @@
   
   package org.apache.axis ;
   
  +import java.io.* ;
   import java.util.* ;
   import org.w3c.dom.* ;
   import org.xml.sax.InputSource ;
  @@ -85,8 +86,13 @@
       String  str ;
   
       setFaultCode( "Server.generalException" );
  -    setFaultString( e.toString() );
  +    // setFaultString( e.toString() );
       // need to set details if we were in the body at the time!!
  +    ByteArrayOutputStream stream = new ByteArrayOutputStream();
  +    PrintStream           ps = new PrintStream( stream );
  +    e.printStackTrace(ps);
  +    ps.close();
  +    setFaultString( stream.toString() );
     }
   
     public void setFaultCode(String code) {
  
  
  
  1.5       +1 -1      xml-axis/java/src/org/apache/axis/client/HTTPCall.java
  
  Index: HTTPCall.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/HTTPCall.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HTTPCall.java	2001/02/02 02:53:25	1.4
  +++ HTTPCall.java	2001/02/04 13:45:35	1.5
  @@ -126,7 +126,7 @@
       reqEnv.addBody( body );
   
       // Until we have chains on the client force a debug header if needed
  -    if ( Debug.getDebugLevel() > 0  ) {
  +    if ( true ) { // Debug.getDebugLevel() > 0  ) {
         SOAPHeader  header = new SOAPHeader();
         header.setPrefix("d");
         header.setName("Debug");
  
  
  
  1.8       +22 -5     xml-axis/java/src/org/apache/axis/message/SOAPEnvelope.java
  
  Index: SOAPEnvelope.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/SOAPEnvelope.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SOAPEnvelope.java	2001/02/01 22:21:31	1.7
  +++ SOAPEnvelope.java	2001/02/04 13:45:35	1.8
  @@ -73,7 +73,7 @@
    */
   public class SOAPEnvelope {
     protected String       prefix ;
  -  protected ArrayList    headers ;
  +  protected Vector       headers ;
     protected Vector       body ; // Vector of SOAPBody's
   
     public SOAPEnvelope() {
  @@ -107,7 +107,7 @@
           Node n = list.item(i);
           if ( n.getNodeType() != Node.ELEMENT_NODE ) continue ;
           h = (Element) list.item(i);
  -        if ( headers == null ) headers = new ArrayList();
  +        if ( headers == null ) headers = new Vector();
           headers.add( new SOAPHeader( h ) );
         }
       }
  @@ -128,13 +128,30 @@
       }
     }
   
  -  public SOAPHeader[] getHeaders() {
  +  public Vector getHeaders() {
       if ( headers == null ) return( null );
  -    return( (SOAPHeader[]) headers.toArray() );
  +    return( headers );
     }
   
  +  public Vector getHeadersByURI(String URI) {
  +    Vector tmpList = null ;
  +    /* If URI is null then they asked for the entire list */
  +    /******************************************************/
  +    if ( URI == null ) return( headers );
  +    if ( headers == null ) return( null );
  +
  +    for ( int i = 0 ; i < headers.size(); i++ ) {
  +      SOAPHeader  header = (SOAPHeader) headers.elementAt(i);
  +      if ( URI.equals( header.getNamespaceURI() ) ) {
  +        if ( tmpList == null ) tmpList = new Vector();
  +        tmpList.add( header );
  +      }
  +    }
  +    return( tmpList );
  +  }
  +
     public void addHeader(SOAPHeader header) {
  -    if ( headers == null ) headers = new ArrayList();
  +    if ( headers == null ) headers = new Vector();
       headers.add( header );
     }
   
  
  
  
  1.7       +21 -4     xml-axis/java/src/org/apache/axis/message/SOAPHeader.java
  
  Index: SOAPHeader.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/SOAPHeader.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SOAPHeader.java	2001/02/02 02:53:26	1.6
  +++ SOAPHeader.java	2001/02/04 13:45:35	1.7
  @@ -75,9 +75,11 @@
     protected String    namespaceURI ;
     protected boolean   mustUnderstand ;
     protected String    actor ;
  -  protected ArrayList data ;
  +  protected Vector    data ;
  +  protected boolean   processed ;
   
     public SOAPHeader() {
  +    processed = false ;
     }
   
     public SOAPHeader(Element elem) {
  @@ -91,6 +93,7 @@
       actor = elem.getAttributeNS( Constants.URI_SOAP_ENV,
                                   Constants.ATTR_ACTOR );
       setData( elem.getChildNodes() );
  +    processed = false ;
     }
   
     public String getName() { return( name ); }
  @@ -108,15 +111,21 @@
     public String getActor() { return( actor ); }
     public void setActor(String a) { actor = a ; }
   
  -  public Node[] getData() { return( (Node[]) data.toArray() ); }
  +  public Vector getData() { return( data ); }
  +
  +  public Node getDataAtIndex(int i) {
  +    if ( data == null || i >= data.size() ) return( null );
  +    return( (Node) data.get(i) );
  +  }
  +
     public void addDataNode(Node n) { 
  -    if ( data == null ) data = new ArrayList();
  +    if ( data == null ) data = new Vector();
       data.add(n); 
     };
   
     public void setData(NodeList nl) { 
       data = null ;
  -    if ( nl != null && nl.getLength() != 0 ) data = new ArrayList();
  +    if ( nl != null && nl.getLength() != 0 ) data = new Vector();
       for ( int i = 0 ; i < nl.getLength() ; i++ )
         data.add( nl.item(i) );
     }
  @@ -135,6 +144,14 @@
       for ( int i = 0 ; data != null && i < data.size() ; i++ )
         root.appendChild(doc.importNode( (Node) data.get(i), true ));
       return( root );
  +  }
  +
  +  public void setProcessed(boolean value) {
  +    processed = value ;
  +  }
  +
  +  public boolean isProcessed() {
  +    return( processed );
     }
   
   };
  
  
  
  1.11      +0 -4      xml-axis/java/src/org/apache/axis/server/transports/AxisServlet.java
  
  Index: AxisServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/server/transports/AxisServlet.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AxisServlet.java	2001/02/01 22:21:33	1.10
  +++ AxisServlet.java	2001/02/04 13:45:36	1.11
  @@ -100,10 +100,6 @@
         }
       }
   
  -    /* For debugging - set the debug level */
  -    /***************************************/
  -    Debug.setDebugLevel( 1 );  // 0 = off, higher # => more detail
  -
       /* Place the incoming message in the MessagContext object - notice */
       /* that we just leave it as a 'ServletRequest' object and let the  */
       /* Message processing routine convert it - we don't do it since we */
  
  
  
  1.9       +2 -0      xml-axis/java/src/org/apache/axis/utils/Admin.java
  
  Index: Admin.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/Admin.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Admin.java	2001/02/01 22:21:34	1.8
  +++ Admin.java	2001/02/04 13:45:36	1.9
  @@ -163,6 +163,7 @@
             String   pivot   = elem.getAttribute( "pivot" );
             String   output  = elem.getAttribute( "output" );
             if ( flow != null && flow.length() > 0 ) {
  +            System.out.println( "Deploying chain: " + name );
               Chain    c       = (Chain) hr.find( name );
   
               if ( c == null ) c = new SimpleChain();
  @@ -175,6 +176,7 @@
               hr.add( name, c );
             }
             else {
  +            System.out.println( "Deploying chain: " + name );
               StringTokenizer      st = null ;
               SimpleTargetedChain  cc = null ;
               Chain                c  = null ;
  
  
  

Mime
View raw message