Author: alessio.soldano(a)jboss.com
Date: 2009-08-05 11:27:46 -0400 (Wed, 05 Aug 2009)
New Revision: 10493
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/Endpoint.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/EndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/JBWS2630TestCase.java
framework/trunk/testsuite/test/resources/jaxws/jbws2630/
framework/trunk/testsuite/test/resources/jaxws/jbws2630/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws2630/WEB-INF/web.xml
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-2630] Adding testcase
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-08-05 13:19:18 UTC
(rev 10492)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-08-05 15:27:46 UTC
(rev 10493)
@@ -760,6 +760,18 @@
<include name="*.xml"/>
</webinf>
</war>
+
+ <!-- jaxws-jbws2630 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2630-service.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws2630/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/jbws2630/Endpoint*.class"/>
+ </classes>
+ </war>
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2630.jar">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxws-jbws2630-service.war"/>
+ </fileset>
+ </jar>
<!-- jaxws-jbws2634 -->
<jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2634.jar">
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/Endpoint.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/Endpoint.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/Endpoint.java 2009-08-05
15:27:46 UTC (rev 10493)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ws.jaxws.jbws2630;
+
+import java.rmi.Remote;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 05-Aug-2009
+ */
+@WebService(targetNamespace = "http://org.jboss/test/ws/jbws2630")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface Endpoint extends Remote
+{
+
+ @WebMethod
+ public String echo(String s);
+
+}
Property changes on:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/Endpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/EndpointImpl.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/EndpointImpl.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/EndpointImpl.java 2009-08-05
15:27:46 UTC (rev 10493)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ws.jaxws.jbws2630;
+
+import javax.jws.WebService;
+
+/**
+*
+* @author alessio.soldano(a)jboss.com
+* @since 05-Aug-2009
+*/
+@WebService(serviceName = "EndpointService", targetNamespace =
"http://org.jboss/test/ws/jbws2630", endpointInterface =
"org.jboss.test.ws.jaxws.jbws2630.Endpoint")
+public class EndpointImpl implements Endpoint
+{
+ public String echo(String s)
+ {
+ return s;
+ }
+}
Property changes on:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/EndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
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
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/JBWS2630TestCase.java 2009-08-05
15:27:46 UTC (rev 10493)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ws.jaxws.jbws2630;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [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";
+
+ 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");
+ String address = (String)server.getAttribute(oname, "Address");
+ assertEquals(new URL(endpointAddress).getPath(), new URL(address).getPath());
+ }
+
+ public void testWSDL() throws Exception
+ {
+ URL url = new URL(endpointAddress + "?wsdl");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertTrue(br.readLine().contains("definition"));
+ }
+
+ public void testEndpoint() throws Exception
+ {
+ URL url = new URL(endpointAddress + "?wsdl");
+ QName serviceName = new QName("http://org.jboss/test/ws/jbws2630",
"EndpointService");
+ Service service = Service.create(url, serviceName);
+ Endpoint port = service.getPort(Endpoint.class);
+ String s = "Hi";
+ assertEquals(s, port.echo(s));
+ }
+}
Property changes on:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/JBWS2630TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2630/WEB-INF/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2630/WEB-INF/web.xml
(rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2630/WEB-INF/web.xml 2009-08-05
15:27:46 UTC (rev 10493)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4"
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">
+
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2630.EndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/Endpoint</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Property changes on:
framework/trunk/testsuite/test/resources/jaxws/jbws2630/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF