Author: darran.lofthouse(a)jboss.com
Date: 2007-05-05 15:57:08 -0400 (Sat, 05 May 2007)
New Revision: 2972
Modified:
trunk/integration/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
Log:
Fix failing JBWS-1190 test cases.
Modified:
trunk/integration/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java
===================================================================
---
trunk/integration/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java 2007-05-05
19:26:51 UTC (rev 2971)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java 2007-05-05
19:57:08 UTC (rev 2972)
@@ -133,10 +133,10 @@
public int getWebServicePort()
{
- if (webServicePort == 0)
+ if (webServicePort <= 0)
webServicePort = getConnectorPort("HTTP/1.1", false);
- if (webServicePort == 0)
+ if (webServicePort <= 0)
{
log.warn("Unable to calculate 'WebServicePort', using default
'8080'");
webServicePort = 8080;
@@ -147,10 +147,10 @@
public int getWebServiceSecurePort()
{
- if (webServiceSecurePort == 0)
+ if (webServiceSecurePort <= 0)
webServiceSecurePort = getConnectorPort("HTTP/1.1", true);
- if (webServiceSecurePort == 0)
+ if (webServiceSecurePort <= 0)
{
log.warn("Unable to calculate 'WebServiceSecurePort', using default
'8443'");
webServiceSecurePort = 8443;
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java 2007-05-05
19:26:51 UTC (rev 2971)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java 2007-05-05
19:57:08 UTC (rev 2972)
@@ -80,8 +80,8 @@
assertEquals("No of endpoints", 1, endpoints.length);
String address = endpoints[0].getAddress();
- assertTrue("Expected Scheme '" + scheme + "'",
address.startsWith(scheme + "://"));
- assertTrue("Expected Port '" + port + "'",
address.indexOf(":" + port + "/") > -1);
+ assertTrue("Expected Scheme '" + scheme + "' from address
'" + address + "'", address.startsWith(scheme + "://"));
+ assertTrue("Expected Port '" + port + "' from address
'" + address + "'", address.indexOf(":" + port +
"/") > -1);
}
private void assertEquals(final String message, final int expected, final int actual)
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2007-05-05
19:26:51 UTC (rev 2971)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2007-05-05
19:57:08 UTC (rev 2972)
@@ -42,7 +42,7 @@
* @author darran.lofthouse(a)jboss.com
* @since 19-October-2006
*/
-@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jbws1190.TestEndpoint", targetNamespace =
"http://org.jboss/test/ws/jbws1190", name="Test")
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.jbws1190.TestEndpoint", targetNamespace =
"http://org.jboss/test/ws/jbws1190", name = "Test")
public class TestEndpointImpl implements TestEndpoint
{
@@ -66,7 +66,15 @@
}
});
- assertEquals("WSDL files found", 1, wsdls.length);
+ File wsdlFile = null;
+ for (int i = 0; i < wsdls.length; i++)
+ {
+ if (wsdlFile == null || wsdls[i].compareTo(wsdlFile) > 0)
+ {
+ wsdlFile = wsdls[i];
+ }
+ }
+ assertTrue("No WSDL files found", wsdlFile != null);
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
WSDLDefinitions wsdl;
@@ -86,8 +94,8 @@
assertEquals("No of endpoints", 1, endpoints.length);
String address = endpoints[0].getAddress();
- assertTrue("Expected Scheme '" + scheme + "'",
address.startsWith(scheme + "://"));
- assertTrue("Expected Port '" + port + "'",
address.contains(":" + port + "/"));
+ assertTrue("Expected Scheme '" + scheme + "' from address
'" + address + "'", address.startsWith(scheme + "://"));
+ assertTrue("Expected Port '" + port + "' from address
'" + address + "'", address.indexOf(":" + port +
"/") > -1);
}
private void assertEquals(final String message, final int expected, final int actual)
Show replies by date