axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: xml-axis/java/test/functional TestProxySample.java
Date Tue, 10 Jul 2001 23:14:51 GMT
robj        01/07/10 16:14:51

  Modified:    java/samples/proxy ProxyService.java
               java/test/functional TestProxySample.java
  Log:
  Cleanup, for readability.
  
  Revision  Changes    Path
  1.2       +7 -30     xml-axis/java/samples/proxy/ProxyService.java
  
  Index: ProxyService.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/proxy/ProxyService.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProxyService.java	2001/07/10 22:52:38	1.1
  +++ ProxyService.java	2001/07/10 23:14:41	1.2
  @@ -75,53 +75,30 @@
   public class ProxyService {
       /**
        * Process the given message, treating it as raw XML.
  -     * -- is this sufficient???
        */
       public Document ProxyService(MessageContext msgContext)
           throws AxisFault
       {
  -        /*
  -        // Look in the message context for our service...
  -        // um... yeh
  +        // Look in the message context for our service
           Handler self = msgContext.getServiceHandler();
           
           // what is our target URL?
           String dest = (String)self.getOption("URL");
           
  -        // make a ServiceClient going in that direction
  -        // (should we cache this?)
  -        // (what about deployment of other transports?)
  -        ServiceClient client = new ServiceClient(dest);
  -        
  -        // try plain old simple handoff!!!
  -        client.setRequestMessage(msgContext.getRequestMessage());
  -        
  -        // send it!!!
  -        client.invoke();
  -        
  -        // hmm, will reverse handoff work?
  -        msgContext.setResponseMessage(client.getMessageContext().getResponseMessage());
  -        
  -        // return null so MsgProvider will not muck with our response
  -        return null;
  -         */
  -        Handler self = msgContext.getServiceHandler();
  -        
  -        // for chat tomorrow:
  -        String dest = (String)self.getOption("URL");
  -        
           // use the server's client engine in case anything has been deployed to it
           ServiceClient client = new ServiceClient(msgContext.getAxisEngine().getClientEngine());
           
  -          // add TCP for proxy testing
  -          client.addTransportPackage("samples.transport");
  -          client.setTransportForProtocol("tcp", new TCPTransport());
  +        // add TCP for proxy testing
  +        client.addTransportPackage("samples.transport");
  +        client.setTransportForProtocol("tcp", new TCPTransport());
           
  -        // NOW set the client's URL (since now we know what transports we'll want)
  +        // NOW set the client's URL (since now the tcp handler exists)
           client.setURL(dest);
           
           client.setRequestMessage(msgContext.getRequestMessage());
  +        
           client.invoke();
  +        
           msgContext.setResponseMessage(client.getMessageContext().getResponseMessage());
           
           // return null so MsgProvider will not muck with our response
  
  
  
  1.2       +0 -3      xml-axis/java/test/functional/TestProxySample.java
  
  Index: TestProxySample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestProxySample.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestProxySample.java	2001/07/10 22:53:20	1.1
  +++ TestProxySample.java	2001/07/10 23:14:48	1.2
  @@ -103,9 +103,6 @@
               String[] args2 = { "samples/proxy/client_deploy.xml" };
               AdminClient.main(args2);
               
  -            // mysterious magic -- RobJ
  -            ServiceClient.addTransportPackage("samples.transport");
  -            
               System.out.println("Testing service...");
               doTest();
               System.out.println("Test complete.");
  
  
  

Mime
View raw message