diff --git a/test/src/main/java/org/springframework/ws/test/client/MockWebServiceServer.java b/test/src/main/java/org/springframework/ws/test/client/MockWebServiceServer.java
index f78016e9..2e2fb89c 100644
--- a/test/src/main/java/org/springframework/ws/test/client/MockWebServiceServer.java
+++ b/test/src/main/java/org/springframework/ws/test/client/MockWebServiceServer.java
@@ -29,7 +29,8 @@ import org.springframework.ws.test.support.MockStrategiesHelper;
*
* The typical usage of this class is:
*
- * - Create a {@code MockWebServiceServer} instance by calling {@link #createServer(WebServiceTemplate)}.
+ *
- Create a {@code MockWebServiceServer} instance by calling {@link #createServer(WebServiceTemplate)},
+ * or any other the other {@code createServer()} methods.
* Typically, the template is configured as a Spring bean, either explicitly or as a property of a class that extends
* {@link WebServiceGatewaySupport WebServiceGatewaySupport}.
* - Set up request expectations by calling {@link #expect(RequestMatcher)}, possibly by using the default
@@ -66,7 +67,7 @@ import org.springframework.ws.test.support.MockStrategiesHelper;
*
* @Before
* public void createServer() throws Exception {
- * mockServer = MockWebServiceServer.createServer(client.getWebServiceTemplate());
+ * mockServer = MockWebServiceServer.createServer(client);
* }
*
* @Test
diff --git a/test/src/main/java/org/springframework/ws/test/client/ResponseActions.java b/test/src/main/java/org/springframework/ws/test/client/ResponseActions.java
index 737912a7..7caca304 100644
--- a/test/src/main/java/org/springframework/ws/test/client/ResponseActions.java
+++ b/test/src/main/java/org/springframework/ws/test/client/ResponseActions.java
@@ -17,7 +17,8 @@
package org.springframework.ws.test.client;
/**
- * Allows for setting up responses. Implementations of this interface are returned by {@link WebServiceMock}.
+ * Allows for setting up responses and additional expectations. Implementations of this interface are returned by
+ * {@link MockWebServiceServer#expect(RequestMatcher)}.
*
* @author Arjen Poutsma
* @author Lukas Krecan
diff --git a/test/src/main/java/org/springframework/ws/test/client/ResponseCreator.java b/test/src/main/java/org/springframework/ws/test/client/ResponseCreator.java
index cfdb5ffe..690e1e50 100644
--- a/test/src/main/java/org/springframework/ws/test/client/ResponseCreator.java
+++ b/test/src/main/java/org/springframework/ws/test/client/ResponseCreator.java
@@ -23,7 +23,7 @@ import org.springframework.ws.WebServiceMessage;
import org.springframework.ws.WebServiceMessageFactory;
/**
- * Allows for creating up responses. Implementations of this interface are returned by {@link WebServiceMock}.
+ * Allows for creating up responses. Implementations of this interface are returned by {@link ResponseCreators}.
*
* @author Arjen Poutsma
* @author Lukas Krecan
diff --git a/test/src/main/java/org/springframework/ws/test/client/XPathExpectations.java b/test/src/main/java/org/springframework/ws/test/client/XPathExpectations.java
index b6857f5a..4e646093 100644
--- a/test/src/main/java/org/springframework/ws/test/client/XPathExpectations.java
+++ b/test/src/main/java/org/springframework/ws/test/client/XPathExpectations.java
@@ -19,14 +19,14 @@ package org.springframework.ws.test.client;
/**
* Allows for setting up expectations on XPath expressions.
*
- * Implementations of this interface are returned by {@link WebServiceMock#xpath(String)} and {@link
- * WebServiceMock#xpath(String, java.util.Map)}, as part of the fluent API. As such, it is not typical to implement this
+ * Implementations of this interface are returned by {@link RequestMatchers#xpath(String)} and {@link
+ * RequestMatchers#xpath(String, java.util.Map)}, as part of the fluent API. As such, it is not typical to implement this
* interface yourself.
*
* @author Lukas Krecan
* @author Arjen Poutsma
- * @see WebServiceMock#xpath(String)
- * @see WebServiceMock#xpath(String, java.util.Map)
+ * @see RequestMatchers#xpath(String)
+ * @see RequestMatchers#xpath(String, java.util.Map)
* @since 2.0
*/
public interface XPathExpectations {
diff --git a/test/src/main/java/org/springframework/ws/test/client/package-info.java b/test/src/main/java/org/springframework/ws/test/client/package-info.java
index 990b41b8..19fd96b1 100644
--- a/test/src/main/java/org/springframework/ws/test/client/package-info.java
+++ b/test/src/main/java/org/springframework/ws/test/client/package-info.java
@@ -16,6 +16,6 @@
/**
* Provides a testing framework for client-side Web service testing. This package contains the
- * {@link org.springframework.ws.test.client.WebServiceMock}, and various related test interfaces.
+ * {@link org.springframework.ws.test.client.MockWebServiceServer}, and various related test interfaces.
*/
package org.springframework.ws.test.client;
diff --git a/test/src/main/java/org/springframework/ws/test/server/package-info.java b/test/src/main/java/org/springframework/ws/test/server/package-info.java
new file mode 100644
index 00000000..c509d1ae
--- /dev/null
+++ b/test/src/main/java/org/springframework/ws/test/server/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2005-2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Provides a testing framework for server-side Web service testing. This package contains the
+ * {@link org.springframework.ws.test.client.MockWebServiceClient}, and various related test interfaces.
+ */
+package org.springframework.ws.test.server;
diff --git a/test/src/test/java/org/springframework/ws/test/client/DefaultXPathExpectationsTest.java b/test/src/test/java/org/springframework/ws/test/client/DefaultXPathExpectationsTest.java
index 5d1df900..e2d8ce11 100644
--- a/test/src/test/java/org/springframework/ws/test/client/DefaultXPathExpectationsTest.java
+++ b/test/src/test/java/org/springframework/ws/test/client/DefaultXPathExpectationsTest.java
@@ -32,7 +32,7 @@ public class DefaultXPathExpectationsTest {
@Test
public void existsMatch() throws IOException, AssertionError {
- RequestMatcher requestMatcher = WebServiceMock.xpath("//b").exists();
+ RequestMatcher requestMatcher = RequestMatchers.xpath("//b").exists();
assertNotNull(requestMatcher);
WebServiceMessage message = createMock(WebServiceMessage.class);
@@ -47,7 +47,7 @@ public class DefaultXPathExpectationsTest {
@Test(expected = AssertionError.class)
public void existsNonMatch() throws IOException, AssertionError {
- RequestMatcher requestMatcher = WebServiceMock.xpath("//c").exists();
+ RequestMatcher requestMatcher = RequestMatchers.xpath("//c").exists();
assertNotNull(requestMatcher);
WebServiceMessage message = createMock(WebServiceMessage.class);
@@ -60,7 +60,7 @@ public class DefaultXPathExpectationsTest {
@Test
public void notExistsMatch() throws IOException, AssertionError {
- RequestMatcher requestMatcher = WebServiceMock.xpath("//c").doesNotExist();
+ RequestMatcher requestMatcher = RequestMatchers.xpath("//c").doesNotExist();
assertNotNull(requestMatcher);
WebServiceMessage message = createMock(WebServiceMessage.class);
@@ -75,7 +75,7 @@ public class DefaultXPathExpectationsTest {
@Test(expected = AssertionError.class)
public void notExistsNonMatch() throws IOException, AssertionError {
- RequestMatcher requestMatcher = WebServiceMock.xpath("//a").doesNotExist();
+ RequestMatcher requestMatcher = RequestMatchers.xpath("//a").doesNotExist();
assertNotNull(requestMatcher);
WebServiceMessage message = createMock(WebServiceMessage.class);
@@ -88,7 +88,7 @@ public class DefaultXPathExpectationsTest {
@Test
public void evaluatesToTrueMatch() throws IOException, AssertionError {
- RequestMatcher requestMatcher = WebServiceMock.xpath("//b=1").evaluatesTo(true);
+ RequestMatcher requestMatcher = RequestMatchers.xpath("//b=1").evaluatesTo(true);
assertNotNull(requestMatcher);
WebServiceMessage message = createMock(WebServiceMessage.class);
@@ -103,7 +103,7 @@ public class DefaultXPathExpectationsTest {
@Test(expected = AssertionError.class)
public void evaluatesToTrueNonMatch() throws IOException, AssertionError {
- RequestMatcher requestMatcher = WebServiceMock.xpath("//b=2").evaluatesTo(true);
+ RequestMatcher requestMatcher = RequestMatchers.xpath("//b=2").evaluatesTo(true);
assertNotNull(requestMatcher);
WebServiceMessage message = createMock(WebServiceMessage.class);
@@ -116,7 +116,7 @@ public class DefaultXPathExpectationsTest {
@Test
public void evaluatesToFalseMatch() throws IOException, AssertionError {
- RequestMatcher requestMatcher = WebServiceMock.xpath("//b!=1").evaluatesTo(false);
+ RequestMatcher requestMatcher = RequestMatchers.xpath("//b!=1").evaluatesTo(false);
assertNotNull(requestMatcher);
WebServiceMessage message = createMock(WebServiceMessage.class);
@@ -131,7 +131,7 @@ public class DefaultXPathExpectationsTest {
@Test(expected = AssertionError.class)
public void evaluatesToFalseNonMatch() throws IOException, AssertionError {
- RequestMatcher requestMatcher = WebServiceMock.xpath("//b!=2").evaluatesTo(false);
+ RequestMatcher requestMatcher = RequestMatchers.xpath("//b!=2").evaluatesTo(false);
assertNotNull(requestMatcher);
WebServiceMessage message = createMock(WebServiceMessage.class);
@@ -145,7 +145,7 @@ public class DefaultXPathExpectationsTest {
@Test
public void existsWithNamespacesMatch() throws IOException, AssertionError {
Map ns = Collections.singletonMap("x", "http://example.org");
- RequestMatcher requestMatcher = WebServiceMock.xpath("//x:b", ns).exists();
+ RequestMatcher requestMatcher = RequestMatchers.xpath("//x:b", ns).exists();
assertNotNull(requestMatcher);
WebServiceMessage message = createMock(WebServiceMessage.class);
@@ -162,7 +162,7 @@ public class DefaultXPathExpectationsTest {
@Test(expected = AssertionError.class)
public void existsWithNamespacesNonMatch() throws IOException, AssertionError {
Map ns = Collections.singletonMap("x", "http://example.org");
- RequestMatcher requestMatcher = WebServiceMock.xpath("//b", ns).exists();
+ RequestMatcher requestMatcher = RequestMatchers.xpath("//b", ns).exists();
assertNotNull(requestMatcher);
WebServiceMessage message = createMock(WebServiceMessage.class);
@@ -176,7 +176,7 @@ public class DefaultXPathExpectationsTest {
@Test
public void evaluatesToIntegerMatch() throws IOException, AssertionError {
- RequestMatcher requestMatcher = WebServiceMock.xpath("//b").evaluatesTo(1);
+ RequestMatcher requestMatcher = RequestMatchers.xpath("//b").evaluatesTo(1);
assertNotNull(requestMatcher);
WebServiceMessage message = createMock(WebServiceMessage.class);
@@ -191,7 +191,7 @@ public class DefaultXPathExpectationsTest {
@Test(expected = AssertionError.class)
public void evaluatesToIntegerNonMatch() throws IOException, AssertionError {
- RequestMatcher requestMatcher = WebServiceMock.xpath("//b").evaluatesTo(2);
+ RequestMatcher requestMatcher = RequestMatchers.xpath("//b").evaluatesTo(2);
assertNotNull(requestMatcher);
WebServiceMessage message = createMock(WebServiceMessage.class);
diff --git a/test/src/test/java/org/springframework/ws/test/client/SchemaValidatingRequestMatcherTest.java b/test/src/test/java/org/springframework/ws/test/client/SchemaValidatingRequestMatcherTest.java
index 0babd832..417b3296 100644
--- a/test/src/test/java/org/springframework/ws/test/client/SchemaValidatingRequestMatcherTest.java
+++ b/test/src/test/java/org/springframework/ws/test/client/SchemaValidatingRequestMatcherTest.java
@@ -51,7 +51,7 @@ public class SchemaValidatingRequestMatcherTest {
expect(message.getPayloadSource()).andReturn(new StringSource(
"0text"));
- RequestMatcher requestMatcher = WebServiceMock.validPayload(schema1);
+ RequestMatcher requestMatcher = RequestMatchers.validPayload(schema1);
replay(message);
@@ -65,7 +65,7 @@ public class SchemaValidatingRequestMatcherTest {
expect(message.getPayloadSource()).andReturn(new StringSource(
"atext"));
- RequestMatcher requestMatcher = WebServiceMock.validPayload(schema1);
+ RequestMatcher requestMatcher = RequestMatchers.validPayload(schema1);
replay(message);
@@ -79,7 +79,7 @@ public class SchemaValidatingRequestMatcherTest {
expect(message.getPayloadSource()).andReturn(new StringSource(
"0text"));
- RequestMatcher requestMatcher = WebServiceMock.validPayload(schema1, schema2);
+ RequestMatcher requestMatcher = RequestMatchers.validPayload(schema1, schema2);
replay(message);
@@ -93,7 +93,7 @@ public class SchemaValidatingRequestMatcherTest {
expect(message.getPayloadSource()).andReturn(new StringSource(
"atext"));
- RequestMatcher requestMatcher = WebServiceMock.validPayload(schema1, schema2);
+ RequestMatcher requestMatcher = RequestMatchers.validPayload(schema1, schema2);
replay(message);
@@ -107,7 +107,7 @@ public class SchemaValidatingRequestMatcherTest {
expect(message.getPayloadSource()).andReturn(new StringSource(
"atext"));
- RequestMatcher requestMatcher = WebServiceMock.validPayload(schema2, schema1);
+ RequestMatcher requestMatcher = RequestMatchers.validPayload(schema2, schema1);
replay(message);