Author: richard.opalka(a)jboss.com
Date: 2009-03-19 12:34:23 -0400 (Thu, 19 Mar 2009)
New Revision: 9634
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2486/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2486/JBWS2486.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2486/JBWS2486Impl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2486/JBWS2486TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2486/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2486/WEB-INF/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2486/WEB-INF/web.xml
Modified:
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
Log:
[JBWS-2486] providing test case
Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2009-03-19
16:19:02 UTC (rev 9633)
+++
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2009-03-19
16:34:23 UTC (rev 9634)
@@ -466,6 +466,14 @@
</fileset>
</jar>
+ <!-- jaxws-jbws2486 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2486.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws2486/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2486/*.class"/>
+ <exclude
name="org/jboss/test/ws/jaxws/jbws2486/*TestCase.class"/>
+ </classes>
+ </war>
+
<!-- jaxws-webserviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war"
webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2486/JBWS2486.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2486/JBWS2486.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2486/JBWS2486.java 2009-03-19
16:34:23 UTC (rev 9634)
@@ -0,0 +1,30 @@
+/*
+ * 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.ws.jaxws.jbws2486;
+
+import javax.jws.WebService;
+
+@WebService
+public interface JBWS2486
+{
+ String getServiceInstanceId();
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2486/JBWS2486Impl.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2486/JBWS2486Impl.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2486/JBWS2486Impl.java 2009-03-19
16:34:23 UTC (rev 9634)
@@ -0,0 +1,35 @@
+/*
+ * 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.ws.jaxws.jbws2486;
+
+import javax.jws.WebService;
+
+@WebService(serviceName = "JBWS2486Service", endpointInterface =
"org.jboss.test.ws.jaxws.jbws2486.JBWS2486")
+public class JBWS2486Impl implements JBWS2486
+{
+
+ public String getServiceInstanceId()
+ {
+ return "" + this;
+ }
+
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2486/JBWS2486TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2486/JBWS2486TestCase.java
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2486/JBWS2486TestCase.java 2009-03-19
16:34:23 UTC (rev 9634)
@@ -0,0 +1,71 @@
+/*
+ * 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.ws.jaxws.jbws2486;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2486] POJO service should be shared
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public class JBWS2486TestCase extends JBossWSTest
+{
+ private String targetNS = "http://jbws2486.jaxws.ws.test.jboss.org/";
+ private JBWS2486 proxy;
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2486TestCase.class,
"jaxws-jbws2486.war");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ QName serviceName = new QName(targetNS, "JBWS2486Service");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2486/JBWS2486Service?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ proxy = (JBWS2486)service.getPort(JBWS2486.class);
+ }
+
+ public void testIssue() throws Exception
+ {
+ String serviceInstanceId = proxy.getServiceInstanceId();
+ for (int i = 1; i <= 10; i++)
+ {
+ assertEquals(proxy.getServiceInstanceId(), serviceInstanceId);
+ }
+ }
+
+}
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2486/WEB-INF/web.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2486/WEB-INF/web.xml
(rev 0)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2486/WEB-INF/web.xml 2009-03-19
16:34:23 UTC (rev 9634)
@@ -0,0 +1,18 @@
+<?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>JBWS2486Service</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2486.JBWS2486Impl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>JBWS2486Service</servlet-name>
+ <url-pattern>/JBWS2486Service</url-pattern>
+ </servlet-mapping>
+
+</web-app>