SWS-383
This commit is contained in:
@@ -16,13 +16,13 @@
|
||||
|
||||
package org.springframework.ws.transport.jms;
|
||||
|
||||
import org.custommonkey.xmlunit.XMLAssert;
|
||||
|
||||
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
|
||||
import org.springframework.ws.client.core.WebServiceTemplate;
|
||||
import org.springframework.xml.transform.StringResult;
|
||||
import org.springframework.xml.transform.StringSource;
|
||||
|
||||
import org.custommonkey.xmlunit.XMLAssert;
|
||||
|
||||
public class JmsIntegrationTest extends AbstractDependencyInjectionSpringContextTests {
|
||||
|
||||
private WebServiceTemplate webServiceTemplate;
|
||||
@@ -35,11 +35,23 @@ public class JmsIntegrationTest extends AbstractDependencyInjectionSpringContext
|
||||
this.webServiceTemplate = webServiceTemplate;
|
||||
}
|
||||
|
||||
public void testJmsTransport() throws Exception {
|
||||
protected void onTearDown() throws Exception {
|
||||
applicationContext.close();
|
||||
setDirty();
|
||||
}
|
||||
|
||||
public void testTemporaryQueue() throws Exception {
|
||||
String content = "<root xmlns='http://springframework.org/spring-ws'><child/></root>";
|
||||
StringResult result = new StringResult();
|
||||
webServiceTemplate.sendSourceAndReceiveToResult(new StringSource(content), result);
|
||||
XMLAssert.assertXMLEqual("Invalid content received", content, result.toString());
|
||||
applicationContext.close();
|
||||
}
|
||||
|
||||
public void testPermanentQueue() throws Exception {
|
||||
String url = "jms:RequestQueue?deliveryMode=NON_PERSISTENT;replyToName=ResponseQueue";
|
||||
String content = "<root xmlns='http://springframework.org/spring-ws'><child/></root>";
|
||||
StringResult result = new StringResult();
|
||||
webServiceTemplate.sendSourceAndReceiveToResult(url, new StringSource(content), result);
|
||||
XMLAssert.assertXMLEqual("Invalid content received", content, result.toString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user