Author: darran.lofthouse(a)jboss.com
Date: 2007-05-06 09:14:16 -0400 (Sun, 06 May 2007)
New Revision: 2982
Modified:
branches/jbossws-2.0/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
Log:
Fix JBWS1190 test case to just use the youngest WSDL.
Modified:
branches/jbossws-2.0/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
===================================================================
---
branches/jbossws-2.0/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2007-05-06
11:22:34 UTC (rev 2981)
+++
branches/jbossws-2.0/jbossws-tests/src/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2007-05-06
13:14:16 UTC (rev 2982)
@@ -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,13 +66,21 @@
}
});
- 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;
try
{
- wsdl = factory.parse(wsdls[0].toURL());
+ wsdl = factory.parse(wsdlFile.toURL());
}
catch (MalformedURLException e)
{
@@ -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