Monday, 22 September
2014
Mon, 22 Sep
'14
10:56 a.m.
Author: asoldano
Date: 2014-09-22 11:56:45 -0400 (Mon, 22 Sep 2014)
New Revision: 18944
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3805/JBWS3805TestCase.java
Removed:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3805/SoapAddressURISchemeTestCase.java
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3805/WEB-INF/jboss-webservices.xml
Log:
[JBWS-3805] Enriching test
Copied:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3805/JBWS3805TestCase.java
(from rev 18938,
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3805/SoapAddressURISchemeTestCase.java)
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3805/JBWS3805TestCase.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3805/JBWS3805TestCase.java 2014-09-22
15:56:45 UTC (rev 18944)
@@ -0,0 +1,71 @@
+package org.jboss.test.ws.jaxws.cxf.jbws3805;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+
+import junit.framework.Test;
+
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+public class JBWS3805TestCase extends JBossWSTest
+{
+ private static String publishURL = "http://" + getServerHost() +
":8080/jaxws-cxf-jbws3805/HelloService";
+
+ public static BaseDeployment<?>[] createDeployments()
+ {
+ List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-jbws3805.war") {
+ {
+ archive.setManifest(new StringAsset("Manifest-Version: 1.0\n" +
"Dependencies: org.jboss.ws.common\n"))
+
.addClass(org.jboss.test.ws.jaxws.cxf.jbws3805.EndpointOne.class).addClass(org.jboss.test.ws.jaxws.cxf.jbws3805.EndpointOneImpl.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jbws3805/WEB-INF/jboss-webservices.xml"),
"jboss-webservices.xml")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jbws3805/WEB-INF/web.xml"));
+ }
+ });
+ return list.toArray(new BaseDeployment<?>[list.size()]);
+ }
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS3805TestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
+ }
+
+ public void testWsdlSoapAddress() throws Exception
+ {
+ URL wsdlURL = new URL(publishURL + "?wsdl");
+ HttpURLConnection connection = (HttpURLConnection)wsdlURL.openConnection();
+ try
+ {
+ connection.connect();
+ assertEquals(200, connection.getResponseCode());
+ connection.getInputStream();
+
+ BufferedReader in = new BufferedReader(new
InputStreamReader(connection.getInputStream()));
+ String line;
+ while ((line = in.readLine()) != null)
+ {
+ if (line.contains("address location"))
+ {
+ assertTrue("Unexpected uri scheme",
line.contains("https://foo:8443/jaxws-cxf-JBWS3805/HelloService"));
+ return;
+ }
+ }
+ fail("Could not check soap:address!");
+ }
+ finally
+ {
+ connection.disconnect();
+ }
+
+ }
+
+}
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3805/SoapAddressURISchemeTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3805/SoapAddressURISchemeTestCase.java 2014-09-22
15:49:37 UTC (rev 18943)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3805/SoapAddressURISchemeTestCase.java 2014-09-22
15:56:45 UTC (rev 18944)
@@ -1,71 +0,0 @@
-package org.jboss.test.ws.jaxws.cxf.jbws3805;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
-
-import junit.framework.Test;
-
-import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestHelper;
-import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-public class SoapAddressURISchemeTestCase extends JBossWSTest
-{
- private static String publishURL = "http://" + getServerHost() +
":8080/jaxws-cxf-jbws3805/HelloService";
-
- public static BaseDeployment<?>[] createDeployments()
- {
- List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
- list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-jbws3805.war") {
- {
- archive.setManifest(new StringAsset("Manifest-Version: 1.0\n" +
"Dependencies: org.jboss.ws.common\n"))
-
.addClass(org.jboss.test.ws.jaxws.cxf.jbws3805.EndpointOne.class).addClass(org.jboss.test.ws.jaxws.cxf.jbws3805.EndpointOneImpl.class)
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jbws3805/WEB-INF/jboss-webservices.xml"),
"jboss-webservices.xml")
- .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/cxf/jbws3805/WEB-INF/web.xml"));
- }
- });
- return list.toArray(new BaseDeployment<?>[list.size()]);
- }
-
- public static Test suite()
- {
- return new JBossWSTestSetup(SoapAddressURISchemeTestCase.class,
JBossWSTestHelper.writeToFile(createDeployments()));
- }
-
- public void testSoapAddressURIScheme() throws Exception
- {
- URL wsdlURL = new URL(publishURL + "?wsdl");
- HttpURLConnection connection = (HttpURLConnection)wsdlURL.openConnection();
- try
- {
- connection.connect();
- assertEquals(200, connection.getResponseCode());
- connection.getInputStream();
-
- BufferedReader in = new BufferedReader(new
InputStreamReader(connection.getInputStream()));
- String line;
- while ((line = in.readLine()) != null)
- {
- if (line.contains("address location"))
- {
- assertTrue("Unexpected uri scheme",
line.contains("https") && line.contains("8443"));
- return;
- }
- }
- fail("Could not check soap:address!");
- }
- finally
- {
- connection.disconnect();
- }
-
- }
-
-}
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3805/WEB-INF/jboss-webservices.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3805/WEB-INF/jboss-webservices.xml 2014-09-22
15:49:37 UTC (rev 18943)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3805/WEB-INF/jboss-webservices.xml 2014-09-22
15:56:45 UTC (rev 18944)
@@ -8,5 +8,13 @@
<name>wsdl.soapAddress.rewrite.wsdl-uri-scheme</name>
<value>https</value>
</property>
+ <property>
+ <name>wsdl.soapAddress.rewrite.wsdl-path-rewrite-rule</name>
+ <value>s/jbws/JBWS/</value>
+ </property>
+ <property>
+ <name>wsdl.soapAddress.rewrite.wsdl-host</name>
+ <value>foo</value>
+ </property>
</webservices>