butek       02/02/08 14:14:12

  Modified:    java/samples/attachments EchoAttachment.java
               java/samples/bidbuy TestClient.java v3.java
               java/samples/echo TestClient.java
               java/samples/misc TestClient.java
               java/samples/security Client.java
               java/samples/stock GetInfo.java GetQuote.java GetQuote1.java
               java/samples/transport FileTest.java
               java/samples/transport/tcp GetQuote.java
               java/src/org/apache/axis MessageContext.java
               java/src/org/apache/axis/client AdminClient.java Call.java
                        Transport.java
               java/src/org/apache/axis/handlers
                        SimpleAuthenticationHandler.java
               java/src/org/apache/axis/handlers/http
                        HTTPActionHandler.java HTTPAuthHandler.java
               java/src/org/apache/axis/providers/java EJBProvider.java
               java/src/org/apache/axis/security/simple
                        SimpleSecurityProvider.java
               java/src/org/apache/axis/transport/http HTTPConstants.java
                        HTTPSender.java HTTPTransport.java
                        SimpleAxisServer.java
               java/src/org/apache/axis/transport/local LocalSender.java
               java/test put.java
               java/test/md5attach MD5AttachTest.java
  Log:
  Improve performance of Call/MessageContext properties in 3 steps:
  
  1.  (done in earlier commit) Turn the common properties into accessors while still
  making them available via get/setProperty.
  
  2.  (work in this commit) Call the accessors in the runtime rather than 
get/setProperty.
  Remove all the various constant property name declarations and stick with one set
  in Call.
  
  3.  (far future commit)  Implement nested properties so that we don't have properties
  objects in each of Stub/Call/MessageContext/(anything else?).  I don't know if this
  idea can be reconciled with properties-as-accessors, but I'll think about it.
  
  Revision  Changes    Path
  1.7       +4 -6      xml-axis/java/samples/attachments/EchoAttachment.java
  
  Index: EchoAttachment.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/attachments/EchoAttachment.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- EchoAttachment.java       26 Jan 2002 02:52:37 -0000      1.6
  +++ EchoAttachment.java       8 Feb 2002 22:14:10 -0000       1.7
  @@ -59,11 +59,9 @@
   import org.apache.axis.AxisFault;
   import org.apache.axis.client.Call;
   import org.apache.axis.client.Service;
  -import org.apache.axis.client.Transport;
   import org.apache.axis.encoding.XMLType;
   import org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory;
   import org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory;
  -import org.apache.axis.transport.http.HTTPConstants;
   import org.apache.axis.utils.Options;
   import javax.activation.DataHandler;
   import javax.activation.FileDataSource;
  @@ -130,9 +128,9 @@
   
           call.setReturnType( qnameAttachment);
   
  -        call.setProperty( Transport.USER, opts.getUser());
  +        call.setUsername( opts.getUser());
   
  -        call.setProperty( Transport.PASSWORD, opts.getPassword() );
  +        call.setPassword( opts.getPassword() );
   
   
           Object ret = call.invoke( new Object[] {
  @@ -218,9 +216,9 @@
   
           call.setReturnType(XMLType.SOAP_ARRAY); // new XMLType(qnameAttachment));
   
  -        call.setProperty( Transport.USER, opts.getUser());
  +        call.setUsername( opts.getUser());
   
  -        call.setProperty( Transport.PASSWORD, opts.getPassword() );
  +        call.setPassword( opts.getPassword() );
   
           Object ret = call.invoke( new Object[] {
                       attachments
  
  
  
  1.21      +2 -2      xml-axis/java/samples/bidbuy/TestClient.java
  
  Index: TestClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/bidbuy/TestClient.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- TestClient.java   26 Jan 2002 02:52:38 -0000      1.20
  +++ TestClient.java   8 Feb 2002 22:14:10 -0000       1.21
  @@ -60,7 +60,6 @@
   import org.apache.axis.encoding.ser.BeanSerializerFactory;
   import org.apache.axis.encoding.ser.BeanDeserializerFactory;
   import org.apache.axis.encoding.XMLType;
  -import org.apache.axis.transport.http.HTTPTransport;
   import org.apache.axis.utils.Options;
   
   import javax.xml.rpc.ParameterMode;
  @@ -104,7 +103,8 @@
           service = new Service();
           call = (Call) service.createCall();
           call.setTargetEndpointAddress( new URL(opts.getURL()) );
  -        call.setProperty(HTTPTransport.ACTION,"http://www.soapinterop.org/Bid";);
  +        call.setUseSOAPAction(true);
  +        call.setSOAPActionURI("http://www.soapinterop.org/Bid";);
   
           // register the PurchaseOrder class
           QName poqn = new QName("http://www.soapinterop.org/Bid";,
  
  
  
  1.18      +10 -11    xml-axis/java/samples/bidbuy/v3.java
  
  Index: v3.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/bidbuy/v3.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- v3.java   26 Jan 2002 02:52:38 -0000      1.17
  +++ v3.java   8 Feb 2002 22:14:10 -0000       1.18
  @@ -5,7 +5,6 @@
   import org.apache.axis.encoding.ser.BeanSerializerFactory;
   import org.apache.axis.encoding.ser.BeanDeserializerFactory;
   import org.apache.axis.encoding.XMLType;
  -import org.apache.axis.transport.http.HTTPConstants;
   
   import javax.xml.rpc.ParameterMode;
   import javax.xml.rpc.namespace.QName;
  @@ -60,8 +59,8 @@
         Call     call    = (Call) service.createCall();
   
         call.setTargetEndpointAddress( new URL(serverURL) );
  -      call.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, 
  -                        "http://www.soapinterop.org/Ping"; );
  +      call.setUseSOAPAction( true );
  +      call.setSOAPActionURI( "http://www.soapinterop.org/Ping"; );
         call.setOperationName( new QName("http://www.soapinterop.org/Bid";, "Ping" ));
         call.invoke( (Object[]) null );
         return( new Boolean(true) );
  @@ -79,8 +78,8 @@
         Call     call    = (Call) service.createCall();
   
         call.setTargetEndpointAddress( new URL(registryURL) );
  -      call.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, 
  -                        "http://www.soapinterop.org/LookupAsString"; );
  +      call.setUseSOAPAction( true );
  +      call.setSOAPActionURI( "http://www.soapinterop.org/LookupAsString"; );
         call.setOperationName( new QName("http://www.soapinterop.org/Registry";, 
"LookupAsString" ));
         call.addParameter( "ServiceType", XMLType.XSD_STRING, 
ParameterMode.PARAM_MODE_IN);
         call.setReturnType( XMLType.XSD_DOUBLE );
  @@ -128,8 +127,8 @@
         call.setTargetEndpointAddress( new URL(serverURL) );
         call.setOperationName(new QName("http://www.soapinterop.org/Bid";, 
"RequestForQuote") );
         call.setReturnType( XMLType.XSD_DOUBLE );
  -      call.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, 
  -                        "http://www.soapinterop.org/RequestForQuote"; );
  +      call.setUseSOAPAction( true );
  +      call.setSOAPActionURI( "http://www.soapinterop.org/RequestForQuote"; );
         call.addParameter( "ProductName", XMLType.XSD_STRING, 
ParameterMode.PARAM_MODE_IN);
         call.addParameter( "Quantity", XMLType.XSD_INT, ParameterMode.PARAM_MODE_IN);
         Object r = call.invoke( new Object[] { "widget", new Integer(10) } );
  @@ -160,8 +159,8 @@
         Call     call    = (Call) service.createCall();
   
         call.setTargetEndpointAddress( new URL(serverURL) );
  -      call.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, 
  -                        "http://www.soapinterop.org/SimpleBuy"; );
  +      call.setUseSOAPAction( true );
  +      call.setSOAPActionURI( "http://www.soapinterop.org/SimpleBuy"; );
         call.setOperationName( new QName("http://www.soapinterop.org/Bid";, 
"SimpleBuy") );
         call.setReturnType( XMLType.XSD_STRING );
         call.addParameter( "Address", XMLType.XSD_STRING, ParameterMode.PARAM_MODE_IN 
);
  @@ -197,8 +196,8 @@
         Call     call    = (Call) service.createCall();
   
         call.setTargetEndpointAddress( new URL(serverURL) );
  -      call.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, 
  -                        "http://www.soapinterop.org/Buy"; );
  +      call.setUseSOAPAction( true );
  +      call.setSOAPActionURI( "http://www.soapinterop.org/Buy"; );
         call.setReturnType( XMLType.XSD_STRING );
   
         /* sd.addOutputParam("BuyResult",
  
  
  
  1.49      +2 -2      xml-axis/java/samples/echo/TestClient.java
  
  Index: TestClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/echo/TestClient.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- TestClient.java   8 Feb 2002 18:24:21 -0000       1.48
  +++ TestClient.java   8 Feb 2002 22:14:10 -0000       1.49
  @@ -65,7 +65,6 @@
   import org.apache.axis.encoding.TypeMappingRegistry;
   import org.apache.axis.encoding.TypeMapping;
   import org.apache.axis.Constants;
  -import org.apache.axis.transport.http.HTTPTransport;
   import org.apache.axis.utils.JavaUtils;
   import org.apache.axis.utils.Options;
   
  @@ -171,7 +170,8 @@
               // set the SOAPAction, optionally appending the method name
               String action = soapAction;
               if (addMethodToAction) action += method;
  -            call.setProperty( HTTPTransport.ACTION, action );
  +            call.setUseSOAPAction( true );
  +            call.setSOAPActionURI( action );
   
               // safety first
               call.setProperty(Call.TIMEOUT, "60000");
  
  
  
  1.16      +4 -2      xml-axis/java/samples/misc/TestClient.java
  
  Index: TestClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/misc/TestClient.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- TestClient.java   30 Oct 2001 16:46:32 -0000      1.15
  +++ TestClient.java   8 Feb 2002 22:14:11 -0000       1.16
  @@ -58,7 +58,6 @@
   import org.apache.axis.client.Call;
   import org.apache.axis.client.Service;
   import org.apache.axis.message.SOAPEnvelope;
  -import org.apache.axis.transport.http.HTTPConstants;
   import org.apache.axis.utils.Options;
   
   import java.io.ByteArrayInputStream;
  @@ -104,7 +103,10 @@
         SOAPEnvelope  env     = new SOAPEnvelope(input);
   
         call.setTargetEndpointAddress( new URL(url) );
  -      call.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, action );
  +      if (action != null) {
  +          call.setUseSOAPAction( true );
  +          call.setSOAPActionURI( action );
  +      }
   
         System.out.println( "Request:\n" + msg );
   
  
  
  
  1.3       +0 -3      xml-axis/java/samples/security/Client.java
  
  Index: Client.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/security/Client.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Client.java       14 Jan 2002 14:21:02 -0000      1.2
  +++ Client.java       8 Feb 2002 22:14:11 -0000       1.3
  @@ -70,7 +70,6 @@
   import org.apache.axis.message.MessageElement;
   import org.apache.axis.message.SOAPHeader;
   import org.apache.axis.client.ServiceClient;
  -import org.apache.axis.transport.http.HTTPTransport ;
   import org.apache.axis.utils.*;
   import org.apache.xml.security.signature.XMLSignature;
   import org.w3c.dom.Element;
  @@ -84,8 +83,6 @@
        Service service = new Service();
        Call call = (Call) service.createCall();
        call.setTargetEndpointAddress(new java.net.URL(opts.getURL()));
  -
  -     call.setProperty( HTTPTransport.ACTION, "");
   
           SOAPEnvelope env = new SOAPEnvelope();
           SOAPBodyElement sbe = new 
SOAPBodyElement(XMLUtils.StringToElement("http://localhost:8080/LogTestService","testMethod";,
 ""));
  
  
  
  1.19      +2 -5      xml-axis/java/samples/stock/GetInfo.java
  
  Index: GetInfo.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/stock/GetInfo.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- GetInfo.java      11 Jan 2002 21:42:10 -0000      1.18
  +++ GetInfo.java      8 Feb 2002 22:14:11 -0000       1.19
  @@ -58,9 +58,7 @@
   import org.apache.axis.AxisFault;
   import org.apache.axis.client.Call;
   import org.apache.axis.client.Service;
  -import org.apache.axis.client.Transport;
   import org.apache.axis.encoding.XMLType;
  -import org.apache.axis.transport.http.HTTPConstants;
   import org.apache.axis.utils.Options;
   
   import javax.xml.rpc.ParameterMode;
  @@ -91,9 +89,8 @@
         call.setOperationName( new QName("urn:cominfo", "getInfo") );
         call.addParameter( "symbol", XMLType.XSD_STRING, ParameterMode.PARAM_MODE_IN 
);
         call.addParameter( "info", XMLType.XSD_STRING, ParameterMode.PARAM_MODE_IN );
  -      call.setProperty( Transport.USER, opts.getUser() );
  -      call.setProperty( Transport.PASSWORD, opts.getPassword() );
  -      call.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, "" );
  +      call.setUsername( opts.getUser() );
  +      call.setPassword( opts.getPassword() );
   
         String res = (String) call.invoke( new Object[] { args[0], args[1] } );
   
  
  
  
  1.37      +2 -5      xml-axis/java/samples/stock/GetQuote.java
  
  Index: GetQuote.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/stock/GetQuote.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- GetQuote.java     11 Jan 2002 21:42:10 -0000      1.36
  +++ GetQuote.java     8 Feb 2002 22:14:11 -0000       1.37
  @@ -58,9 +58,7 @@
   import org.apache.axis.AxisFault;
   import org.apache.axis.client.Call;
   import org.apache.axis.client.Service;
  -import org.apache.axis.client.Transport;
   import org.apache.axis.encoding.XMLType;
  -import org.apache.axis.transport.http.HTTPConstants;
   import org.apache.axis.utils.Options;
   
   import javax.xml.rpc.ParameterMode;
  @@ -115,11 +113,10 @@
             // TESTING HACK BY ROBJ
             if (symbol.equals("XXX_noaction")) {
                 symbol = "XXX";
  -              call.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, "" );
             }
   
  -          call.setProperty( Transport.USER, user );
  -          call.setProperty( Transport.PASSWORD, passwd );
  +          call.setUsername( user );
  +          call.setPassword( passwd );
   
             Object ret = call.invoke( new Object[] {symbol} );
             if (ret instanceof String) {
  
  
  
  1.20      +8 -9      xml-axis/java/samples/stock/GetQuote1.java
  
  Index: GetQuote1.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/stock/GetQuote1.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- GetQuote1.java    11 Jan 2002 21:42:10 -0000      1.19
  +++ GetQuote1.java    8 Feb 2002 22:14:11 -0000       1.20
  @@ -58,9 +58,7 @@
   import org.apache.axis.AxisFault;
   import org.apache.axis.client.Call;
   import org.apache.axis.client.Service;
  -import org.apache.axis.client.Transport;
   import org.apache.axis.encoding.XMLType;
  -import org.apache.axis.transport.http.HTTPConstants;
   import org.apache.axis.utils.Options;
   
   import javax.xml.rpc.ParameterMode;
  @@ -116,8 +114,8 @@
   
         /* Define some service specific properties */
         /*******************************************/
  -      call.setProperty( Transport.USER, opts.getUser() );
  -      call.setProperty( Transport.PASSWORD, opts.getPassword() );
  +      call.setUsername( opts.getUser() );
  +      call.setPassword( opts.getPassword() );
   
         /* Get symbol and invoke the service */
         /*************************************/
  @@ -154,7 +152,8 @@
         /* Set all of the stuff that would normally come from WSDL */
         /***********************************************************/
         call.setTargetEndpointAddress( new URL(opts.getURL()) );
  -      call.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, "getQuote" );
  +      call.setUseSOAPAction( true );
  +      call.setSOAPActionURI( "getQuote" );
         call.setEncodingStyle( "http://schemas.xmlsoap.org/soap/encoding/"; );
         call.setOperationName( new QName("urn:xmltoday-delayed-quotes", "getQuote") );
         call.addParameter( "symbol", XMLType.XSD_STRING, ParameterMode.PARAM_MODE_IN 
);
  @@ -162,8 +161,8 @@
   
         /* Define some service specific properties */
         /*******************************************/
  -      call.setProperty( Transport.USER, opts.getUser() );
  -      call.setProperty( Transport.PASSWORD, opts.getPassword() );
  +      call.setUsername( opts.getUser() );
  +      call.setPassword( opts.getPassword() );
   
         /* Get symbol and invoke the service */
         /*************************************/
  @@ -205,8 +204,8 @@
   
         /* Define some service specific properties */
         /*******************************************/
  -      call.setProperty( Transport.USER, opts.getUser() );
  -      call.setProperty( Transport.PASSWORD, opts.getPassword() );
  +      call.setUsername( opts.getUser() );
  +      call.setPassword( opts.getPassword() );
   
         /* Get symbol and invoke the service */
         /*************************************/
  
  
  
  1.25      +2 -3      xml-axis/java/samples/transport/FileTest.java
  
  Index: FileTest.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/transport/FileTest.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- FileTest.java     28 Jan 2002 18:22:59 -0000      1.24
  +++ FileTest.java     8 Feb 2002 22:14:11 -0000       1.25
  @@ -6,7 +6,6 @@
   import org.apache.axis.deployment.wsdd.WSDDConstants;
   import org.apache.axis.client.Call;
   import org.apache.axis.client.Service;
  -import org.apache.axis.client.Transport;
   import org.apache.axis.encoding.XMLType;
   import org.apache.axis.utils.Options;
   
  @@ -53,8 +52,8 @@
           call.addParameter( "symbol", XMLType.XSD_STRING, 
ParameterMode.PARAM_MODE_IN );
           call.setReturnType( XMLType.XSD_FLOAT );
           call.setTransport( new FileTransport() );
  -        call.setProperty(Transport.USER, opts.getUser() );
  -        call.setProperty(Transport.PASSWORD, opts.getPassword() );
  +        call.setUsername(opts.getUser() );
  +        call.setPassword(opts.getPassword() );
           call.setProperty(Call.TIMEOUT, "10000");
   
           Float res = new Float(0.0F);
  
  
  
  1.19      +2 -5      xml-axis/java/samples/transport/tcp/GetQuote.java
  
  Index: GetQuote.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/transport/tcp/GetQuote.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- GetQuote.java     7 Feb 2002 13:46:35 -0000       1.18
  +++ GetQuote.java     8 Feb 2002 22:14:11 -0000       1.19
  @@ -62,9 +62,7 @@
   import org.apache.axis.configuration.DefaultEngineConfigurationFactory;
   import org.apache.axis.client.Call;
   import org.apache.axis.client.Service;
  -import org.apache.axis.client.Transport;
   import org.apache.axis.encoding.XMLType;
  -import org.apache.axis.transport.http.HTTPConstants;
   import org.apache.axis.utils.Options;
   
   import javax.xml.rpc.ParameterMode;
  @@ -116,11 +114,10 @@
           // TESTING HACK BY ROBJ
           if (symbol.equals("XXX_noaction")) {
               symbol = "XXX";
  -            call.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, "" );
           }
           
  -        call.setProperty( Transport.USER, opts.getUser() );
  -        call.setProperty( Transport.PASSWORD, opts.getPassword() );
  +        call.setUsername( opts.getUser() );
  +        call.setPassword( opts.getPassword() );
           
           // useful option for profiling - perhaps we should remove before
           // shipping?
  
  
  
  1.73      +0 -8      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.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- MessageContext.java       8 Feb 2002 20:48:20 -0000       1.72
  +++ MessageContext.java       8 Feb 2002 22:14:11 -0000       1.73
  @@ -477,14 +477,6 @@
       /** Has a quit been requested? Hackish... but useful... -- RobJ */
       public static String QUIT_REQUESTED = "quit.requested";
       
  -    /** A String with the user's ID (if available)
  -     */
  -    public static String USERID              = Call.USERNAME_PROPERTY;
  -
  -    /** A String with the user's password (if available)
  -     */
  -    public static String PASSWORD            = Call.PASSWORD_PROPERTY;
  -
       /** Place to store an AuthenticatedUser */
       public static String AUTHUSER            = "authenticatedUser";
   
  
  
  
  1.52      +4 -4      xml-axis/java/src/org/apache/axis/client/AdminClient.java
  
  Index: AdminClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/AdminClient.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- AdminClient.java  5 Feb 2002 16:22:39 -0000       1.51
  +++ AdminClient.java  8 Feb 2002 22:14:11 -0000       1.52
  @@ -58,7 +58,6 @@
   import org.apache.axis.AxisFault;
   import org.apache.axis.EngineConfiguration;
   import org.apache.axis.message.SOAPBodyElement;
  -import org.apache.axis.transport.http.HTTPConstants;
   import org.apache.axis.utils.JavaUtils;
   import org.apache.axis.utils.Options;
   import org.apache.log4j.Category;
  @@ -308,8 +307,8 @@
               throw new Exception(JavaUtils.getMessage("nullCall00"));
   
           call.setTargetEndpointAddress( new URL(opts.getURL()) );
  -        call.setProperty( Transport.USER, opts.getUser() );
  -        call.setProperty( Transport.PASSWORD, opts.getPassword() );
  +        call.setUsername( opts.getUser() );
  +        call.setPassword( opts.getPassword() );
   
           String tName = opts.isValueSet( 't' );
           if ( tName != null && !tName.equals("") )
  @@ -342,7 +341,8 @@
   
           if ( opts != null ) processOpts( opts );
           
  -        call.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, "AdminService");
  +        call.setUseSOAPAction( true);
  +        call.setSOAPActionURI( "AdminService");
   
           Vector result = null ;
           Object[]  params = new Object[] { new SOAPBodyElement(input) };
  
  
  
  1.70      +8 -4      xml-axis/java/src/org/apache/axis/client/Call.java
  
  Index: Call.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Call.java,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- Call.java 8 Feb 2002 20:48:20 -0000       1.69
  +++ Call.java 8 Feb 2002 22:14:11 -0000       1.70
  @@ -77,7 +77,6 @@
   import org.apache.axis.message.SOAPFaultElement;
   import org.apache.axis.message.SOAPHeader;
   import org.apache.axis.transport.http.HTTPTransport;
  -import org.apache.axis.transport.http.HTTPConstants;
   import org.apache.axis.utils.JavaUtils;
   import org.apache.axis.attachments.AttachmentPart; 
   import org.apache.axis.InternalException;
  @@ -782,15 +781,20 @@
           if ( bop == null )
               throw new JAXRPCException( JavaUtils.getMessage("noOperation02",
                                                               opName ));
  -        this.removeProperty(HTTPConstants.MC_HTTP_SOAPACTION);
           list = bop.getExtensibilityElements();
           for ( int i = 0 ; list != null && i < list.size() ; i++ ) {
               Object obj = list.get(i);
               if ( obj instanceof SOAPOperation ) { 
                   SOAPOperation sop    = (SOAPOperation) obj ;
                   String        action = sop.getSoapActionURI();
  -                if ( action != null )
  -                    this.setProperty(HTTPConstants.MC_HTTP_SOAPACTION, action);
  +                if ( action != null ) {
  +                    setUseSOAPAction(true);
  +                    setSOAPActionURI(action);
  +                }
  +                else {
  +                    setUseSOAPAction(false);
  +                    setSOAPActionURI(null);
  +                }
                   break ;
               }
           }
  
  
  
  1.16      +0 -6      xml-axis/java/src/org/apache/axis/client/Transport.java
  
  Index: Transport.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Transport.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Transport.java    30 Oct 2001 16:46:35 -0000      1.15
  +++ Transport.java    8 Feb 2002 22:14:11 -0000       1.16
  @@ -62,12 +62,6 @@
   public class Transport {
   
       /**
  -     * Synonyms for MessageContext userid / password.
  -     */
  -    public static String USER = MessageContext.USERID;
  -    public static String PASSWORD = MessageContext.PASSWORD;
  -
  -    /**
        * Transport Chain Name - so users can change the default.
        */
       public String transportName = null ;
  
  
  
  1.25      +2 -2      
xml-axis/java/src/org/apache/axis/handlers/SimpleAuthenticationHandler.java
  
  Index: SimpleAuthenticationHandler.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/handlers/SimpleAuthenticationHandler.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- SimpleAuthenticationHandler.java  10 Jan 2002 20:00:59 -0000      1.24
  +++ SimpleAuthenticationHandler.java  8 Feb 2002 22:14:11 -0000       1.25
  @@ -94,7 +94,7 @@
           }
   
           if (provider != null) {
  -            String  userID = (String) msgContext.getProperty( MessageContext.USERID 
);
  +            String  userID = msgContext.getUsername();
               if (category.isDebugEnabled()) {
                   category.debug( JavaUtils.getMessage("user00", userID) );
               }
  @@ -105,7 +105,7 @@
                       JavaUtils.getMessage("cantAuth00", userID),
                       null, null );
   
  -            String passwd = (String) msgContext.getProperty( 
MessageContext.PASSWORD );
  +            String passwd = msgContext.getPassword();
               if (category.isDebugEnabled()) {
                   category.debug( JavaUtils.getMessage("password00", passwd) );
               }
  
  
  
  1.14      +1 -3      
xml-axis/java/src/org/apache/axis/handlers/http/HTTPActionHandler.java
  
  Index: HTTPActionHandler.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/handlers/http/HTTPActionHandler.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- HTTPActionHandler.java    10 Jan 2002 20:01:00 -0000      1.13
  +++ HTTPActionHandler.java    8 Feb 2002 22:14:11 -0000       1.14
  @@ -57,7 +57,6 @@
   import org.apache.axis.AxisFault;
   import org.apache.axis.MessageContext;
   import org.apache.axis.handlers.BasicHandler;
  -import org.apache.axis.transport.http.HTTPConstants;
   import org.apache.axis.utils.JavaUtils;
   import org.apache.log4j.Category;
   
  @@ -84,8 +83,7 @@
           /** If there's already a targetService then just return.
           */
           if ( msgContext.getServiceHandler() == null ) {
  -            String action = (String) msgContext.getProperty(
  -                                                            
HTTPConstants.MC_HTTP_SOAPACTION);
  +            String action = (String) msgContext.getSOAPActionURI();
               category.debug( "  HTTP SOAPAction: " + action );
               
               /** The idea is that this handler only goes in the chain IF this
  
  
  
  1.11      +2 -2      
xml-axis/java/src/org/apache/axis/handlers/http/HTTPAuthHandler.java
  
  Index: HTTPAuthHandler.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/handlers/http/HTTPAuthHandler.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- HTTPAuthHandler.java      10 Jan 2002 20:01:00 -0000      1.10
  +++ HTTPAuthHandler.java      8 Feb 2002 22:14:11 -0000       1.11
  @@ -89,13 +89,13 @@
               i = tmp.indexOf( ':' );
               if ( i == -1 ) user = tmp ;
               else           user = tmp.substring( 0, i);
  -            msgContext.setProperty( MessageContext.USERID, user );
  +            msgContext.setUsername( user );
               category.debug( JavaUtils.getMessage("httpUser00", user) );
               if ( i != -1 )  {
                   String pwd = tmp.substring(i+1);
                   if ( pwd != null && pwd.equals("") ) pwd = null ;
                   if ( pwd != null ) {
  -                    msgContext.setProperty( MessageContext.PASSWORD, pwd );
  +                    msgContext.setPassword( pwd );
                       category.debug( JavaUtils.getMessage("httpPassword00", pwd) );
                   }
               }
  
  
  
  1.12      +2 -2      
xml-axis/java/src/org/apache/axis/providers/java/EJBProvider.java
  
  Index: EJBProvider.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/providers/java/EJBProvider.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- EJBProvider.java  15 Jan 2002 17:23:00 -0000      1.11
  +++ EJBProvider.java  8 Feb 2002 22:14:11 -0000       1.12
  @@ -106,7 +106,7 @@
               String username = (String)getStrOption(jndiUsername,
                                                      serviceHandler);
               if (username == null)
  -               username = msgContext.getStrProp( MessageContext.USERID );
  +               username = msgContext.getUsername();
               if (username != null) {
                  if (properties == null) properties = new Properties();
                  properties.setProperty(Context.SECURITY_PRINCIPAL,
  @@ -116,7 +116,7 @@
               String password = (String)getStrOption(jndiPassword,
                                                     serviceHandler);
               if (password == null)
  -                password = msgContext.getStrProp( MessageContext.PASSWORD );
  +                password = msgContext.getPassword();
               if (password != null) {
                   if (properties == null) properties = new Properties();
                   properties.setProperty(Context.SECURITY_CREDENTIALS,
  
  
  
  1.12      +2 -2      
xml-axis/java/src/org/apache/axis/security/simple/SimpleSecurityProvider.java
  
  Index: SimpleSecurityProvider.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/security/simple/SimpleSecurityProvider.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SimpleSecurityProvider.java       15 Nov 2001 14:45:57 -0000      1.11
  +++ SimpleSecurityProvider.java       8 Feb 2002 22:14:11 -0000       1.12
  @@ -141,8 +141,8 @@
               initialize(msgContext);
           }
   
  -        String username = msgContext.getStrProp(MessageContext.USERID);
  -        String password = msgContext.getStrProp(MessageContext.PASSWORD);
  +        String username = msgContext.getUsername();
  +        String password = msgContext.getPassword();
   
           if (users != null) {
               if (category.isDebugEnabled()) {
  
  
  
  1.16      +0 -6      
xml-axis/java/src/org/apache/axis/transport/http/HTTPConstants.java
  
  Index: HTTPConstants.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTTPConstants.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- HTTPConstants.java        8 Feb 2002 20:48:21 -0000       1.15
  +++ HTTPConstants.java        8 Feb 2002 22:14:11 -0000       1.16
  @@ -95,12 +95,6 @@
        */
       public static String MC_HTTP_STATUS_MESSAGE = "transport.http.statusMessage";
   
  -    /** String
  -     *  This can be moved to MessageContext.TRANS_SOAPACTION if more transports
  -     *  have it.
  -     */
  -    public static String MC_HTTP_SOAPACTION = 
org.apache.axis.client.Call.SOAPACTION_URI_PROPERTY;
  -
       /** HttpServlet
        */
       public static String MC_HTTP_SERVLET        = "transport.http.servlet" ;
  
  
  
  1.48      +4 -3      xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java
  
  Index: HTTPSender.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- HTTPSender.java   15 Jan 2002 20:48:33 -0000      1.47
  +++ HTTPSender.java   8 Feb 2002 22:14:11 -0000       1.48
  @@ -110,7 +110,8 @@
               boolean  useFullURL = false;
   
               //  Get SOAPAction, default to ""
  -            String   action = 
msgContext.getStrProp(HTTPConstants.MC_HTTP_SOAPACTION);
  +            String   action = msgContext.useSOAPAction() ?
  +                    msgContext.getSOAPActionURI() : "";
               if (action == null)
                   action = "";
   
  @@ -283,8 +284,8 @@
               String        userID = null ;
               String        passwd = null ;
   
  -            userID = msgContext.getStrProp( MessageContext.USERID );
  -            passwd = msgContext.getStrProp( MessageContext.PASSWORD );
  +            userID = msgContext.getUsername();
  +            passwd = msgContext.getPassword();
   
               // if UserID is not part of the context, but is in the URL, use
               // the one in the URL.
  
  
  
  1.13      +5 -3      
xml-axis/java/src/org/apache/axis/transport/http/HTTPTransport.java
  
  Index: HTTPTransport.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTTPTransport.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- HTTPTransport.java        30 Oct 2001 16:46:40 -0000      1.12
  +++ HTTPTransport.java        8 Feb 2002 22:14:11 -0000       1.13
  @@ -77,7 +77,6 @@
        * HTTP properties
        */
       static public String URL = MessageContext.TRANS_URL;
  -    static public String ACTION = HTTPConstants.MC_HTTP_SOAPACTION;
   
       private String cookie;
       private String cookie2;
  @@ -109,7 +108,10 @@
                                           AxisEngine engine)
           throws AxisFault
       {
  -        if (action != null) mc.setProperty(ACTION, action);
  +        if (action != null) {
  +            mc.setUseSOAPAction(true);
  +            mc.setSOAPActionURI(action);
  +        }
   
           // Set up any cookies we know about
           if (cookie != null)
  @@ -121,7 +123,7 @@
           // (a) has not already been determined, and (b) if a service matching
           // the soap action has been deployed.
           if (mc.getServiceHandler() == null) {
  -            mc.setTargetService( (String)mc.getProperty(ACTION) );
  +            mc.setTargetService( (String)mc.getSOAPActionURI() );
           }
       }
   
  
  
  
  1.47      +6 -6      
xml-axis/java/src/org/apache/axis/transport/http/SimpleAxisServer.java
  
  Index: SimpleAxisServer.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/transport/http/SimpleAxisServer.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- SimpleAxisServer.java     5 Feb 2002 16:25:39 -0000       1.46
  +++ SimpleAxisServer.java     8 Feb 2002 22:14:12 -0000       1.47
  @@ -290,10 +290,8 @@
                           }
                           category.info(JavaUtils.getMessage("user00", 
userBuf.toString()));
                           category.info(JavaUtils.getMessage("password00", 
pwBuf.toString()));
  -                        msgContext.setProperty(MessageContext.USERID,
  -                                               userBuf.toString());
  -                        msgContext.setProperty(MessageContext.PASSWORD,
  -                                               pwBuf.toString());
  +                        msgContext.setUsername(userBuf.toString());
  +                        msgContext.setPassword(pwBuf.toString());
                       }
   
                       // if get, then return simpleton document as response
  @@ -331,8 +329,10 @@
                       // this may be "" if either SOAPAction: "" or if no SOAPAction 
at all.
                       // for now, do not complain if no SOAPAction at all
                       String soapActionString = soapAction.toString();
  -                    msgContext.setProperty(HTTPConstants.MC_HTTP_SOAPACTION,
  -                                           soapActionString);
  +                    if (soapActionString != null) {
  +                        msgContext.setUseSOAPAction(true);
  +                        msgContext.setSOAPActionURI(soapActionString);
  +                    }
                       requestMsg = new Message(is);
                       msgContext.setRequestMessage(requestMsg);
   
  
  
  
  1.25      +4 -4      
xml-axis/java/src/org/apache/axis/transport/local/LocalSender.java
  
  Index: LocalSender.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/transport/local/LocalSender.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- LocalSender.java  5 Feb 2002 16:25:39 -0000       1.24
  +++ LocalSender.java  8 Feb 2002 22:14:12 -0000       1.25
  @@ -124,12 +124,12 @@
           serverContext.setTransportName("local");
   
           // Also copy authentication info if present
  -        String user = clientContext.getStrProp(MessageContext.USERID);
  +        String user = clientContext.getUsername();
           if (user != null) {
  -            serverContext.setProperty(MessageContext.USERID, user);
  -            String pass = clientContext.getStrProp(MessageContext.PASSWORD);
  +            serverContext.setUsername(user);
  +            String pass = clientContext.getPassword();
               if (pass != null)
  -                serverContext.setProperty(MessageContext.PASSWORD, pass);
  +                serverContext.setPassword(pass);
           }
   
           // set the realpath if possible
  
  
  
  1.9       +4 -3      xml-axis/java/test/put.java
  
  Index: put.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/put.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- put.java  2 Nov 2001 03:07:42 -0000       1.8
  +++ put.java  8 Feb 2002 22:14:12 -0000       1.9
  @@ -3,7 +3,6 @@
   import org.apache.axis.Message;
   import org.apache.axis.client.Call;
   import org.apache.axis.client.Service;
  -import org.apache.axis.transport.http.HTTPTransport;
   import org.apache.axis.utils.Options;
   
   import java.io.File;
  @@ -26,8 +25,10 @@
           Call     call    = (Call) service.createCall();
   
           call.setTargetEndpointAddress( new java.net.URL(opts.getURL()) );
  -        if (action != null )
  -            call.setProperty( HTTPTransport.ACTION, action );
  +        if (action != null ) {
  +            call.setUseSOAPAction( true );
  +            call.setSOAPActionURI( action );
  +        }
     
           args = opts.getRemainingArgs();
           for (int i=0; i<args.length; i++) {
  
  
  
  1.2       +5 -3      xml-axis/java/test/md5attach/MD5AttachTest.java
  
  Index: MD5AttachTest.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/md5attach/MD5AttachTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MD5AttachTest.java        6 Nov 2001 20:06:02 -0000       1.1
  +++ MD5AttachTest.java        8 Feb 2002 22:14:12 -0000       1.2
  @@ -2,8 +2,8 @@
   
   import java.io.*;
   import org.apache.axis.*;
  +import org.apache.axis.client.Call;
   import org.apache.axis.client.ServiceClient;
  -import org.apache.axis.transport.http.HTTPTransport ;
   import org.apache.axis.utils.*;
   
   /**
  @@ -20,8 +20,10 @@
           String action = opts.isValueSet('a');
   
           ServiceClient sc = new ServiceClient(opts.getURL());
  -        //if (action != null) sc.set(HTTPTransport.ACTION, action);
  -        sc.set(HTTPTransport.ACTION, "");
  +        if (action != null) {
  +            sc.set(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
  +            sc.set(Call.SOAPACTION_URI_PROPERTY, action);
  +        }
     
               args = opts.getRemainingArgs();
   
  
  
  


Reply via email to