JBossWS SVN: r17619 - in stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws: jbws2529 and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-29 08:24:47 -0400 (Wed, 29 May 2013)
New Revision: 17619
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2528/JBWS2528TestCase.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2529/JBWS2529TestCase.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2591/JBWS2591TestCase.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2593/JBWS2593TestCase.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
Log:
Do not set system properties on tests run concurrently! (that sys prop change is actually not even needed anymore)
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2528/JBWS2528TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2528/JBWS2528TestCase.java 2013-05-29 11:02:15 UTC (rev 17618)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2528/JBWS2528TestCase.java 2013-05-29 12:24:47 UTC (rev 17619)
@@ -54,8 +54,6 @@
private String CLASSES_DIR;
private String TEST_DIR;
- private String origJavaHome;
-
protected void setUp() throws Exception
{
super.setUp();
@@ -64,23 +62,8 @@
CLASSES_DIR = System.getProperty("test.classes.directory");
ENDPOINT_CLASS = "org.jboss.test.ws.jaxws.jbws2528.JBWS2528Endpoint";
TEST_DIR = createResourceFile("..").getAbsolutePath();
- origJavaHome = System.getProperty("java.home");
-
-
- // the script requires the system JAVA_HOME, which points to the JDK not the JRE
- if(origJavaHome.indexOf(FS + "jre")!=-1)
- {
- String JDK_HOME = origJavaHome.substring(0, origJavaHome.indexOf(FS + "jre"));
- System.setProperty("java.home", JDK_HOME);
- }
}
- protected void tearDown() throws Exception
- {
- // reset surefire's JAVA_HOME
- System.setProperty("java.home", origJavaHome);
- }
-
public void test() throws Exception
{
File destDir = new File(TEST_DIR, "wsprovide" + FS + "java");
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2529/JBWS2529TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2529/JBWS2529TestCase.java 2013-05-29 11:02:15 UTC (rev 17618)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2529/JBWS2529TestCase.java 2013-05-29 12:24:47 UTC (rev 17619)
@@ -52,8 +52,6 @@
private String CLASSES_DIR;
private String TEST_DIR;
- private String origJavaHome;
-
protected void setUp() throws Exception
{
super.setUp();
@@ -62,23 +60,8 @@
CLASSES_DIR = System.getProperty("test.classes.directory");
ENDPOINT_CLASS = "org.jboss.test.ws.jaxws.jbws2529.JBWS2529Endpoint";
TEST_DIR = createResourceFile("..").getAbsolutePath();
- origJavaHome = System.getProperty("java.home");
-
-
- // the script requires the system JAVA_HOME, which points to the JDK not the JRE
- if(origJavaHome.indexOf(FS + "jre")!=-1)
- {
- String JDK_HOME = origJavaHome.substring(0, origJavaHome.indexOf(FS + "jre"));
- System.setProperty("java.home", JDK_HOME);
- }
}
- protected void tearDown() throws Exception
- {
- // reset surefire's JAVA_HOME
- System.setProperty("java.home", origJavaHome);
- }
-
public void test() throws Exception
{
File destDir = new File(TEST_DIR, "wsprovide" + FS + "java");
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2591/JBWS2591TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2591/JBWS2591TestCase.java 2013-05-29 11:02:15 UTC (rev 17618)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2591/JBWS2591TestCase.java 2013-05-29 12:24:47 UTC (rev 17619)
@@ -46,30 +46,14 @@
private String JBOSS_HOME;
private String TEST_DIR;
- private String origJavaHome;
-
protected void setUp() throws Exception
{
super.setUp();
JBOSS_HOME = System.getProperty("jboss.home");
TEST_DIR = createResourceFile("..").getAbsolutePath();
- origJavaHome = System.getProperty("java.home");
-
- // the script requires the system JAVA_HOME, which points to the JDK not the JRE
- if (origJavaHome.indexOf(FS + "jre") != -1)
- {
- String JDK_HOME = origJavaHome.substring(0, origJavaHome.indexOf(FS + "jre"));
- System.setProperty("java.home", JDK_HOME);
- }
}
- protected void tearDown() throws Exception
- {
- // reset surefire's JAVA_HOME
- System.setProperty("java.home", origJavaHome);
- }
-
public void testWSConsumeFromCommandLine() throws Exception
{
// use absolute path for the output to be re-usable
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2593/JBWS2593TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2593/JBWS2593TestCase.java 2013-05-29 11:02:15 UTC (rev 17618)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2593/JBWS2593TestCase.java 2013-05-29 12:24:47 UTC (rev 17619)
@@ -48,30 +48,14 @@
private String JBOSS_HOME;
private String TEST_DIR;
- private String origJavaHome;
-
protected void setUp() throws Exception
{
super.setUp();
JBOSS_HOME = System.getProperty("jboss.home");
TEST_DIR = createResourceFile("..").getAbsolutePath();
- origJavaHome = System.getProperty("java.home");
-
- // the script requires the system JAVA_HOME, which points to the JDK not the JRE
- if (origJavaHome.indexOf(FS + "jre") != -1)
- {
- String JDK_HOME = origJavaHome.substring(0, origJavaHome.indexOf(FS + "jre"));
- System.setProperty("java.home", JDK_HOME);
- }
}
- protected void tearDown() throws Exception
- {
- // reset surefire's JAVA_HOME
- System.setProperty("java.home", origJavaHome);
- }
-
public void testRPC() throws Exception
{
this.internalTest(true);
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2013-05-29 11:02:15 UTC (rev 17618)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2013-05-29 12:24:47 UTC (rev 17619)
@@ -48,8 +48,6 @@
protected String CLASSES_DIR;
protected String TEST_DIR;
- protected String origJavaHome;
-
protected void setUp() throws Exception
{
super.setUp();
@@ -59,15 +57,6 @@
//JBWS-2479
ENDPOINT_CLASS = "org.jboss.test.ws.jaxws.smoke.tools.CalculatorBean";
TEST_DIR = createResourceFile("..").getAbsolutePath();
- origJavaHome = System.getProperty("java.home");
-
-
- // the script requires the system JAVA_HOME, which points to the JDK not the JRE
- if(origJavaHome.indexOf(FS + "jre")!=-1)
- {
- String JDK_HOME = origJavaHome.substring(0, origJavaHome.indexOf(FS + "jre"));
- System.setProperty("java.home", JDK_HOME);
- }
}
public void testScritpsAvailable()
@@ -77,10 +66,4 @@
assertTrue(new File(JBOSS_HOME + FS + "bin" + FS + "wsconsume" + ".sh").exists());
assertTrue(new File(JBOSS_HOME + FS + "bin" + FS + "wsconsume" + ".bat").exists());
}
-
- protected void tearDown() throws Exception
- {
- // reset surefire's JAVA_HOME
- System.setProperty("java.home", origJavaHome);
- }
}
11 years, 7 months
JBossWS SVN: r17618 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2013-05-29 07:02:15 -0400 (Wed, 29 May 2013)
New Revision: 17618
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
Log:
[JBWS-3645]:Register the WorkQueueManager in JMXServer when cxf management is enabled
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2013-05-29 08:26:47 UTC (rev 17617)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2013-05-29 11:02:15 UTC (rev 17618)
@@ -107,10 +107,9 @@
if (bus.getExtension(PolicyEngine.class) != null)
{
bus.getExtension(PolicyEngine.class).setAlternativeSelector(getAlternativeSelector(props));
- }
-
- setAdditionalWorkQueues(bus, props);
+ }
setCXFManagement(bus, props);
+ setAdditionalWorkQueues(bus, props);
setWSDiscovery(bus, props);
}
11 years, 7 months
JBossWS SVN: r17617 - stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-29 04:26:47 -0400 (Wed, 29 May 2013)
New Revision: 17617
Modified:
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java
Log:
Minor improvement
Modified: stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2013-05-29 08:02:50 UTC (rev 17616)
+++ stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2013-05-29 08:26:47 UTC (rev 17617)
@@ -74,11 +74,10 @@
static Process deployAppclient(final String archive, final OutputStream appclientOS, final String... appclientArgs) throws Exception
{
final AppclientProcess ap = newAppclientProcess(archive, appclientOS, appclientArgs);
- final String appclientEarName = getAppclientEarName(archive);
- final String appclientFullName = getAppclientFullName(archive);
- final String patternToMatch = "Deployed \"" + appclientEarName + "\"";
- final String errorMessage = "Cannot deploy " + appclientFullName + " to appclient";
- awaitOutput(ap.output, patternToMatch, errorMessage);
+ final String patternToMatch = "Deployed \"" + getAppclientEarName(archive) + "\"";
+ if (!awaitOutput(ap.output, patternToMatch)) {
+ throw new RuntimeException("Cannot deploy " + getAppclientFullName(archive) + " to appclient");
+ }
appclients.put(archive, ap);
return ap.process;
}
@@ -181,12 +180,11 @@
{
final File killFile = new File(getKillFileName(archive));
killFile.createNewFile();
- final String appclientFullName = getAppclientFullName(archive);
- final String patternToMatch = "stopped in";
- final String errorMessage = "Cannot undeploy " + appclientFullName + " from appclient";
try
{
- awaitOutput(os, patternToMatch, errorMessage);
+ if (!awaitOutput(os, "stopped in")) {
+ throw new RuntimeException("Cannot undeploy " + getAppclientFullName(archive) + " from appclient");
+ }
}
finally
{
@@ -197,17 +195,18 @@
}
}
- private static void awaitOutput(final OutputStream os, final String patternToMatch, final String errorMessage) throws InterruptedException {
+ private static boolean awaitOutput(final OutputStream os, final String patternToMatch) throws InterruptedException {
int countOfAttempts = 0;
final int maxCountOfAttempts = 240; // max wait time: 2 minutes
while (!os.toString().contains(patternToMatch))
- {
+ {
Thread.sleep(500);
if (countOfAttempts++ == maxCountOfAttempts)
{
- throw new RuntimeException(errorMessage);
+ return false;
}
}
+ return true;
}
private static String getKillFileName(final String archive)
11 years, 7 months
JBossWS SVN: r17616 - stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-29 04:02:50 -0400 (Wed, 29 May 2013)
New Revision: 17616
Modified:
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java
Log:
Prevent concorrency issue in AppclientHelper + increase frequence of appclient termination check a bit
Modified: stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2013-05-28 17:23:05 UTC (rev 17615)
+++ stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2013-05-29 08:02:50 UTC (rev 17616)
@@ -28,6 +28,7 @@
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
+import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
@@ -53,7 +54,7 @@
private static final String EXT = ":".equals(PS) ? ".sh" : ".bat";
private static final String appclientScript = JBOSS_HOME + FS + "bin" + FS + "appclient" + EXT;
private static final Semaphore s = new Semaphore(1, true); //one appclient only can be running at the same time ATM
- private static Map<String, AppclientProcess> appclients = new HashMap<String, AppclientProcess>(1);
+ private static Map<String, AppclientProcess> appclients = Collections.synchronizedMap(new HashMap<String, AppclientProcess>(2));
private static ExecutorService executors = Executors.newCachedThreadPool(AppclientDaemonFactory.INSTANCE);
private static String appclientOutputDir;
@@ -198,10 +199,10 @@
private static void awaitOutput(final OutputStream os, final String patternToMatch, final String errorMessage) throws InterruptedException {
int countOfAttempts = 0;
- final int maxCountOfAttempts = 120; // max wait time: 2 minutes
+ final int maxCountOfAttempts = 240; // max wait time: 2 minutes
while (!os.toString().contains(patternToMatch))
{
- Thread.sleep(1000);
+ Thread.sleep(500);
if (countOfAttempts++ == maxCountOfAttempts)
{
throw new RuntimeException(errorMessage);
11 years, 7 months
JBossWS SVN: r17615 - stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-28 13:23:05 -0400 (Tue, 28 May 2013)
New Revision: 17615
Modified:
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
Some concurrency fixes and perf improvements on test helper
Modified: stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2013-05-28 07:14:16 UTC (rev 17614)
+++ stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2013-05-28 17:23:05 UTC (rev 17615)
@@ -63,23 +63,37 @@
private static final String TEST_PASSWORD = "test.password";
private static final boolean DEPLOY_PROCESS_ENABLED = !Boolean.getBoolean("disable.test.archive.deployment");
private static final int AS_SERVER_CONN_RETRIEVAL_ATTEMPTS = Integer.getInteger(SYSPROP_AS_SERVER_CONN_RETRIEVAL_ATTEMPTS, 5);
- private static Deployer DEPLOYER;
+ private static final String testArchiveDir = System.getProperty(SYSPROP_TEST_ARCHIVE_DIRECTORY);
+ private static final String testResourcesDir = System.getProperty(SYSPROP_TEST_RESOURCES_DIRECTORY);
+ private static final String integrationTarget;
+ private static final String implInfo;
+
+ private static volatile Deployer deployer;
+ private static volatile MBeanServerConnection server;
+
+ static {
+ integrationTarget = System.getProperty(SYSPROP_JBOSSWS_INTEGRATION_TARGET);
+ if (integrationTarget == null)
+ throw new IllegalStateException("Cannot obtain system property: " + SYSPROP_JBOSSWS_INTEGRATION_TARGET);
+ Object obj = getImplementationObject();
+ implInfo = obj.getClass().getPackage().getName();
+ }
- private static MBeanServerConnection server;
- private static String integrationTarget;
- private static String implInfo;
- private static String testArchiveDir;
- private static String testResourcesDir;
-
- private static synchronized Deployer getDeployer()
+ private static Deployer getDeployer()
{
//lazy loading of deployer
- if (DEPLOYER == null)
+ if (deployer == null)
{
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- DEPLOYER = spiProvider.getSPI(Deployer.class);
+ synchronized (JBossWSTestHelper.class)
+ {
+ if (deployer == null)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ deployer = spiProvider.getSPI(Deployer.class);
+ }
+ }
}
- return DEPLOYER;
+ return deployer;
}
/** Deploy the given archive to the server
@@ -183,11 +197,6 @@
private static String getImplementationInfo()
{
- if (implInfo == null)
- {
- Object obj = getImplementationObject();
- implInfo = obj.getClass().getPackage().getName();
- }
return implInfo;
}
@@ -246,15 +255,21 @@
{
if (server == null)
{
- String integrationTarget = getIntegrationTarget();
- if (integrationTarget.startsWith("jboss7") || integrationTarget.startsWith("wildfly8") || integrationTarget.startsWith("jboss8"))
+ synchronized (JBossWSTestHelper.class)
{
- server = getAS7ServerConnection(integrationTarget);
+ if (server == null)
+ {
+ String integrationTarget = getIntegrationTarget();
+ if (integrationTarget.startsWith("jboss7") || integrationTarget.startsWith("wildfly8") || integrationTarget.startsWith("jboss8"))
+ {
+ server = getAS7ServerConnection(integrationTarget);
+ }
+ else
+ {
+ throw new IllegalStateException("Unsupported target container: " + integrationTarget);
+ }
+ }
}
- else
- {
- throw new IllegalStateException("Unsupported target container: " + integrationTarget);
- }
}
return server;
}
@@ -308,14 +323,6 @@
public static String getIntegrationTarget()
{
- if (integrationTarget == null)
- {
- integrationTarget = System.getProperty(SYSPROP_JBOSSWS_INTEGRATION_TARGET);
-
- if (integrationTarget == null)
- throw new IllegalStateException("Cannot obtain system property: " + SYSPROP_JBOSSWS_INTEGRATION_TARGET);
- }
-
return integrationTarget;
}
@@ -363,17 +370,11 @@
public static String getTestArchiveDir()
{
- if (testArchiveDir == null)
- testArchiveDir = System.getProperty(SYSPROP_TEST_ARCHIVE_DIRECTORY);
-
return testArchiveDir;
}
public static String getTestResourcesDir()
{
- if (testResourcesDir == null)
- testResourcesDir = System.getProperty(SYSPROP_TEST_RESOURCES_DIRECTORY);
-
return testResourcesDir;
}
11 years, 7 months
JBossWS SVN: r17614 - projects/wsi-bp-test/trunk.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2013-05-28 03:14:16 -0400 (Tue, 28 May 2013)
New Revision: 17614
Modified:
projects/wsi-bp-test/trunk/pom.xml
Log:
Add bp20-tests
Modified: projects/wsi-bp-test/trunk/pom.xml
===================================================================
--- projects/wsi-bp-test/trunk/pom.xml 2013-05-28 06:55:12 UTC (rev 17613)
+++ projects/wsi-bp-test/trunk/pom.xml 2013-05-28 07:14:16 UTC (rev 17614)
@@ -49,6 +49,7 @@
<!-- Modules -->
<modules>
<module>bp12-tests</module>
+ <module>bp20-tests</module>
<module>bsp12-tests</module>
</modules>
11 years, 7 months
JBossWS SVN: r17612 - in thirdparty/cxf/branches/cxf-2.2.12: rt/transports/http/src/main/java/org/apache/cxf/transport/http and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: klape
Date: 2013-05-27 20:12:53 -0400 (Mon, 27 May 2013)
New Revision: 17612
Modified:
thirdparty/cxf/branches/cxf-2.2.12/common/common/src/main/java/org/apache/cxf/common/WSDLConstants.java
thirdparty/cxf/branches/cxf-2.2.12/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPTransportFactory.java
Log:
[JBPAPP-10767] soap12:address doesn't appear in WSDL for SOAP 1.2 service
Modified: thirdparty/cxf/branches/cxf-2.2.12/common/common/src/main/java/org/apache/cxf/common/WSDLConstants.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/common/common/src/main/java/org/apache/cxf/common/WSDLConstants.java 2013-05-24 09:17:15 UTC (rev 17611)
+++ thirdparty/cxf/branches/cxf-2.2.12/common/common/src/main/java/org/apache/cxf/common/WSDLConstants.java 2013-05-28 00:12:53 UTC (rev 17612)
@@ -110,8 +110,9 @@
public static final int ERORR_STYLE_USE = -1;
public static final String NS_BINDING_XML = "http://cxf.apache.org/bindings/xformat";
+ public static final String XMLHTTP_BINDING = "http://schemas.xmlsoap.org/wsdl/http/";
public static final QName QNAME_XMLHTTP_BINDING_ADDRESS =
- new QName("http://schemas.xmlsoap.org/wsdl/http/", "address");
+ new QName(XMLHTTP_BINDING, "address");
public static final String ATTR_TRANSPORT = "transport";
public static final String ATTR_LOCATION = "location";
Modified: thirdparty/cxf/branches/cxf-2.2.12/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPTransportFactory.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPTransportFactory.java 2013-05-24 09:17:15 UTC (rev 17611)
+++ thirdparty/cxf/branches/cxf-2.2.12/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPTransportFactory.java 2013-05-28 00:12:53 UTC (rev 17612)
@@ -32,9 +32,10 @@
import javax.wsdl.Port;
import javax.wsdl.extensions.http.HTTPAddress;
import javax.wsdl.extensions.soap.SOAPAddress;
-import javax.xml.namespace.QName;
+import javax.wsdl.extensions.soap12.SOAP12Address;
import org.apache.cxf.Bus;
+import org.apache.cxf.common.WSDLConstants;
import org.apache.cxf.configuration.Configurer;
import org.apache.cxf.configuration.jsse.TLSClientParameters;
import org.apache.cxf.service.Service;
@@ -50,7 +51,6 @@
import org.apache.cxf.wsdl.http.AddressType;
import org.apache.cxf.wsdl11.WSDLEndpointFactory;
-
/**
* As a ConduitInitiator, this class sets up new HTTPConduits for particular
* endpoints.
@@ -180,8 +180,15 @@
if (extensor instanceof HTTPAddress) {
final HTTPAddress httpAdd = (HTTPAddress)extensor;
- EndpointInfo info = new HttpEndpointInfo(serviceInfo,
- "http://schemas.xmlsoap.org/wsdl/http/");
+ EndpointInfo info;
+ if (httpAdd instanceof Http12AddressType) {
+ info = new HttpEndpointInfo(serviceInfo,
+ WSDLConstants.NS_SOAP12);
+ } else {
+ info = new HttpEndpointInfo(serviceInfo,
+ WSDLConstants.NS_SOAP11);
+ }
+
info.setAddress(httpAdd.getLocationURI());
info.addExtensor(httpAdd);
return info;
@@ -190,7 +197,7 @@
EndpointInfo info =
new HttpEndpointInfo(serviceInfo,
- "http://schemas.xmlsoap.org/wsdl/http/");
+ WSDLConstants.XMLHTTP_BINDING);
info.setAddress(httpAdd.getLocation());
info.addExtensor(httpAdd);
return info;
@@ -198,8 +205,14 @@
}
}
HttpEndpointInfo hei = new HttpEndpointInfo(serviceInfo,
- "http://schemas.xmlsoap.org/wsdl/http/");
- AddressType at = new HttpAddressType();
+ WSDLConstants.XMLHTTP_BINDING);
+
+ AddressType at;
+ if (WSDLConstants.NS_SOAP12_HTTP_BINDING.equals(b.getBindingId())) {
+ at = new Http12AddressType();
+ } else {
+ at = new HttpAddressType();
+ }
hei.addExtensor(at);
return hei;
@@ -289,11 +302,19 @@
}
}
+ private static class Http12AddressType extends HttpAddressType
+ implements HTTPAddress, SOAP12Address {
+ public Http12AddressType() {
+ super();
+ setElementType(WSDLConstants.QNAME_SOAP12_BINDING_ADDRESS);
+ }
+ }
+
private static class HttpAddressType extends AddressType
implements HTTPAddress, SOAPAddress {
public HttpAddressType() {
super();
- setElementType(new QName("http://schemas.xmlsoap.org/wsdl/soap/", "address"));
+ setElementType(WSDLConstants.QNAME_SOAP_BINDING_ADDRESS);
}
public String getLocationURI() {
11 years, 7 months
JBossWS SVN: r17611 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-24 05:17:15 -0400 (Fri, 24 May 2013)
New Revision: 17611
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
Removing exclusion not needed anymore
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2013-05-24 09:04:33 UTC (rev 17610)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2013-05-24 09:17:15 UTC (rev 17611)
@@ -806,12 +806,6 @@
<groupId>org.wildfly</groupId>
<artifactId>wildfly-webservices-tests-integration</artifactId>
<version>${jboss.version}</version>
- <exclusions> <!-- Temp exclude while waiting for AS to be fixed -->
- <exclusion>
- <groupId>org.jboss.remoting3</groupId>
- <artifactId>jboss-remoting</artifactId>
- </exclusion>
- </exclusions>
</dependency>
</dependencies>
<build>
11 years, 7 months
JBossWS SVN: r17610 - stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-24 05:04:33 -0400 (Fri, 24 May 2013)
New Revision: 17610
Modified:
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTest.java
Log:
[JBWS-3639] Improving Jim's fix:
- make the timeout value configurable
- default to very high timeout value on Windows env only
Modified: stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTest.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2013-05-24 08:17:16 UTC (rev 17609)
+++ stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2013-05-24 09:04:33 UTC (rev 17610)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2013, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -61,6 +61,8 @@
public abstract class JBossWSTest extends TestCase
{
protected static Logger log = Logger.getLogger(JBossWSTest.class.getName());
+ public static final String SYSPROP_COPY_JOB_TIMEOUT = "test.copy.job.timeout";
+ private static final int COPY_JOB_TIMEOUT = Integer.getInteger(SYSPROP_COPY_JOB_TIMEOUT, File.pathSeparatorChar == ':' ? 5000 : 60000); //60s on Windows, 5s on UNIX and Mac
public JBossWSTest()
{
@@ -171,16 +173,14 @@
CopyJob inputStreamJob = new CopyJob(p.getInputStream(), os == null ? System.out : os);
CopyJob errorStreamJob = new CopyJob(p.getErrorStream(), System.err);
// unfortunately the following threads are needed because of Windows behavior
- System.out.println("Process input stream:");
- System.err.println("Process error stream:");
Thread inputJob = new Thread(inputStreamJob);
Thread outputJob = new Thread(errorStreamJob);
try
{
inputJob.start();
- inputJob.join(60000);
+ inputJob.join(COPY_JOB_TIMEOUT);
outputJob.start();
- outputJob.join(60000);
+ outputJob.join(COPY_JOB_TIMEOUT);
int statusCode = p.waitFor();
String fallbackMessage = "Process did exit with status " + statusCode;
assertTrue(message != null ? message : fallbackMessage, statusCode == 0);
11 years, 7 months
JBossWS SVN: r17609 - stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-24 04:17:16 -0400 (Fri, 24 May 2013)
New Revision: 17609
Modified:
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
[JBWS-3640] Improving Jim's fix:
- make the number of connection retrieval attempts configurable
- exit attempts loop as soon as the connection succeeds
- do not swallow MalformedURLExceptions
- fix code formatting
Modified: stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2013-05-23 09:47:43 UTC (rev 17608)
+++ stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2013-05-24 08:17:16 UTC (rev 17609)
@@ -58,9 +58,11 @@
private static final String SYSPROP_JBOSS_BIND_ADDRESS = "jboss.bind.address";
private static final String SYSPROP_TEST_ARCHIVE_DIRECTORY = "test.archive.directory";
private static final String SYSPROP_TEST_RESOURCES_DIRECTORY = "test.resources.directory";
+ private static final String SYSPROP_AS_SERVER_CONN_RETRIEVAL_ATTEMPTS = "test.as.server.connection.retrieval.attempts";
private static final String TEST_USERNAME = "test.username";
private static final String TEST_PASSWORD = "test.password";
private static final boolean DEPLOY_PROCESS_ENABLED = !Boolean.getBoolean("disable.test.archive.deployment");
+ private static final int AS_SERVER_CONN_RETRIEVAL_ATTEMPTS = Integer.getInteger(SYSPROP_AS_SERVER_CONN_RETRIEVAL_ATTEMPTS, 5);
private static Deployer DEPLOYER;
private static MBeanServerConnection server;
@@ -259,41 +261,49 @@
private static MBeanServerConnection getAS7ServerConnection(String integrationTarget)
{
- String host = getServerHost();
- String urlString = System.getProperty("jmx.service.url", "service:jmx:remoting-jmx://" + host + ":" + 9999);
- JMXServiceURL serviceURL = null;
- JMXConnector connector = null;
- try
- {
+ final String urlString = System.getProperty("jmx.service.url", "service:jmx:remoting-jmx://" + getServerHost() + ":" + 9999);
+ JMXServiceURL serviceURL = null;
+ JMXConnector connector = null;
+ try
+ {
serviceURL = new JMXServiceURL(urlString);
- }
- catch (MalformedURLException e1)
- {
- //NO_OP
- }
- //add more tries to get the connection. Workaround to fix some test failures caused by connection is not established in 5 seconds
- for (int i = 0 ; i < 5; i++) {
- try {
- connector = JMXConnectorFactory.connect(serviceURL, null);
- } catch (IOException ex) {
- throw new IllegalStateException("Cannot obtain MBeanServerConnection to: " + urlString, ex);
- } catch (RuntimeException e) {
- if (e.getMessage().contains("WAITING")) {
- continue;
- } else {
- throw e;
- }
- }
- }
-
- try
- {
+ }
+ catch (MalformedURLException e1)
+ {
+ throw new IllegalStateException(e1);
+ }
+ //add more tries to get the connection. Workaround to fix some test failures caused by connection is not established in 5 seconds
+ for (int i = 0; i < AS_SERVER_CONN_RETRIEVAL_ATTEMPTS && connector == null; i++)
+ {
+ try
+ {
+ connector = JMXConnectorFactory.connect(serviceURL, null);
+ }
+ catch (IOException ex)
+ {
+ throw new IllegalStateException("Cannot obtain MBeanServerConnection to: " + urlString, ex);
+ }
+ catch (RuntimeException e)
+ {
+ if (e.getMessage().contains("WAITING") && i < AS_SERVER_CONN_RETRIEVAL_ATTEMPTS - 1)
+ {
+ continue;
+ }
+ else
+ {
+ throw e;
+ }
+ }
+ }
+
+ try
+ {
return connector.getMBeanServerConnection();
- }
- catch (Exception e)
- {
- throw new IllegalStateException("Cannot obtain MBeanServerConnection to: " + urlString, e);
- }
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException("Cannot obtain MBeanServerConnection to: " + urlString, e);
+ }
}
public static String getIntegrationTarget()
11 years, 7 months