User: cgjung
Date: 02/03/12 03:04:47
Modified: jboss.net/testsuite/src/main/org/jboss/test/net
AxisTestCase.java AxisTestServices.java
Log:
Axis Beta RC1 is here. Needs no more to be patched for integrating with the
jboss classloading architecture. Lots of interna have changed, though.
Adapted the deployment descriptors to support WSDD now.
Revision Changes Path
1.5 +100 -83
contrib/jboss.net/testsuite/src/main/org/jboss/test/net/AxisTestCase.java
Index: AxisTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/contrib/jboss.net/testsuite/src/main/org/jboss/test/net/AxisTestCase.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AxisTestCase.java 7 Feb 2002 09:49:32 -0000 1.4
+++ AxisTestCase.java 12 Mar 2002 11:04:47 -0000 1.5
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: AxisTestCase.java,v 1.4 2002/02/07 09:49:32 cgjung Exp $
+// $Id: AxisTestCase.java,v 1.5 2002/03/12 11:04:47 cgjung Exp $
package org.jboss.test.net;
@@ -18,7 +18,8 @@
import org.jboss.net.jmx.adaptor.RemoteAdaptor;
import org.jboss.net.jmx.adaptor.RemoteAdaptorInvocationHandler;
-import org.apache.axis.AxisEngine;
+import org.apache.axis.client.Service;
+import org.apache.axis.client.Call;
import org.apache.axis.AxisFault;
import org.apache.axis.client.AxisClient;
@@ -33,108 +34,124 @@
/**
* Junit Test class with some Axis support
- * @created 12. Oktober 2001, 11:20
- * @author <a href="mailto:[EMAIL PROTECTED]">Christoph G. Jung</a>
- * @version $Revision: 1.4 $
- * Change History:
+ * <br>
+ * <h3>Change History</h3>
* <ul>
- * <li> jung, 6.2.2002: adapted to new test case structure. </li>
+ * <li> jung, 10.03.2002: axis alpha3. </li>
+ * <li> jung, 06.02.2002: adapted to new test case structure. </li>
* </ul>
+ * @created 12. Oktober 2001, 11:20
+ * @author <a href="mailto:[EMAIL PROTECTED]">Christoph G. Jung</a>
+ * @version $Revision: 1.5 $
*/
public class AxisTestCase extends JBossTestCase {
/** the protocol we use */
- protected String PROTOCOL="http://";
+ protected String PROTOCOL = "http://";
/** the address to which we forward the request */
- protected String ADDRESS="localhost:8080/";
+ protected String ADDRESS = "localhost:8080/";
- /** where the axis servlet context is installed */
- protected String AXIS_CONTEXT=ADDRESS+"axis/";
+ /** where the axis servlet context is installed */
+ protected String AXIS_CONTEXT = ADDRESS + "axis/";
- /** where the service port is located under */
- protected String SERVICE_PORT=AXIS_CONTEXT+"services";
+ /** where the service port is located under */
+ protected String SERVICE_PORT = AXIS_CONTEXT + "services";
- /** has an associated end point that may be configured once */
- protected String END_POINT=PROTOCOL+SERVICE_PORT;
+ /** has an associated end point that may be configured once */
+ protected String END_POINT = PROTOCOL + SERVICE_PORT;
- /** the engine that this test case uses */
- protected AxisEngine engine;
+ /** the call object */
+ protected Service service;
- /** the map of methods to interface names */
- protected Map interfaceMap=new AxisInvocationHandler.DefaultInterfaceMap();;
+ /** the map of methods to interface names */
+ protected Map interfaceMap = new AxisInvocationHandler.DefaultInterfaceMap();
+ ;
/** the map of methods to method names */
- protected Map methodMap=new AxisInvocationHandler.DefaultMethodMap();
+ protected Map methodMap = new AxisInvocationHandler.DefaultMethodMap();
+
+ /** Creates new AxisTestCase */
+ public AxisTestCase(String name) {
+ super(name);
+ }
+
+ public void setUp() throws Exception {
+ URL resource =
getClass().getClassLoader().getResource(getAxisConfiguration());
+ System.out.println("Configuring axis with provider resource " + resource);
+ service = new Service(new XMLResourceProvider(resource));
+ service.setMaintainSession(true);
+ }
+
+ /** searches for the right configuration provider */
+ protected String getAxisConfiguration() {
+ return "client-config.xml";
+ }
+
+ /** creates a new Axis service using the test engine*/
+ protected AxisInvocationHandler createAxisInvocationHandler(URL endpoint)
+ throws AxisFault {
+ return new AxisInvocationHandler(
+ endpoint,service,
+ methodMap,
+ interfaceMap);
+ }
+
+ /** creates a new Axis service using the test engine*/
+ protected MBeanInvocationHandler createMBeanInvocationHandler(URL endpoint)
+ throws AxisFault {
+ return new MBeanInvocationHandler(
+ endpoint,
+ service,
+ methodMap,
+ interfaceMap);
+ }
+
+ /** creates a new Axis service using the test engine*/
+ protected Object createAxisService(Class _class, URL endpoint)
+ throws AxisFault {
+ return AxisInvocationHandler.createAxisService(
+ _class,
+ createAxisInvocationHandler(endpoint));
+ }
+
+ /** creates a new Axis service using the test engine*/
+ protected Object createMBeanService(Class _class, URL endpoint)
+ throws AxisFault {
+ return MBeanInvocationHandler.createMBeanService(
+ _class,
+ createMBeanInvocationHandler(endpoint));
+ }
+
+ /** creates a new remote adaptor using the test engine*/
+ protected RemoteAdaptor createRemoteAdaptor(URL endpoint)
+ throws RemoteException {
+ return RemoteAdaptorInvocationHandler.createRemoteAdaptor(
+ createMBeanInvocationHandler(endpoint));
+ }
- /** Creates new AxisTestCase */
- public AxisTestCase(String name) {
- super(name);
- }
-
- public void setUp() throws Exception {
- URL resource=getClass().getClassLoader().
- getResource(getAxisConfiguration());
- System.out.println("Configuring engine with config "+resource);
- engine=new AxisClient(new XMLResourceProvider(resource));
- }
-
- /** searches for the right configuration provider */
- protected String getAxisConfiguration() {
- return "client-config.xml";
- }
-
- /** creates a new Axis service using the test engine*/
- protected AxisInvocationHandler createAxisInvocationHandler(URL endpoint)
throws AxisFault {
- return new AxisInvocationHandler(endpoint,engine,methodMap,interfaceMap);
- }
-
- /** creates a new Axis service using the test engine*/
- protected MBeanInvocationHandler createMBeanInvocationHandler(URL endpoint)
throws AxisFault {
- return new MBeanInvocationHandler(endpoint,engine,methodMap,interfaceMap);
- }
-
- /** creates a new Axis service using the test engine*/
- protected Object createAxisService(Class _class, URL endpoint) throws AxisFault
{
- return
AxisInvocationHandler.createAxisService(_class,createAxisInvocationHandler(endpoint));
- }
-
- /** creates a new Axis service using the test engine*/
- protected Object createMBeanService(Class _class, URL endpoint) throws
AxisFault {
- return
MBeanInvocationHandler.createMBeanService(_class,createMBeanInvocationHandler(endpoint));
- }
-
- /** creates a new remote adaptor using the test engine*/
- protected RemoteAdaptor createRemoteAdaptor(URL endpoint) throws
RemoteException {
- return RemoteAdaptorInvocationHandler.createRemoteAdaptor(
- createMBeanInvocationHandler(endpoint));
- }
-
- protected static Test getAxisSetup(final Test test, final String jarName)
throws Exception
- {
- JBossTestSetup wrapper = new AxisTestSetup(test)
- {
-
- protected void setUp() throws Exception
- {
- this.deployAxis(jarName);
- this.getLog().debug("deployed package: " + jarName);
- }
-
- protected void tearDown() throws Exception
- {
- this.undeployAxis(jarName);
- this.getLog().debug("undeployed package: " + jarName);
- }
- };
+ protected static Test getAxisSetup(final Test test, final String jarName)
+ throws Exception {
+ JBossTestSetup wrapper = new AxisTestSetup(test) {
+
+ protected void setUp() throws Exception {
+ this.deployAxis(jarName);
+ this.getLog().debug("deployed package: " + jarName);
+ }
+
+ protected void tearDown() throws Exception {
+ this.undeployAxis(jarName);
+ this.getLog().debug("undeployed package: " + jarName);
+ }
+ };
return wrapper;
}
- protected static Test getAxisSetup(final Class clazz, final String jarName)
throws Exception
- {
+ protected static Test getAxisSetup(final Class clazz, final String jarName)
+ throws Exception {
TestSuite suite = new TestSuite();
suite.addTest(new TestSuite(clazz));
return getAxisSetup(suite, jarName);
}
-}
+}
\ No newline at end of file
1.4 +3 -3
contrib/jboss.net/testsuite/src/main/org/jboss/test/net/AxisTestServices.java
Index: AxisTestServices.java
===================================================================
RCS file:
/cvsroot/jboss/contrib/jboss.net/testsuite/src/main/org/jboss/test/net/AxisTestServices.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AxisTestServices.java 7 Feb 2002 09:49:32 -0000 1.3
+++ AxisTestServices.java 12 Mar 2002 11:04:47 -0000 1.4
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: AxisTestServices.java,v 1.3 2002/02/07 09:49:32 cgjung Exp $
+// $Id: AxisTestServices.java,v 1.4 2002/03/12 11:04:47 cgjung Exp $
package org.jboss.test.net;
@@ -18,7 +18,7 @@
* helper functions to deal with the JBoss integrated axis service
* @created 15. Oktober 2001, 18:39
* @author <a href="mailto:[EMAIL PROTECTED]">Christoph G. Jung</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* Change History:
* <ul>
* <li> jung, 6.2.2002: adapted to new test structure </li>
@@ -28,7 +28,7 @@
extends JBossTestServices
{
/** where the beast is located */
- protected final static String axisServiceName = "jboss:service=Axis";
+ protected final static String axisServiceName = "jboss.net:service=Axis";
/** Creates new AxisTestServices */
public AxisTestServices(String name) {
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development