Author: mmao
Date: Tue Dec 11 02:07:11 2007
New Revision: 603192
URL: http://svn.apache.org/viewvc?rev=603192&view=rev
Log:
* Abstract common code
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/AbstractWSATest.java
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/AbstractWSATest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/AbstractWSATest.java?rev=603192&view=auto
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/AbstractWSATest.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/AbstractWSATest.java
Tue Dec 11 02:07:11 2007
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.apache.cxf.systest.ws;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintWriter;
+
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+
+public class AbstractWSATest extends AbstractBusClientServerTestBase {
+
+ protected ByteArrayOutputStream setupInLogging() {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ PrintWriter writer = new PrintWriter(bos, true);
+ LoggingInInterceptor in = new LoggingInInterceptor(writer);
+ this.bus.getInInterceptors().add(in);
+ return bos;
+ }
+
+ protected ByteArrayOutputStream setupOutLogging() {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ PrintWriter writer = new PrintWriter(bos, true);
+
+ LoggingOutInterceptor out = new LoggingOutInterceptor(writer);
+ this.bus.getOutInterceptors().add(out);
+
+ return bos;
+ }
+}
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java?rev=603192&r1=603191&r2=603192&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_disable/WSADisableTest.java
Tue Dec 11 02:07:11 2007
@@ -20,22 +20,19 @@
package org.apache.cxf.systest.ws.addr_disable;
import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.soap.AddressingFeature;
-import org.apache.cxf.interceptor.LoggingInInterceptor;
-import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.systest.ws.AbstractWSATest;
import org.apache.cxf.systest.ws.addr_feature.AddNumbersPortType;
import org.apache.cxf.systest.ws.addr_feature.AddNumbersService;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-public class WSADisableTest extends AbstractBusClientServerTestBase {
+public class WSADisableTest extends AbstractWSATest {
private final QName serviceName = new
QName("http://apache.org/cxf/systest/ws/addr_feature/",
"AddNumbersService");
@@ -48,24 +45,6 @@
@BeforeClass
public static void startServers() throws Exception {
assertTrue("server did not launch correctly",
launchServer(Server.class));
- }
-
- private ByteArrayOutputStream setupInLogging() {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintWriter writer = new PrintWriter(bos, true);
- LoggingInInterceptor in = new LoggingInInterceptor(writer);
- this.bus.getInInterceptors().add(in);
- return bos;
- }
-
- private ByteArrayOutputStream setupOutLogging() {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintWriter writer = new PrintWriter(bos, true);
-
- LoggingOutInterceptor out = new LoggingOutInterceptor(writer);
- this.bus.getOutInterceptors().add(out);
-
- return bos;
}
@Test
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java?rev=603192&r1=603191&r2=603192&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java
Tue Dec 11 02:07:11 2007
@@ -20,21 +20,18 @@
package org.apache.cxf.systest.ws.addr_feature;
import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.soap.AddressingFeature;
-import org.apache.cxf.interceptor.LoggingInInterceptor;
-import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.systest.ws.AbstractWSATest;
import org.apache.cxf.ws.addressing.WSAddressingFeature;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-public class WSAClientServerTest extends AbstractBusClientServerTestBase {
+public class WSAClientServerTest extends AbstractWSATest {
private final QName serviceName = new
QName("http://apache.org/cxf/systest/ws/addr_feature/",
"AddNumbersService");
@@ -47,24 +44,6 @@
@BeforeClass
public static void startServers() throws Exception {
assertTrue("server did not launch correctly",
launchServer(Server.class));
- }
-
- private ByteArrayOutputStream setupInLogging() {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintWriter writer = new PrintWriter(bos, true);
- LoggingInInterceptor in = new LoggingInInterceptor(writer);
- this.bus.getInInterceptors().add(in);
- return bos;
- }
-
- private ByteArrayOutputStream setupOutLogging() {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintWriter writer = new PrintWriter(bos, true);
-
- LoggingOutInterceptor out = new LoggingOutInterceptor(writer);
- this.bus.getOutInterceptors().add(out);
-
- return bos;
}
@Test
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java?rev=603192&r1=603191&r2=603192&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java
Tue Dec 11 02:07:11 2007
@@ -20,21 +20,18 @@
package org.apache.cxf.systest.ws.addr_fromjava;
import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
import java.net.URL;
-import org.apache.cxf.interceptor.LoggingInInterceptor;
-import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.systest.ws.AbstractWSATest;
import org.apache.cxf.systest.ws.addr_fromjava.client.AddNumberImpl;
import org.apache.cxf.systest.ws.addr_fromjava.client.AddNumberImplService;
import
org.apache.cxf.systest.ws.addr_fromjava.client.AddNumbersException_Exception;
import org.apache.cxf.systest.ws.addr_fromjava.server.Server;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-public class WSAFromJavaTest extends AbstractBusClientServerTestBase {
+public class WSAFromJavaTest extends AbstractWSATest {
@Before
public void setUp() throws Exception {
@@ -44,24 +41,6 @@
@BeforeClass
public static void startServers() throws Exception {
assertTrue("server did not launch correctly",
launchServer(Server.class));
- }
-
- private ByteArrayOutputStream setupInLogging() {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintWriter writer = new PrintWriter(bos, true);
- LoggingInInterceptor in = new LoggingInInterceptor(writer);
- this.bus.getInInterceptors().add(in);
- return bos;
- }
-
- private ByteArrayOutputStream setupOutLogging() {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintWriter writer = new PrintWriter(bos, true);
-
- LoggingOutInterceptor out = new LoggingOutInterceptor(writer);
- this.bus.getOutInterceptors().add(out);
-
- return bos;
}
@Test
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java?rev=603192&r1=603191&r2=603192&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_fromwsdl/WSAFromWSDLTest.java
Tue Dec 11 02:07:11 2007
@@ -20,22 +20,19 @@
package org.apache.cxf.systest.ws.addr_fromwsdl;
import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.soap.AddressingFeature;
-import org.apache.cxf.interceptor.LoggingInInterceptor;
-import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.systest.ws.AbstractWSATest;
import org.apache.cxf.systest.ws.addr_feature.AddNumbersFault_Exception;
import org.apache.cxf.systest.ws.addr_feature.AddNumbersPortType;
import org.apache.cxf.systest.ws.addr_feature.AddNumbersService;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-public class WSAFromWSDLTest extends AbstractBusClientServerTestBase {
+public class WSAFromWSDLTest extends AbstractWSATest {
private static final String BASE_URI =
"http://apache.org/cxf/systest/ws/addr_feature/"
+ "AddNumbersPortType/";
@@ -51,24 +48,6 @@
@BeforeClass
public static void startServers() throws Exception {
assertTrue("server did not launch correctly",
launchServer(Server.class));
- }
-
- private ByteArrayOutputStream setupInLogging() {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintWriter writer = new PrintWriter(bos, true);
- LoggingInInterceptor in = new LoggingInInterceptor(writer);
- this.bus.getInInterceptors().add(in);
- return bos;
- }
-
- private ByteArrayOutputStream setupOutLogging() {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintWriter writer = new PrintWriter(bos, true);
-
- LoggingOutInterceptor out = new LoggingOutInterceptor(writer);
- this.bus.getOutInterceptors().add(out);
-
- return bos;
}
@Test
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java?rev=603192&r1=603191&r2=603192&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/WSAPureWsdlTest.java
Tue Dec 11 02:07:11 2007
@@ -20,22 +20,18 @@
package org.apache.cxf.systest.ws.addr_wsdl;
import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
import java.net.URL;
-
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
-import org.apache.cxf.interceptor.LoggingInInterceptor;
-import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.systest.ws.AbstractWSATest;
import org.apache.cxf.systest.ws.addr_feature.AddNumbersPortType;
import org.apache.cxf.systest.ws.addr_feature.AddNumbersService;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-public class WSAPureWsdlTest extends AbstractBusClientServerTestBase {
+public class WSAPureWsdlTest extends AbstractWSATest {
private final QName serviceName = new
QName("http://apache.org/cxf/systest/ws/addr_feature/",
"AddNumbersService");
@@ -48,24 +44,6 @@
@BeforeClass
public static void startServers() throws Exception {
assertTrue("server did not launch correctly",
launchServer(Server.class));
- }
-
- private ByteArrayOutputStream setupInLogging() {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintWriter writer = new PrintWriter(bos, true);
- LoggingInInterceptor in = new LoggingInInterceptor(writer);
- this.bus.getInInterceptors().add(in);
- return bos;
- }
-
- private ByteArrayOutputStream setupOutLogging() {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintWriter writer = new PrintWriter(bos, true);
-
- LoggingOutInterceptor out = new LoggingOutInterceptor(writer);
- this.bus.getOutInterceptors().add(out);
-
- return bos;
}
@Test