You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ga...@apache.org on 2004/11/30 22:54:32 UTC

cvs commit: ws-axis/java/src/org/apache/axis/client AxisClient.java Call.java

gawor       2004/11/30 13:54:32

  Modified:    java/src/org/apache/axis/client AxisClient.java Call.java
  Log:
  don't need to call response handlers when doing one way call on the client
  
  Revision  Changes    Path
  1.68      +19 -16    ws-axis/java/src/org/apache/axis/client/AxisClient.java
  
  Index: AxisClient.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/client/AxisClient.java,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- AxisClient.java	30 Jun 2004 16:09:47 -0000	1.67
  +++ AxisClient.java	30 Nov 2004 21:54:32 -0000	1.68
  @@ -151,26 +151,29 @@
                               Messages.getMessage("noTransport00", hName));
                   }
   
  -                /* Process the JAXRPC Handlers */
  -                invokeJAXRPCHandlers(msgContext);
  +                if (!msgContext.isPropertyTrue(Call.ONE_WAY)) {
   
  -                /* Process the Global Response Chain */
  -                /***********************************/
  -                if ((h = getGlobalResponse()) != null) {
  -                    h.invoke(msgContext);
  -                }
  -
  -                if ( service != null ) {
  -                    h = service.getResponseHandler();
  -                    if ( h != null ) {
  +                    /* Process the JAXRPC Handlers */
  +                    invokeJAXRPCHandlers(msgContext);
  +                    
  +                    /* Process the Global Response Chain */
  +                    /***********************************/
  +                    if ((h = getGlobalResponse()) != null) {
                           h.invoke(msgContext);
                       }
  -                }
   
  -                // Do SOAP Semantics checks here - this needs to be a call to
  -                // a pluggable object/handler/something
  -                if (msgContext.isPropertyTrue(Call.CHECK_MUST_UNDERSTAND, true)) {
  -                    checker.invoke(msgContext);
  +                    if ( service != null ) {
  +                        h = service.getResponseHandler();
  +                        if ( h != null ) {
  +                            h.invoke(msgContext);
  +                        }
  +                    }
  +
  +                    // Do SOAP Semantics checks here - this needs to be a call to
  +                    // a pluggable object/handler/something
  +                    if (msgContext.isPropertyTrue(Call.CHECK_MUST_UNDERSTAND, true)) {
  +                        checker.invoke(msgContext);
  +                    }
                   }
               }
   
  
  
  
  1.235     +9 -0      ws-axis/java/src/org/apache/axis/client/Call.java
  
  Index: Call.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/client/Call.java,v
  retrieving revision 1.234
  retrieving revision 1.235
  diff -u -r1.234 -r1.235
  --- Call.java	4 Nov 2004 12:54:19 -0000	1.234
  +++ Call.java	30 Nov 2004 21:54:32 -0000	1.235
  @@ -259,6 +259,13 @@
               "axis.streaming";
       
       /**
  +     * Internal property to indicate a one way call.
  +     * That will disable processing of response handlers.
  +     */
  +    protected static final String ONE_WAY =
  +        "axis.one.way";
  +
  +    /**
        * A Hashtable mapping protocols (Strings) to Transports (classes)
        */
       private static Hashtable transports  = new Hashtable();
  @@ -2762,12 +2769,14 @@
           //create a new class
           Runnable runnable = new Runnable(){
               public void run() {
  +                msgContext.setProperty(Call.ONE_WAY, Boolean.TRUE);
                   try {
                       service.getEngine().invoke( msgContext );
                   } catch (AxisFault af){
                       //TODO: handle errors properly
                       log.debug(Messages.getMessage("exceptionPrinting"), af);
                   }
  +                msgContext.removeProperty(Call.ONE_WAY);
               }
           };
           //create a thread to run it