axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Daniels" <gdani...@macromedia.com>
Subject Re: cvs commit: xml-axis/java/test/RPCDispatch TestRPC.java
Date Thu, 31 May 2001 11:56:03 GMT
Hm.  This seems odd, since this test ran fine for me after my submission.
I'll doublecheck this after I get to my work machine where I made the
change.

--G

----- Original Message -----
From: <robj@apache.org>
To: <xml-axis-cvs@apache.org>
Sent: Thursday, May 31, 2001 1:14 AM
Subject: cvs commit: xml-axis/java/test/RPCDispatch TestRPC.java


> robj        01/05/30 22:14:52
>
>   Modified:    java/src/org/apache/axis/server AxisServer.java
>                java/test/RPCDispatch TestRPC.java
>   Log:
>   TestRPC now puts service registry into messagecontext
>   properties (which seems weird! and hard to remember).
>   AxisServer now actually pays attention to
>   getServiceHandler.  All of this must be fixed up because
>   it is barely working at the moment!
>
>   Revision  Changes    Path
>   1.11      +14 -9
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.10
>   retrieving revision 1.11
>   diff -u -r1.10 -r1.11
>   --- AxisServer.java 2001/05/30 14:18:22 1.10
>   +++ AxisServer.java 2001/05/31 05:14:48 1.11
>   @@ -93,14 +93,14 @@
>        public void init() {
>            // Load the simple handler registry and init it
>            Debug.Print( 1, "Enter: AxisServer::init" );
>   -        DefaultHandlerRegistry  hr =
>   +        DefaultHandlerRegistry  hr =
>              new
DefaultHandlerRegistry(Constants.SERVER_HANDLER_REGISTRY);
>            hr.setOnServer( true );
>            hr.init();
>            addOption( Constants.HANDLER_REGISTRY, hr );
>
>            // Load the simple deployed services registry and init it
>   -        DefaultServiceRegistry  sr =
>   +        DefaultServiceRegistry  sr =
>              new
DefaultServiceRegistry(Constants.SERVER_SERVICE_REGISTRY);
>            sr.setHandlerRegistry( hr ); // needs to know about 'hr'
>            sr.setOnServer( true );
>   @@ -128,11 +128,11 @@
>            /* Do some prep-work.  Get the registries and put them in the
*/
>            /* msgContext so they can be used by later handlers.
*/
>
/**************************************************************/
>   -        HandlerRegistry hr =
>   +        HandlerRegistry hr =
>                (HandlerRegistry) getOption(Constants.HANDLER_REGISTRY);
>   -        HandlerRegistry sr =
>   +        HandlerRegistry sr =
>                (HandlerRegistry) getOption(Constants.SERVICE_REGISTRY);
>   -        TypeMappingRegistry tmr =
>   +        TypeMappingRegistry tmr =
>                (TypeMappingRegistry)
getOption(Constants.TYPEMAP_REGISTRY);
>
>            msgContext.setProperty(Constants.AXIS_ENGINE, this );
>   @@ -201,19 +201,24 @@
>                    h.invoke(msgContext);
>                  else
>                    throw new AxisFault( "Server.error",
>   -                                     "Can't find '" + hName + "'
handler",
>   +                                     "Can't find '" + hName + "'
handler",
>                                         null, null );
>                  */
>   +              // This is HACKISH!  Why do we *have* both
getTargetService
>   +              // and getServiceHandler?  And why is this code looking
in
>   +              // the *handler* registry rather than the *service*
registry???
>   +              // -- RobJ
>                  hName = msgContext.getTargetService();
>   +              h = msgContext.getServiceHandler();
>                  if ( hName != null ) {
>   -                if ((h = hr.find( hName )) != null)
>   +                if (h != null || ((h = hr.find( hName )) != null))
>                      h.invoke(msgContext);
>                    else
>                      throw new AxisFault( "Server.error",
>   -                                     "Can't find '" + hName + "'
handler",
>   +                                     "Can't find '" + hName + "'
handler",
>                                         null, null );
>                  } else {
>   -                throw new AxisFault("Server.NoService",
>   +                throw new AxisFault("Server.NoService",
>                                        "The Axis engine couldn't find a
target service to invoke!",
>                                        null, null );
>                  }
>
>
>
>   1.5       +1 -0      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.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- TestRPC.java 2001/05/31 03:20:18 1.4
>   +++ TestRPC.java 2001/05/31 05:14:51 1.5
>   @@ -68,6 +68,7 @@
>
>            // Create a message context with the action and message
>            MessageContext msgContext = new MessageContext();
>   +        msgContext.setProperty(Constants.SERVICE_REGISTRY, sr);
>            msgContext.setRequestMessage(new Message(envelope,
"SOAPEnvelope"));
>            try {
>                    msgContext.setTargetService(SOAPAction);
>
>
>
>


Mime
View raw message