axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-axis/java/test/encoding TestDeser.java TestHrefs.java TestSer.java TestString.java
Date Mon, 11 Jun 2001 12:31:26 GMT
rubys       01/06/11 05:31:26

  Modified:    java/samples/encoding TestSer.java
               java/samples/transport FileReader.java
               java/src/org/apache/axis Message.java MessageContext.java
               java/src/org/apache/axis/client ServiceClient.java
               java/src/org/apache/axis/client/http HTTPTransport.java
               java/src/org/apache/axis/server AxisServer.java
               java/src/org/apache/axis/transport/http AxisServlet.java
                        SimpleAxisServer.java
               java/src/org/apache/axis/transport/tcp AxisListener.java
               java/test/RPCDispatch TestRPC.java
               java/test/encoding TestDeser.java TestHrefs.java
                        TestSer.java TestString.java
  Log:
  Next step: ensure MessageContexts always have an engine
  
  Revision  Changes    Path
  1.8       +2 -1      xml-axis/java/samples/encoding/TestSer.java
  
  Index: TestSer.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/encoding/TestSer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestSer.java	2001/05/23 16:14:50	1.7
  +++ TestSer.java	2001/06/11 12:30:33	1.8
  @@ -4,6 +4,7 @@
   import org.apache.axis.message.*;
   import org.apache.axis.encoding.*;
   import org.apache.axis.utils.QName;
  +import org.apache.axis.server.AxisServer;
   import org.xml.sax.InputSource;
   import java.io.*;
   import java.util.*;
  @@ -15,7 +16,7 @@
       public static final String myNS = "urn:myNS";
       
       public static void main(String args[]) {
  -        MessageContext msgContext = new MessageContext();
  +        MessageContext msgContext = new MessageContext(new AxisServer());
           SOAPEnvelope msg = new SOAPEnvelope();
           RPCParam arg1 = new RPCParam("urn:myNamespace", "testParam", "this is a string");
           QName dataQName = new QName("typeNS", "Data");
  
  
  
  1.6       +1 -2      xml-axis/java/samples/transport/FileReader.java
  
  Index: FileReader.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/transport/FileReader.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FileReader.java	2001/06/11 10:51:21	1.5
  +++ FileReader.java	2001/06/11 12:30:40	1.6
  @@ -94,8 +94,7 @@
           nextNum++ ;
   
           Message msg = new Message( fis, "InputStream" );
  -        MessageContext  msgContext = new MessageContext();
  -        msgContext.setAxisEngine(server);
  +        MessageContext  msgContext = new MessageContext(server);
           msgContext.setRequestMessage( msg );
   
           // SOAPAction hack
  
  
  
  1.33      +0 -2      xml-axis/java/src/org/apache/axis/Message.java
  
  Index: Message.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Message.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- Message.java	2001/05/23 16:14:59	1.32
  +++ Message.java	2001/06/11 12:30:44	1.33
  @@ -329,8 +329,6 @@
         is = new InputSource(new StringReader(getAsString()));
       }
       
  -    if (msgContext == null)
  -        msgContext = new MessageContext();
       SAXAdapter parser = new SAXAdapter(is, msgContext);
       SOAPEnvelope env = parser.getEnvelope();
       env.setMessageType(messageType);
  
  
  
  1.32      +3 -6      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.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- MessageContext.java	2001/06/11 10:51:28	1.31
  +++ MessageContext.java	2001/06/11 12:30:46	1.32
  @@ -123,7 +123,9 @@
        */
       private Hashtable bag ;
   
  -    public MessageContext() { }
  +    public MessageContext(AxisEngine engine) {
  +      this.axisEngine = engine;
  +    }
   
       
       /**
  @@ -202,11 +204,6 @@
   
       public String getTargetService() {
         return( targetService );
  -    }
  -    
  -    public void setAxisEngine(AxisEngine engine)
  -    {
  -      this.axisEngine = engine;
       }
       
       public AxisEngine getAxisEngine()
  
  
  
  1.6       +2 -3      xml-axis/java/src/org/apache/axis/client/ServiceClient.java
  
  Index: ServiceClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/ServiceClient.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ServiceClient.java	2001/06/11 10:51:33	1.5
  +++ ServiceClient.java	2001/06/11 12:30:50	1.6
  @@ -116,19 +116,18 @@
        * Set it up yourself!
        */
       public ServiceClient () {
  -        msgContext = new MessageContext();
           this.setupEngine();
  +        msgContext = new MessageContext(engine);
       }
       
       /**
        * Construct a ServiceClient with the given Transport.
        */
       public ServiceClient (Transport transport) {
  -        msgContext = new MessageContext();
           this.transport = transport;
           
           this.setupEngine();
  -        msgContext.setAxisEngine(engine);
  +        msgContext = new MessageContext(engine);
           
           // set up the message context with the transport
           try {
  
  
  
  1.5       +0 -1      xml-axis/java/src/org/apache/axis/client/http/HTTPTransport.java
  
  Index: HTTPTransport.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/http/HTTPTransport.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HTTPTransport.java	2001/06/11 10:51:39	1.4
  +++ HTTPTransport.java	2001/06/11 12:30:54	1.5
  @@ -136,7 +136,6 @@
       {
           if (url != null) mc.setProperty(URL, url);
           if (action != null) mc.setProperty(ACTION, action);
  -        mc.setAxisEngine(engine);
           mc.setTargetService( (String)mc.getProperty(ACTION) );
           
           if ( doLocal && ((String)mc.getProperty(URL)).endsWith( ".jws") ) {
  
  
  
  1.17      +0 -2      xml-axis/java/src/org/apache/axis/server/AxisServer.java
  
  Index: AxisServer.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/server/AxisServer.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- AxisServer.java	2001/06/11 10:51:43	1.16
  +++ AxisServer.java	2001/06/11 12:30:58	1.17
  @@ -108,8 +108,6 @@
           TypeMappingRegistry tmr =
               (TypeMappingRegistry) getOption(Constants.TYPEMAP_REGISTRY);
   
  -        msgContext.setAxisEngine( this );
  -
           msgContext.setTypeMappingRegistry(tmr);
   
           try {
  
  
  
  1.21      +1 -1      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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- AxisServlet.java	2001/06/10 19:57:24	1.20
  +++ AxisServlet.java	2001/06/11 12:31:04	1.21
  @@ -121,7 +121,7 @@
       /* don't know how it's going to be used - perhaps it might not     */
       /* even need to be parsed.                                         */
       /*******************************************************************/
  -    MessageContext    msgContext = new MessageContext();
  +    MessageContext    msgContext = new MessageContext(engine);
       InputStream       inp        = req.getInputStream();
       Message           msg        = new Message( inp, "InputStream" );
   
  
  
  
  1.11      +1 -2      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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SimpleAxisServer.java	2001/06/11 10:51:45	1.10
  +++ SimpleAxisServer.java	2001/06/11 12:31:05	1.11
  @@ -122,11 +122,10 @@
           engine.init();
   
           // create and initialize a message context
  -        MessageContext msgContext = new MessageContext();
  +        MessageContext msgContext = new MessageContext(engine);
           Message        requestMsg = new Message("", "String");
           msgContext.setProperty(MessageContext.TRANS_INPUT , transportInName);
           msgContext.setProperty(MessageContext.TRANS_OUTPUT, transportOutName);
  -        msgContext.setAxisEngine(engine);
   
           // Reusuable, buffered, content length controlled, InputStream
           NonBlockingBufferedInputStream is =
  
  
  
  1.5       +1 -2      xml-axis/java/src/org/apache/axis/transport/tcp/AxisListener.java
  
  Index: AxisListener.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/tcp/AxisListener.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AxisListener.java	2001/06/11 10:51:48	1.4
  +++ AxisListener.java	2001/06/11 12:31:10	1.5
  @@ -174,8 +174,7 @@
               /* don't know how it's going to be used - perhaps it might not     */
               /* even need to be parsed.                                         */
               /*******************************************************************/
  -            MessageContext    msgContext = new MessageContext();
  -            msgContext.setAxisEngine(engine);
  +            MessageContext    msgContext = new MessageContext(engine);
               
               InputStream inp;
               try {
  
  
  
  1.10      +1 -2      xml-axis/java/test/RPCDispatch/TestRPC.java
  
  Index: TestRPC.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/RPCDispatch/TestRPC.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestRPC.java	2001/06/11 10:51:53	1.9
  +++ TestRPC.java	2001/06/11 12:31:15	1.10
  @@ -68,8 +68,7 @@
           }
   
           // Create a message context with the action and message
  -        MessageContext msgContext = new MessageContext();
  -        msgContext.setAxisEngine(engine);
  +        MessageContext msgContext = new MessageContext(engine);
           msgContext.setRequestMessage(new Message(envelope, "SOAPEnvelope"));
           if (setService) {
               msgContext.setTargetService(SOAPAction);
  
  
  
  1.8       +2 -1      xml-axis/java/test/encoding/TestDeser.java
  
  Index: TestDeser.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestDeser.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestDeser.java	2001/05/23 16:15:27	1.7
  +++ TestDeser.java	2001/06/11 12:31:19	1.8
  @@ -6,6 +6,7 @@
   import org.apache.axis.MessageContext;
   import org.apache.axis.message.*;
   import org.apache.axis.encoding.*;
  +import org.apache.axis.server.AxisServer;
   import org.apache.axis.utils.QName;
   import org.xml.sax.InputSource;
   import java.io.*;
  @@ -64,7 +65,7 @@
        */
       protected void deserialize(String data, Object expected) {
          Message message = new Message(header + data + footer, "String");
  -       message.setMessageContext(new MessageContext());
  +       message.setMessageContext(new MessageContext(new AxisServer()));
   
          SOAPEnvelope envelope = (SOAPEnvelope)message.getAs("SOAPEnvelope");
          assertNotNull("envelope", envelope);
  
  
  
  1.5       +2 -1      xml-axis/java/test/encoding/TestHrefs.java
  
  Index: TestHrefs.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestHrefs.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestHrefs.java	2001/05/23 16:15:29	1.4
  +++ TestHrefs.java	2001/06/11 12:31:20	1.5
  @@ -5,6 +5,7 @@
   import org.apache.axis.MessageContext;
   import org.apache.axis.message.*;
   import org.apache.axis.encoding.*;
  +import org.apache.axis.server.AxisServer;
   import org.apache.axis.utils.QName;
   import org.xml.sax.InputSource;
   import java.io.*;
  @@ -70,7 +71,7 @@
          }
          
          Message message = new Message(msgString, "String");
  -       message.setMessageContext(new MessageContext());
  +       message.setMessageContext(new MessageContext(new AxisServer()));
   
          SOAPEnvelope envelope = (SOAPEnvelope)message.getAs("SOAPEnvelope");
          assertNotNull("envelope", envelope);
  
  
  
  1.5       +2 -1      xml-axis/java/test/encoding/TestSer.java
  
  Index: TestSer.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestSer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestSer.java	2001/05/23 16:15:32	1.4
  +++ TestSer.java	2001/06/11 12:31:21	1.5
  @@ -3,6 +3,7 @@
   import org.apache.axis.MessageContext;
   import org.apache.axis.message.*;
   import org.apache.axis.encoding.*;
  +import org.apache.axis.server.AxisServer;
   import org.apache.axis.utils.QName;
   import org.xml.sax.InputSource;
   import java.io.*;
  @@ -21,7 +22,7 @@
       }
   
       public void testData() throws Exception {
  -        MessageContext msgContext = new MessageContext();
  +        MessageContext msgContext = new MessageContext(new AxisServer());
           SOAPEnvelope msg = new SOAPEnvelope();
           RPCParam arg1 = new RPCParam("urn:myNamespace", "testParam", "this is a string");
           
  
  
  
  1.4       +2 -1      xml-axis/java/test/encoding/TestString.java
  
  Index: TestString.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestString.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestString.java	2001/05/23 16:15:34	1.3
  +++ TestString.java	2001/06/11 12:31:22	1.4
  @@ -3,6 +3,7 @@
   import org.apache.axis.MessageContext;
   import org.apache.axis.message.*;
   import org.apache.axis.encoding.*;
  +import org.apache.axis.server.AxisServer;
   import org.apache.axis.utils.QName;
   import org.xml.sax.InputSource;
   import java.io.*;
  @@ -21,7 +22,7 @@
       }
   
       private void runtest(String value, String expected) throws Exception {
  -        MessageContext msgContext = new MessageContext();
  +        MessageContext msgContext = new MessageContext(new AxisServer());
           SOAPEnvelope msg = new SOAPEnvelope();
           RPCParam input = new RPCParam("urn:myNamespace", "testParam", value);
           
  
  
  

Mime
View raw message