Author: richard.opalka(a)jboss.com
Date: 2010-01-04 04:45:29 -0500 (Mon, 04 Jan 2010)
New Revision: 11358
Removed:
framework/trunk/testsuite/test/resources/jaxws/samples/eardeployment/META-INF/
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
framework/trunk/testsuite/test/ant-import/build-samples-jaxws.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/exploded_ear_ejb3/Iteration1TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/packaged_ear_ejb3/Iteration1TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1872/JBWS1872TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/JBWS2630TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/SWARefTestCase.java
Log:
[JBWS-2838] fixing common test suite
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java 2010-01-04
09:42:48 UTC (rev 11357)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java 2010-01-04
09:45:29 UTC (rev 11358)
@@ -42,6 +42,7 @@
*/
public class URLPatternDeploymentAspect extends DeploymentAspect
{
+
@Override
public void start(Deployment dep)
{
@@ -86,7 +87,7 @@
if (urlPattern != null)
{
String contextRoot = dep.getService().getContextRoot();
-
+
if (urlPattern.startsWith("/") == false)
urlPattern = "/" + urlPattern;
@@ -98,7 +99,7 @@
}
}
- // #3 For EJB use @WebContext.urlPattern
+ // #3 For EJB use @WebContext.urlPattern
if (urlPattern == null)
{
Class beanClass = ep.getTargetBeanClass();
@@ -111,9 +112,9 @@
{
WebService webServiceAnnotation =
(WebService)beanClass.getAnnotation(WebService.class);
String name = webServiceAnnotation != null ? webServiceAnnotation.name() :
null;
- if (name.length() > 0)
+ if (name != null && name.length() > 0)
{
- urlPattern = name;
+ urlPattern = name;
}
else
{
@@ -121,7 +122,7 @@
urlPattern =
fullClassName.substring(fullClassName.lastIndexOf('.') + 1);
}
}
-
+
}
return urlPattern;
@@ -133,4 +134,5 @@
String urlPattern = ep.getShortName();
return urlPattern;
}
+
}
Modified: framework/trunk/testsuite/test/ant-import/build-samples-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-samples-jaxws.xml 2010-01-04 09:42:48
UTC (rev 11357)
+++ framework/trunk/testsuite/test/ant-import/build-samples-jaxws.xml 2010-01-04 09:45:29
UTC (rev 11358)
@@ -77,9 +77,6 @@
<include name="jaxws-samples-eardeployment.jar"/>
<include name="jaxws-samples-eardeployment.war"/>
</fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/eardeployment/META-INF">
- <include name="jboss-app.xml"/>
- </metainf>
</jar>
<!-- jaxws-samples-exception -->
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java 2010-01-04
09:42:48 UTC (rev 11357)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java 2010-01-04
09:45:29 UTC (rev 11358)
@@ -34,13 +34,14 @@
/**
* [JBWS-1665] incorrect wsdl generation
- *
+ *
*
http://jira.jboss.org/jira/browse/JBWS-1665
*/
public class JBWS1665TestCase extends JBossWSTest
{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-jbws1665/TrackingServiceBean";
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-jbws1665/TrackingService";
+
public static Test suite()
{
return new JBossWSTestSetup(JBWS1665TestCase.class,
"jaxws-jbws1665.jar");
@@ -53,4 +54,5 @@
Definition wsdlDefinition = wsdlReader.readWSDL(wsdlURL.toString());
assertNotNull(wsdlDefinition);
}
+
}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/exploded_ear_ejb3/Iteration1TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/exploded_ear_ejb3/Iteration1TestCase.java 2010-01-04
09:42:48 UTC (rev 11357)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/exploded_ear_ejb3/Iteration1TestCase.java 2010-01-04
09:45:29 UTC (rev 11358)
@@ -39,9 +39,9 @@
{
return new JBossWSTestSetup(Iteration1TestCase.class,
"jaxws-jbws1762-exploded.ear");
}
-
+
public String getWSDLLocation()
{
- return "jaxws-jbws1762-exploded-jaxws-jbws1762-exploded/EJB3Bean?wsdl";
+ return "jaxws-jbws1762-exploded/EJB3Bean?wsdl";
}
}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/packaged_ear_ejb3/Iteration1TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/packaged_ear_ejb3/Iteration1TestCase.java 2010-01-04
09:42:48 UTC (rev 11357)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/packaged_ear_ejb3/Iteration1TestCase.java 2010-01-04
09:45:29 UTC (rev 11358)
@@ -39,9 +39,9 @@
{
return new JBossWSTestSetup(Iteration1TestCase.class,
"jaxws-jbws1762-packaged.ear");
}
-
+
public String getWSDLLocation()
{
- return "jaxws-jbws1762-packaged-jaxws-jbws1762-packaged/EJB3Bean?wsdl";
+ return "jaxws-jbws1762-packaged/EJB3Bean?wsdl";
}
}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1872/JBWS1872TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1872/JBWS1872TestCase.java 2010-01-04
09:42:48 UTC (rev 11357)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1872/JBWS1872TestCase.java 2010-01-04
09:45:29 UTC (rev 11358)
@@ -45,7 +45,7 @@
public void testEJB1() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1872/EJB3Bean1?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1872/Bean1?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jbws1872",
"EJB3Bean1Service");
Service service = Service.create(wsdlURL, serviceName);
Client1 port = service.getPort(Client1.class);
@@ -55,7 +55,7 @@
public void testEJB2() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1872/EJB3Bean2?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1872/Bean2?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jbws1872",
"EJB3Bean2Service");
Service service = Service.create(wsdlURL, serviceName);
Client2 port = service.getPort(Client2.class);
@@ -65,7 +65,7 @@
public void testEJB3() throws Exception
{
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1872/EJB3Bean3?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1872/Bean3?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jbws1872",
"EJB3Bean3Service");
Service service = Service.create(wsdlURL, serviceName);
Client3 port = service.getPort(Client3.class);
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/JBWS2630TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/JBWS2630TestCase.java 2010-01-04
09:42:48 UTC (rev 11357)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/JBWS2630TestCase.java 2010-01-04
09:45:29 UTC (rev 11358)
@@ -40,30 +40,31 @@
/**
* [JBWS-2630]
- *
+ *
* Tests a valid endpoint address is shown in context servlet when
* deploying a jar file containing a war file with the endpoint.
- *
+ *
* @author alessio.soldano(a)jboss.com
* @since 05-Aug-2009
*/
public class JBWS2630TestCase extends JBossWSTest
{
- private String endpointAddress = "http://" + this.getServerHost() +
":8080/jaxws-jbws2630-jaxws-jbws2630-service/Endpoint";
+ private String endpointAddress = "http://" + this.getServerHost() +
":8080/jaxws-jbws2630-service/Endpoint";
+
public static Test suite()
{
return new JBossWSTestSetup(JBWS2630TestCase.class,
"jaxws-jbws2630.jar");
}
-
+
public void testJMXConsole() throws Exception
{
MBeanServerConnection server = getServer();
- ObjectName oname = new
ObjectName("jboss.ws:context=jaxws-jbws2630-jaxws-jbws2630-service,endpoint=Endpoint");
+ ObjectName oname = new
ObjectName("jboss.ws:context=jaxws-jbws2630-service,endpoint=Endpoint");
String address = (String)server.getAttribute(oname, "Address");
assertEquals(new URL(endpointAddress).getPath(), new URL(address).getPath());
}
-
+
public void testWSDL() throws Exception
{
URL wsdlURL = new URL(endpointAddress + "?wsdl");
@@ -71,7 +72,7 @@
assertNotNull("Unable to get WSDL", wsdl);
}
-
+
public void testEndpoint() throws Exception
{
URL url = new URL(endpointAddress + "?wsdl");
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java 2010-01-04
09:42:48 UTC (rev 11357)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/eardeployment/EarTestCase.java 2010-01-04
09:45:29 UTC (rev 11358)
@@ -52,7 +52,7 @@
public void testEJB3Endpoint() throws Exception
{
- String soapAddress = "http://" + getServerHost() +
":8080/earejb3/EJB3Bean";
+ String soapAddress = "http://" + getServerHost() +
":8080/earejb3/Endpoint";
QName serviceName = new QName("http://eardeployment.jaxws/",
"EndpointService");
Service service = Service.create(new URL(soapAddress + "?wsdl"),
serviceName);
Endpoint port = service.getPort(Endpoint.class);
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/SWARefTestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/SWARefTestCase.java 2010-01-04
09:42:48 UTC (rev 11357)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/SWARefTestCase.java 2010-01-04
09:45:29 UTC (rev 11358)
@@ -38,10 +38,11 @@
*/
public class SWARefTestCase extends JBossWSTest
{
- private String bareEndpointURL = "http://" + getServerHost() +
":8080/jaxws-swaref/BareEndpointImpl";
- private String wrappedEndpointURL = "http://" + getServerHost() +
":8080/jaxws-swaref/WrappedEndpointImpl";
- private String rpclitEndpointURL = "http://" + getServerHost() +
":8080/jaxws-swaref/RpcLitEndpointImpl";
+ private String bareEndpointURL = "http://" + getServerHost() +
":8080/jaxws-swaref/BareEndpoint";
+ private String wrappedEndpointURL = "http://" + getServerHost() +
":8080/jaxws-swaref/WrappedEndpoint";
+ private String rpclitEndpointURL = "http://" + getServerHost() +
":8080/jaxws-swaref/RpcLitEndpoint";
+
private QName bareServiceQName = new
QName("http://swaref.samples.jaxws.ws.test.jboss.org/",
"BareEndpointService");
private QName wrappedServiceQName = new
QName("http://swaref.samples.jaxws.ws.test.jboss.org/",
"WrappedEndpointService");
private QName rpcLitServiceQName = new
QName("http://swaref.samples.jaxws.ws.test.jboss.org/",
"RpcLitEndpointService");
@@ -52,7 +53,7 @@
{
return new JBossWSTestSetup(SWARefTestCase.class,
"jaxws-samples-swaref.jar");
}
-
+
public void testBeanAnnotationWithBare() throws Exception
{
Service service = Service.create(new URL(bareEndpointURL +"?wsdl"),
bareServiceQName);
@@ -60,7 +61,7 @@
DocumentPayload response = port.beanAnnotation(new DocumentPayload(data));
assertTrue(response.getData().getContent().equals("Server data"));
}
-
+
public void testBeanAnnotationWithWrapped() throws Exception
{
Service service = Service.create(new URL(wrappedEndpointURL+"?wsdl"),
wrappedServiceQName);
@@ -104,4 +105,5 @@
assertTrue(response.getData().get(0).getContent().equals("Server
data"));
}
+
}