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 de...@apache.org on 2005/09/15 11:19:11 UTC
svn commit: r289185 - in /webservices/axis2/trunk/java/modules:
core/src/org/apache/axis2/transport/tcp/TCPServer.java
integration/test/org/apache/axis2/integration/UtilsTCPServer.java
integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java
Author: deepal
Date: Thu Sep 15 02:18:56 2005
New Revision: 289185
URL: http://svn.apache.org/viewcvs?rev=289185&view=rev
Log:
fixing EchoTCP tes
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsTCPServer.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java?rev=289185&r1=289184&r2=289185&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/tcp/TCPServer.java Thu Sep 15 02:18:56 2005
@@ -132,7 +132,10 @@
if (param != null) {
int port = Integer.parseInt((String) param.getValue());
}
+ }
+ public ConfigurationContext getSystemContext() {
+ return this.configContext;
}
public static void main(String[] args) throws AxisFault,
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsTCPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsTCPServer.java?rev=289185&r1=289184&r2=289185&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsTCPServer.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsTCPServer.java Thu Sep 15 02:18:56 2005
@@ -33,24 +33,24 @@
private static int count = 0;
private static TCPServer receiver;
- private static ConfigurationContext configurationContext;
public static final int TESTING_PORT = 5555;
public static final String FAILURE_MESSAGE = "Intentional Failure";
private static Log log = LogFactory.getLog(UtilsTCPServer.class);
public static synchronized void deployService(ServiceDescription service)
throws AxisFault {
- configurationContext.getAxisConfiguration().addService(service);
- Utils.resolvePhases(configurationContext.getAxisConfiguration(),
+ receiver.getSystemContext().getAxisConfiguration().addService(service);
+
+ Utils.resolvePhases(receiver.getSystemContext().getAxisConfiguration(),
service);
- ServiceGroupContext serviceGroupContext = service.getParent().getServiceGroupContext(configurationContext);
+ ServiceGroupContext serviceGroupContext = service.getParent().getServiceGroupContext(receiver.getSystemContext());
}
public static synchronized void unDeployService(QName service)
throws AxisFault {
- configurationContext.getAxisConfiguration().removeService(service.getLocalPart());
+ receiver.getSystemContext().getAxisConfiguration().removeService(service.getLocalPart());
}
public static synchronized void start() throws Exception {
@@ -66,18 +66,18 @@
throw new Exception("Repository directory does not exist");
}
- configurationContext =
- erfac.buildConfigurationContext(file.getAbsolutePath());
+ ConfigurationContext er = erfac.buildConfigurationContext(
+ file.getAbsolutePath());
try {
Thread.sleep(2000);
} catch (InterruptedException e1) {
throw new AxisFault("Thread interuptted", e1);
}
- configurationContext.getAxisConfiguration().engageModule(
+ er.getAxisConfiguration().engageModule(
new QName("addressing"));
receiver =
new TCPServer(UtilServer.TESTING_PORT,
- configurationContext);
+ er);
receiver.start();
}
@@ -98,7 +98,4 @@
}
}
- public static ConfigurationContext getConfigurationContext() {
- return configurationContext;
- }
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java?rev=289185&r1=289184&r2=289185&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java Thu Sep 15 02:18:56 2005
@@ -56,6 +56,7 @@
private MessageContext mc;
private SimpleHTTPServer sas;
private ServiceDescription service;
+ private ServiceDescription clientService;
private ServiceContext serviceContext;
private boolean finish = false;
@@ -78,8 +79,10 @@
Echo.class.getName(),
operationName);
UtilsTCPServer.deployService(service);
-
- serviceContext = UtilServer.createAdressedEnabledClientSide(service);
+ clientService = Utils.createSimpleService(serviceName,
+ Echo.class.getName(),
+ operationName);
+ serviceContext = UtilServer.createAdressedEnabledClientSide(clientService);
}
protected void tearDown() throws Exception {