From d701f2fbe1c9aceba431144d8a0c77ac523b72bb Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Fri, 9 Jul 2010 12:51:02 +0000 Subject: [PATCH] SWS-544 - Add test framework for Spring WS client --- .../integration/CustomerCountRequest.java | 35 +++++++++++++++++++ .../integration/CustomerCountResponse.java | 35 +++++++++++++++++++ .../client2/integration/IntegrationTest.java | 2 -- .../client2/integration/integration-test.xml | 4 +-- 4 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 test/src/test/java/org/springframework/ws/mock/client2/integration/CustomerCountRequest.java create mode 100644 test/src/test/java/org/springframework/ws/mock/client2/integration/CustomerCountResponse.java diff --git a/test/src/test/java/org/springframework/ws/mock/client2/integration/CustomerCountRequest.java b/test/src/test/java/org/springframework/ws/mock/client2/integration/CustomerCountRequest.java new file mode 100644 index 00000000..7312924a --- /dev/null +++ b/test/src/test/java/org/springframework/ws/mock/client2/integration/CustomerCountRequest.java @@ -0,0 +1,35 @@ +/* + * 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. + */ + +package org.springframework.ws.mock.client2.integration; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(namespace = "http://springframework.org/client") +public class CustomerCountRequest { + + private String customerName; + + @XmlElement(namespace = "http://springframework.org/client") + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String name) { + this.customerName = name; + } +} \ No newline at end of file diff --git a/test/src/test/java/org/springframework/ws/mock/client2/integration/CustomerCountResponse.java b/test/src/test/java/org/springframework/ws/mock/client2/integration/CustomerCountResponse.java new file mode 100644 index 00000000..a4a917c5 --- /dev/null +++ b/test/src/test/java/org/springframework/ws/mock/client2/integration/CustomerCountResponse.java @@ -0,0 +1,35 @@ +/* + * 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. + */ + +package org.springframework.ws.mock.client2.integration; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(namespace = "http://springframework.org/client") +public class CustomerCountResponse { + + private int customerCount; + + @XmlElement(namespace = "http://springframework.org/client") + public int getCustomerCount() { + return customerCount; + } + + public void setCustomerCount(int customerCount) { + this.customerCount = customerCount; + } +} \ No newline at end of file diff --git a/test/src/test/java/org/springframework/ws/mock/client2/integration/IntegrationTest.java b/test/src/test/java/org/springframework/ws/mock/client2/integration/IntegrationTest.java index 7d362be5..76459fb2 100644 --- a/test/src/test/java/org/springframework/ws/mock/client2/integration/IntegrationTest.java +++ b/test/src/test/java/org/springframework/ws/mock/client2/integration/IntegrationTest.java @@ -20,8 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.ws.client.core.WebServiceTemplate; -import org.springframework.ws.mock.client.CustomerCountRequest; -import org.springframework.ws.mock.client.CustomerCountResponse; import org.junit.Before; import org.junit.Test; diff --git a/test/src/test/resources/org/springframework/ws/mock/client2/integration/integration-test.xml b/test/src/test/resources/org/springframework/ws/mock/client2/integration/integration-test.xml index 7f11c52b..dd9042e3 100644 --- a/test/src/test/resources/org/springframework/ws/mock/client2/integration/integration-test.xml +++ b/test/src/test/resources/org/springframework/ws/mock/client2/integration/integration-test.xml @@ -12,8 +12,8 @@ - org.springframework.ws.mock.client.CustomerCountRequest - org.springframework.ws.mock.client.CustomerCountResponse + org.springframework.ws.mock.client2.integration.CustomerCountRequest + org.springframework.ws.mock.client2.integration.CustomerCountResponse