axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/server AxisServer.java
Date Wed, 20 Jun 2001 12:16:33 GMT
gdaniels    01/06/20 05:16:27

  Modified:    java/src/org/apache/axis/server AxisServer.java
  Log:
  Quick fix for body dispatch in cases where no Handler has caused
  a parse by the time we need to dispatch.
  
  Revision  Changes    Path
  1.23      +14 -4     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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- AxisServer.java	2001/06/18 18:34:34	1.22
  +++ AxisServer.java	2001/06/20 12:16:09	1.23
  @@ -216,7 +216,7 @@
                 hName = Constants.GLOBAL_REQUEST ;
                 if ( hName != null  && (h = hr.find( hName )) != null )
                     h.invoke(msgContext);
  -      
  +              
                 /**
                  * At this point, the service should have been set by someone
                  * (either the originator of the MessageContext, or one of the
  @@ -224,13 +224,23 @@
                  * fault.
                  */
                 h = msgContext.getServiceHandler();
  -              if (h != null)
  -                  h.invoke(msgContext);
  -              else
  +              if (h == null) {
  +                // It's possible that we haven't yet parsed the
  +                // message at this point.  This is a kludge to
  +                // make sure we have.  There probably wants to be
  +                // some kind of declarative "parse point" on the handler
  +                // chain instead....
  +                Message rm = msgContext.getRequestMessage();
  +                rm.getAsSOAPEnvelope().getFirstBody();
  +                h = msgContext.getServiceHandler();
  +                if (h == null)
                     throw new AxisFault("Server.NoService",
                                         "The Axis engine couldn't find a " +
                                         "target service to invoke!",
                                         null, null );
  +              }
  +
  +              h.invoke(msgContext);
         
                 /* Process the Global Response Chain */
                 /***********************************/
  
  
  

Mime
View raw message