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/17 06:53:03 UTC
svn commit: r289704 - in /webservices/axis2/trunk/java/modules:
core/src/org/apache/axis2/clientapi/ core/src/org/apache/axis2/engine/
integration/test/org/apache/axis2/engine/
integration/test/org/apache/axis2/integration/
integration/test/org/apache/...
Author: deepal
Date: Fri Sep 16 21:52:40 2005
New Revision: 289704
URL: http://svn.apache.org/viewcvs?rev=289704&view=rev
Log:
fixed test failures due to unique service name
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CharctersetEncodingTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CommonsHTTPEchoRawXMLTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SOAPversionTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceDispatchingTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheLoadTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java?rev=289704&r1=289703&r2=289704&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/clientapi/Call.java Fri Sep 16 21:52:40 2005
@@ -136,7 +136,7 @@
//call the underline implementation
super.invokeNonBlocking(opDesc, msgctx, callback);
}
-/**
+ /**
* Invoke the nonblocking/Asynchronous call
*
* @param axisop
@@ -210,8 +210,7 @@
QName assumedServiceName = new QName("AnonymousService");
ServiceDescription axisService = new ServiceDescription(assumedServiceName);
operationTemplate = new OperationDescription(new QName("TemplateOperation"));
- ServiceGroupDescription serviceGroupDescription =
- new ServiceGroupDescription(sysContext.getAxisConfiguration());
+// ServiceGroupDescription serviceGroupDescription = new ServiceGroupDescription(sysContext.getAxisConfiguration());
PhasesInfo info =((AxisConfigurationImpl)sysContext.getAxisConfiguration()).getPhasesinfo();
//to set the operation flows
@@ -219,14 +218,16 @@
info.setOperationPhases(operationTemplate);
}
axisService.addOperation(operationTemplate);
- serviceGroupDescription.addService(axisService);
- serviceGroupDescription.getServiceGroupContext(sysContext);
- serviceGroupDescription.setServiceGroupName(assumedServiceName.getLocalPart());
- sysContext.getAxisConfiguration().addServiceGroup(serviceGroupDescription);
+ sysContext.getAxisConfiguration().addService(axisService);
+// serviceGroupDescription.addService(axisService);
+// serviceGroupDescription.getServiceGroupContext(sysContext);
+// serviceGroupDescription.setServiceGroupName(assumedServiceName.getLocalPart());
+// sysContext.getAxisConfiguration().addServiceGroup(serviceGroupDescription);
// return sysContext.createServiceContext(assumedServiceName);
- return serviceGroupDescription.getServiceGroupContext(sysContext).getServiceContext(
- assumedServiceName.getLocalPart());
+ return axisService.getParent().getServiceGroupContext(sysContext).getServiceContext(assumedServiceName.getLocalPart());
+// return serviceGroupDescription.getServiceGroupContext(sysContext).getServiceContext(
+// assumedServiceName.getLocalPart());
}
/**
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java?rev=289704&r1=289703&r2=289704&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java Fri Sep 16 21:52:40 2005
@@ -308,7 +308,10 @@
* @throws AxisFault
*/
public synchronized void removeService(String name) throws AxisFault {
- allservices.remove(name);
+ ServiceDescription service =(ServiceDescription)allservices.remove(name);
+ if(service != null){
+ log.info("Removed service " + name);
+ }
}
public TransportInDescription getTransportIn(QName name) throws AxisFault {
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CharctersetEncodingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CharctersetEncodingTest.java?rev=289704&r1=289703&r2=289704&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CharctersetEncodingTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CharctersetEncodingTest.java Fri Sep 16 21:52:40 2005
@@ -36,134 +36,136 @@
* Testing charater encoding support
*/
public class CharctersetEncodingTest extends TestCase {
-
+
private EndpointReference targetEPR = new EndpointReference(
- "http://127.0.0.1:" + (UtilServer.TESTING_PORT)
- + "/axis/services/EchoXMLService/echoOMElement");
-
+ "http://127.0.0.1:" + (UtilServer.TESTING_PORT)
+ + "/axis/services/EchoXMLService/echoOMElement");
+
private EndpointReference targetEPR1 = new EndpointReference(
- "http://127.0.0.1:5556/axis/services/EchoXMLService/echoOMElement");
+ "http://127.0.0.1:5556/axis/services/EchoXMLService/echoOMElement");
- private Log log = LogFactory.getLog(getClass());
+ private Log log = LogFactory.getLog(getClass());
- private QName serviceName = new QName("EchoXMLService");
+ private QName serviceName = new QName("EchoXMLService");
- private QName operationName = new QName("echoOMElement");
+ private QName operationName = new QName("echoOMElement");
- private ServiceDescription service;
+ private ServiceDescription service;
- private boolean finish = false;
-
- public CharctersetEncodingTest(String arg0) {
- super(arg0);
- }
+ private boolean finish = false;
+
+ public CharctersetEncodingTest(String arg0) {
+ super(arg0);
+ }
protected void setUp() throws Exception {
UtilServer.start(Constants.TESTING_PATH + "chuncked-enabledRepository");
-
+
service =
Utils.createSimpleService(serviceName,
Echo.class.getName(),
operationName);
UtilServer.deployService(service);
}
-
+
protected void tearDown() throws Exception {
UtilServer.unDeployService(serviceName);
UtilServer.stop();
+ UtilServer.unDeployClientService();
}
-
-
+
+
+
private void runTest(String value, String expected) {
-
- try {
- OMFactory fac = OMAbstractFactory.getOMFactory();
- OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
- OMElement payload = fac.createOMElement("echoOMElement", omNs);
- OMElement text = fac.createOMElement("Text", omNs);
- text.addChild(fac.createText(text, value));
- payload.addChild(text);
- org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call(
- Constants.TESTING_PATH + "chuncked-enabledRepository");
+ try {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
+ OMElement payload = fac.createOMElement("echoOMElement", omNs);
+ OMElement text = fac.createOMElement("Text", omNs);
+ text.addChild(fac.createText(text, value));
+ payload.addChild(text);
+
+ org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call(
+ Constants.TESTING_PATH + "chuncked-enabledRepository");
call.set(MessageContext.CHARACTER_SET_ENCODING, "UTF-16");
call.setTo(targetEPR);
- call.setTransportInfo(Constants.TRANSPORT_HTTP,
- Constants.TRANSPORT_HTTP, false);
-
- OMElement resultElem = call.invokeBlocking(operationName
+ call.setTransportInfo(Constants.TRANSPORT_HTTP,
+ Constants.TRANSPORT_HTTP, false);
+
+ OMElement resultElem = call.invokeBlocking(operationName
.getLocalPart(), payload);
- assertNotNull("Result is null", resultElem);
- String result = ((OMElement) resultElem.getFirstChild()).getText();
+ assertNotNull("Result is null", resultElem);
+ String result = ((OMElement) resultElem.getFirstChild()).getText();
+
+ assertNotNull("Result value is null", result);
- assertNotNull("Result value is null", result);
+ assertEquals("Expected result not received.", expected, result);
+
+ call.close();
+
+ } catch (AxisFault e) {
+ log.error(e,e);
+ assertFalse("Failure in processing", true);
+ }
+ }
- assertEquals("Expected result not received.", expected, result);
-
- call.close();
-
- } catch (AxisFault e) {
- log.error(e,e);
- assertFalse("Failure in processing", true);
- }
- }
-
private void runtest(String value) throws Exception {
runTest(value, value);
}
-
+
public void testSimpleString() throws Exception {
runtest("a simple string");
}
-
+
public void testStringWithApostrophes() throws Exception {
runtest("this isn't a simple string");
}
-
+
public void testStringWithEntities() throws Exception {
runTest("&<>'"", "&<>'"");
}
-
+
public void testStringWithRawEntities() throws Exception {
runTest("&<>'\"", "&<>'\"");
}
public void testStringWithLeadingAndTrailingSpaces() throws Exception {
runtest(" centered ");
}
-
+
public void testWhitespace() throws Exception {
runtest(" \n \t "); // note: \r fails
}
-
+
public void testFrenchAccents() throws Exception {
runtest("\u00e0\u00e2\u00e4\u00e7\u00e8\u00e9\u00ea\u00eb\u00ee\u00ef\u00f4\u00f6\u00f9\u00fb\u00fc");
}
-
+
public void testGermanUmlauts() throws Exception {
runtest(" Some text \u00df with \u00fc special \u00f6 chars \u00e4.");
}
-
+
public void testWelcomeUnicode() throws Exception {
// welcome in several languages
runtest(
- "Chinese (trad.) : \u6b61\u8fce ");
+ "Chinese (trad.) : \u6b61\u8fce ");
}
public void testWelcomeUnicode2() throws Exception {
// welcome in several languages
runtest(
- "Greek : \u03ba\u03b1\u03bb\u03ce\u03c2 \u03bf\u03c1\u03af\u03c3\u03b1\u03c4\u03b5");
+ "Greek : \u03ba\u03b1\u03bb\u03ce\u03c2 \u03bf\u03c1\u03af\u03c3\u03b1\u03c4\u03b5");
}
public void testWelcomeUnicode3() throws Exception {
// welcome in several languages
runtest(
- "Japanese : \u3088\u3046\u3053\u305d");
- }
-
+ "Japanese : \u3088\u3046\u3053\u305d");
+ }
+
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CommonsHTTPEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CommonsHTTPEchoRawXMLTest.java?rev=289704&r1=289703&r2=289704&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CommonsHTTPEchoRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CommonsHTTPEchoRawXMLTest.java Fri Sep 16 21:52:40 2005
@@ -41,8 +41,8 @@
public class CommonsHTTPEchoRawXMLTest extends TestCase {
private EndpointReference targetEPR =
new EndpointReference("http://127.0.0.1:"
- + (UtilServer.TESTING_PORT)
- + "/axis/services/EchoXMLService/echoOMElement");
+ + (UtilServer.TESTING_PORT)
+ + "/axis/services/EchoXMLService/echoOMElement");
private Log log = LogFactory.getLog(getClass());
private QName serviceName = new QName("EchoXMLService");
private QName operationName = new QName("echoOMElement");
@@ -77,6 +77,7 @@
protected void tearDown() throws Exception {
UtilServer.unDeployService(serviceName);
UtilServer.stop();
+ UtilServer.unDeployClientService();
}
public void testEchoXMLASync() throws Exception {
@@ -125,7 +126,6 @@
public void testEchoXMLSync() throws Exception {
SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
-
OMElement payload = TestingUtils.createDummyOMElement();
org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call(
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java?rev=289704&r1=289703&r2=289704&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java Fri Sep 16 21:52:40 2005
@@ -43,8 +43,8 @@
public class EchoRawXMLTest extends TestCase {
protected EndpointReference targetEPR =
new EndpointReference("http://127.0.0.1:"
- + (UtilServer.TESTING_PORT)
- + "/axis/services/EchoXMLService/echoOMElement");
+ + (UtilServer.TESTING_PORT)
+ + "/axis/services/EchoXMLService/echoOMElement");
protected Log log = LogFactory.getLog(getClass());
protected QName serviceName = new QName("EchoXMLService");
protected QName operationName = new QName("echoOMElement");
@@ -53,7 +53,7 @@
protected AxisConfiguration engineRegistry;
protected MessageContext mc;
- private ConfigurationContext config;
+ private ConfigurationContext config;
//private Thread thisThread;
// private SimpleHTTPServer sas;
protected ServiceContext serviceContext;
@@ -81,6 +81,7 @@
protected void tearDown() throws Exception {
UtilServer.unDeployService(serviceName);
UtilServer.stop();
+ UtilServer.unDeployClientService();
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SOAPversionTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SOAPversionTest.java?rev=289704&r1=289703&r2=289704&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SOAPversionTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SOAPversionTest.java Fri Sep 16 21:52:40 2005
@@ -44,13 +44,14 @@
public class SOAPversionTest extends TestCase {
private EndpointReference targetEPR =
new EndpointReference("http://127.0.0.1:"
- + (UtilServer.TESTING_PORT)
- + "/axis/services/EchoXMLService/echoOMElement");
+ + (UtilServer.TESTING_PORT)
+ + "/axis/services/EchoXMLService/echoOMElement");
private Log log = LogFactory.getLog(getClass());
private QName serviceName = new QName("EchoXMLService");
private QName operationName = new QName("echoOMElement");
private QName transportName = new QName("http://localhost/my",
"NullTransport");
+ QName assumedServiceName = new QName("AnonymousService");
private AxisConfiguration engineRegistry;
private MessageContext mc;
@@ -62,13 +63,20 @@
private boolean finish = false;
protected void setUp() throws Exception {
- UtilServer.start();
+ UtilServer.start();
service =
Utils.createSimpleService(serviceName,
Echo.class.getName(),
operationName);
UtilServer.deployService(service);
}
+
+ protected void tearDown() throws Exception {
+ UtilServer.unDeployService(serviceName);
+ UtilServer.stop();
+ UtilServer.unDeployClientService();
+ }
+
public void testSOAP11() throws AxisFault {
SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceDispatchingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceDispatchingTest.java?rev=289704&r1=289703&r2=289704&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceDispatchingTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceDispatchingTest.java Fri Sep 16 21:52:40 2005
@@ -39,8 +39,8 @@
public class ServiceDispatchingTest extends TestCase {
private EndpointReference targetEPR =
new EndpointReference("http://127.0.0.1:"
- + (UtilServer.TESTING_PORT)
- + "/axis/services/EchoXMLService/echoOMElement");
+ + (UtilServer.TESTING_PORT)
+ + "/axis/services/EchoXMLService/echoOMElement");
private Log log = LogFactory.getLog(getClass());
private QName serviceName = new QName("EchoXMLService");
private QName operationName = new QName("echoOMElement");
@@ -77,7 +77,9 @@
protected void tearDown() throws Exception {
UtilServer.unDeployService(serviceName);
UtilServer.stop();
+ UtilServer.unDeployClientService();
}
+
public void testDispatchWithURLOnly() throws Exception {
SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java?rev=289704&r1=289703&r2=289704&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java Fri Sep 16 21:52:40 2005
@@ -18,6 +18,7 @@
import junit.framework.TestCase;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.clientapi.ListenerManager;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.context.ServiceContext;
@@ -41,12 +42,19 @@
receiver.getSystemContext().getAxisConfiguration().addService(service);
Utils.resolvePhases(receiver.getSystemContext().getAxisConfiguration(),
service);
- ServiceGroupContext serviceGroupContext = service.getParent().getServiceGroupContext(receiver.getSystemContext());
+// ServiceGroupContext serviceGroupContext = service.getParent().getServiceGroupContext(receiver.getSystemContext());
}
public static synchronized void unDeployService(QName service) throws AxisFault {
receiver.getSystemContext().getAxisConfiguration().removeService(
service.getLocalPart());
+ }
+
+ public static synchronized void unDeployClientService() throws AxisFault {
+ if(ListenerManager.configurationContext !=null){
+ ListenerManager.configurationContext.getAxisConfiguration()
+ .removeService("AnonymousService");
+ }
}
public static synchronized void start() throws Exception {
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheLoadTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheLoadTest.java?rev=289704&r1=289703&r2=289704&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheLoadTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheLoadTest.java Fri Sep 16 21:52:40 2005
@@ -53,6 +53,7 @@
protected void tearDown() throws Exception {
UtilServer.unDeployService(serviceName);
UtilServer.stop();
+ UtilServer.unDeployClientService();
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheTest.java?rev=289704&r1=289703&r2=289704&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheTest.java Fri Sep 16 21:52:40 2005
@@ -26,7 +26,7 @@
import javax.xml.namespace.QName;
public class EchoRawMTOMFileCacheTest extends EchoRawMTOMTest{
-
+
private QName serviceName = new QName("EchoXMLService");
private QName operationName = new QName("echoOMElement");
@@ -54,12 +54,13 @@
protected void tearDown() throws Exception {
UtilServer.unDeployService(serviceName);
UtilServer.stop();
+ UtilServer.unDeployClientService();
}
public void testEchoXMLASync() throws Exception {
super.testEchoXMLASync();
}
-
+
public void testEchoXMLSync() throws Exception {
super.testEchoXMLSync();
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java?rev=289704&r1=289703&r2=289704&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java Fri Sep 16 21:52:40 2005
@@ -76,8 +76,10 @@
protected void tearDown() throws Exception {
UtilServer.unDeployService(serviceName);
UtilServer.stop();
+ UtilServer.unDeployClientService();
}
+
protected OMElement createEnvelope() {
OMFactory fac = OMAbstractFactory.getOMFactory();
@@ -123,6 +125,7 @@
OMText binaryNode = (OMText) ele1.getFirstChild();
compareWithActualOMText(binaryNode);
log.info("" + i);
+ UtilServer.unDeployClientService();
}
}
protected void compareWithActualOMText(OMText binaryNode)
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java?rev=289704&r1=289703&r2=289704&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java Fri Sep 16 21:52:40 2005
@@ -83,6 +83,7 @@
protected void tearDown() throws Exception {
UtilServer.unDeployService(serviceName);
UtilServer.stop();
+ UtilServer.unDeployClientService();
}
protected OMElement createEnvelope() throws Exception {
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java?rev=289704&r1=289703&r2=289704&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java Fri Sep 16 21:52:40 2005
@@ -56,7 +56,7 @@
private ServiceDescription service;
OMText expectedTextData;
-
+
private boolean finish = false;
public EchoRawMTOMToBase64Test() {
@@ -77,6 +77,7 @@
protected void tearDown() throws Exception {
UtilServer.unDeployService(serviceName);
UtilServer.stop();
+ UtilServer.unDeployClientService();
}
private OMElement createPayload() {
@@ -86,7 +87,7 @@
OMElement rpcWrapEle = fac.createOMElement("echoMTOMtoBase64", omNs);
OMElement data = fac.createOMElement("data", omNs);
byte[] byteArray = new byte[]{13, 56, 65, 32, 12, 12, 7, -3, -2, -1,
- 98};
+ 98};
DataHandler dataHandler = new DataHandler(new ByteArrayDataSource(byteArray));
expectedTextData = new OMTextImpl(dataHandler, true);
data.addChild(expectedTextData);
@@ -109,7 +110,7 @@
Callback callback = new Callback() {
public void onComplete(AsyncResult result) {
SOAPEnvelope envelope = result.getResponseEnvelope();
-
+
OMElement data = (OMElement) envelope.getBody().getFirstElement().getFirstChild();
compareWithCreatedOMText(data.getText());
finish = true;
@@ -135,7 +136,7 @@
}
call.close();
}
-
+
public void testEchoXMLSync() throws Exception {
for (int i = 0; i < 10; i++) {
SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
@@ -158,6 +159,7 @@
compareWithCreatedOMText(data.getText());
call.close();
log.info("" + i);
+ UtilServer.unDeployClientService();
}
}