[jboss-cvs] JBossAS SVN: r69106 - in trunk/testsuite: imports/sections and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jan 18 06:36:38 EST 2008
Author: heiko.braun at jboss.com
Date: 2008-01-18 06:36:38 -0500 (Fri, 18 Jan 2008)
New Revision: 69106
Added:
trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/
trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/JBWS1124TestCase.java
trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/TestEndpoint.java
trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/TestEndpointImpl.java
trunk/testsuite/src/resources/webservice/jbws1124/
trunk/testsuite/src/resources/webservice/jbws1124/WEB-INF/
trunk/testsuite/src/resources/webservice/jbws1124/WEB-INF/test-resource.txt
trunk/testsuite/src/resources/webservice/jbws1124/WEB-INF/web.xml
Modified:
trunk/testsuite/build.xml
trunk/testsuite/imports/sections/webservice.xml
Log:
Created an example test case for JBAS-5151 and reopenend JBWS-1124
Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml 2008-01-18 10:01:00 UTC (rev 69105)
+++ trunk/testsuite/build.xml 2008-01-18 11:36:38 UTC (rev 69106)
@@ -286,6 +286,8 @@
<path id="tests.classpath">
<fileset dir="${jboss.dist}/client">
<include name="**/*.jar"/>
+ <exclude name="jaxws-rt.jar"/>
+ <exclude name="jaxws-tools.jar"/>
</fileset>
<pathelement path="${classpath}"/>
@@ -295,7 +297,7 @@
<path refid="jboss.ejb3.classpath"/>
<path refid="jboss.jmx.classpath"/>
<path refid="jboss.jmx-remoting.classpath"/>
- <path refid="jboss.test.classpath"/>
+ <path refid="jboss.test.classpath"/>
<path refid="thirdparty.classpath"/>
</path>
Modified: trunk/testsuite/imports/sections/webservice.xml
===================================================================
--- trunk/testsuite/imports/sections/webservice.xml 2008-01-18 10:01:00 UTC (rev 69105)
+++ trunk/testsuite/imports/sections/webservice.xml 2008-01-18 11:36:38 UTC (rev 69106)
@@ -72,6 +72,16 @@
<include name="wsdl/**"/>
</metainf>
</jar>
+
+ <!-- jbws-1124 -->
+ <war warfile="${build.lib}/jaxws-jbws1124.war" webxml="${build.resources}/webservice/jbws1124/WEB-INF/web.xml">
+ <classes dir="${build.classes}">
+ <include name="org/jboss/test/webservice/jbws1124/**/*.class"/>
+ </classes>
+ <webinf dir="${build.resources}/webservice/jbws1124/WEB-INF">
+ <include name="*.txt"/>
+ </webinf>
+ </war>
</target>
</project>
\ No newline at end of file
Added: trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/JBWS1124TestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/JBWS1124TestCase.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/JBWS1124TestCase.java 2008-01-18 11:36:38 UTC (rev 69106)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.webservice.jbws1124;
+
+import junit.framework.Test;
+import org.jboss.test.webservice.WebserviceTestBase;
+
+import javax.xml.ws.Service;
+import javax.xml.namespace.QName;
+import java.net.URL;
+
+/**
+ * Scoped class loading domains for WS endpoints
+ *
+ * http://jira.jboss.org/jira/browse/JBWS-1124
+ *
+ * @author Heiko.Braun at jboss.org
+ */
+public class JBWS1124TestCase extends WebserviceTestBase
+{
+
+ public JBWS1124TestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite() throws Exception
+ {
+ return getDeploySetup(JBWS1124TestCase.class, "jaxws-jbws1124.war");
+ }
+
+ public void testEndpoint() throws Exception
+ {
+ String targetAddress = "http://" + getServerHost() + ":8080/jaxws-jbws1124/TestEndpoint";
+
+ Service service = Service.create(
+ new URL(targetAddress+"?wsdl"),
+ new QName("http://jbws1124.webservice.test.jboss.org/", "TestEndpointImplService")
+ );
+
+ TestEndpoint port = service.getPort(TestEndpoint.class);
+ String resourceContent = port.getResourceString();
+ assertEquals("Some resource content", resourceContent);
+ }
+
+}
Property changes on: trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/JBWS1124TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/TestEndpoint.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/TestEndpoint.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/TestEndpoint.java 2008-01-18 11:36:38 UTC (rev 69106)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.webservice.jbws1124;
+
+import javax.jws.WebService;
+import java.rmi.RemoteException;
+
+/**
+ * @author Heiko.Braun at jboss.org
+ */
+ at WebService
+public interface TestEndpoint
+{
+
+ public String getResourceString() throws RemoteException;
+
+}
Property changes on: trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/TestEndpointImpl.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/TestEndpointImpl.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/TestEndpointImpl.java 2008-01-18 11:36:38 UTC (rev 69106)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.webservice.jbws1124;
+
+import org.jboss.logging.Logger;
+
+import javax.jws.WebService;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+/**
+ * @author Heiko.Braun at jboss.org
+ */
+ at WebService
+public class TestEndpointImpl implements TestEndpoint
+{
+ private Logger log = Logger.getLogger(TestEndpointImpl.class);
+
+
+ public String getResourceString()
+ {
+ try
+ {
+ ClassLoader loader = getClass().getClassLoader();
+ InputStream ins = loader.getResourceAsStream("WEB-INF/test-resource.txt");
+ if(null==ins) throw new IOException("Unable to load resource 'WEB-INF/test-resource.txt' through loader " + loader);
+ String line = new BufferedReader(new InputStreamReader(ins)).readLine();
+
+ log.info(line);
+
+ return line;
+ }
+ catch (IOException ex)
+ {
+ throw new RuntimeException(ex);
+ }
+ }
+
+}
Property changes on: trunk/testsuite/src/main/org/jboss/test/webservice/jbws1124/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/testsuite/src/resources/webservice/jbws1124/WEB-INF/test-resource.txt
===================================================================
--- trunk/testsuite/src/resources/webservice/jbws1124/WEB-INF/test-resource.txt (rev 0)
+++ trunk/testsuite/src/resources/webservice/jbws1124/WEB-INF/test-resource.txt 2008-01-18 11:36:38 UTC (rev 69106)
@@ -0,0 +1 @@
+Some resource content
Property changes on: trunk/testsuite/src/resources/webservice/jbws1124/WEB-INF/test-resource.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/testsuite/src/resources/webservice/jbws1124/WEB-INF/web.xml
===================================================================
--- trunk/testsuite/src/resources/webservice/jbws1124/WEB-INF/web.xml (rev 0)
+++ trunk/testsuite/src/resources/webservice/jbws1124/WEB-INF/web.xml 2008-01-18 11:36:38 UTC (rev 69106)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.webservice.jbws1124.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/TestEndpoint</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: trunk/testsuite/src/resources/webservice/jbws1124/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
More information about the jboss-cvs-commits
mailing list