gdaniels 02/02/12 13:28:38
Modified: java/test/session TestSimpleSession.java
java/src/org/apache/axis/providers/java JavaProvider.java
Log:
Name the service in the Session test so it has something to key off of.
Revision Changes Path
1.12 +3 -4 xml-axis/java/test/session/TestSimpleSession.java
Index: TestSimpleSession.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/session/TestSimpleSession.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- TestSimpleSession.java 6 Feb 2002 15:27:43 -0000 1.11
+++ TestSimpleSession.java 12 Feb 2002 21:28:38 -0000 1.12
@@ -86,6 +86,7 @@
new RPCProvider(),
sessionHandler);
+ service.setName("sessionTestService");
service.setOption("scope", "session");
service.setOption("className", "test.session.TestSimpleSession");
service.setOption("allowedMethods", "counter");
@@ -106,14 +107,12 @@
// Try it - first invocation should return 1.
Integer count = (Integer)call.invoke("sessionTest", "counter", null);
assertNotNull("count was null!", count);
- assertEquals("count was " + count + " (expected 1)", count.intValue(),
- 1);
+ assertEquals("count was wrong", 1, count.intValue());
// Next invocation should return 2, assuming the session-based
// counter is working.
count = (Integer)call.invoke("sessionTest", "counter", null);
- assertEquals("count was " + count + " (expected 2)", count.intValue(),
- 2);
+ assertEquals("count was wrong", 2, count.intValue());
// Now start fresh and confirm a new session
Service svc2 = new Service(clientProvider);
1.36 +6 -2
xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java
Index: JavaProvider.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- JavaProvider.java 12 Feb 2002 17:28:32 -0000 1.35
+++ JavaProvider.java 12 Feb 2002 21:28:38 -0000 1.36
@@ -103,8 +103,8 @@
String clsName)
throws Exception
{
- String serviceName = msgContext.getTargetService();
-
+ String serviceName = msgContext.getServiceHandler().getName();
+
// scope can be "Request", "Session", "Application"
// (as with Apache SOAP)
String scope = (String)service.getOption("scope");
@@ -119,6 +119,10 @@
return getNewServiceObject(msgContext, clsName);
} else if (scope.equalsIgnoreCase("Session")) {
+
+ // What do we do if serviceName is null at this point???
+ if (serviceName == null)
+ serviceName = msgContext.getServiceHandler().toString();
// look in incoming session
if (msgContext.getSession() != null) {