Author: richard.opalka(a)jboss.com
Date: 2008-02-20 07:38:22 -0500 (Wed, 20 Feb 2008)
New Revision: 5750
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/ClientIface.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean1.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean2.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean3.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/JBWS1872TestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/LocalIface.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/RemoteIface.java
Modified:
stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
Log:
[JBWS-1872] test
Modified: stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-02-20 10:56:09 UTC (rev
5749)
+++ stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-02-20 12:38:22 UTC (rev
5750)
@@ -608,6 +608,15 @@
</metainf>
</jar>
+ <!-- jaxws-jbws1872 -->
+ <jar jarfile="${tests.output.dir}/libs/jaxws-jbws1872.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1872/*.class"/>
+ <exclude
name="org/jboss/test/ws/jaxws/jbws1872/*TestCase*.class"/>
+ <exclude
name="org/jboss/test/ws/jaxws/jbws1872/ClientIface.class"/>
+ </fileset>
+ </jar>
+
<!-- jaxws-jbws1904 -->
<jar destfile="${tests.output.dir}/libs/jaxws-jbws1904.jar">
<fileset dir="${tests.output.dir}/classes">
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/ClientIface.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/ClientIface.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/ClientIface.java 2008-02-20
12:38:22 UTC (rev 5750)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbws1872;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * Interface used on client side
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+@WebService
+public interface ClientIface
+{
+ @WebMethod
+ String echo(String msg);
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/ClientIface.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean1.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean1.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean1.java 2008-02-20
12:38:22 UTC (rev 5750)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbws1872;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+import javax.ejb.Local;
+import javax.ejb.Remote;
+
+/**
+ * EJB3 bean implementing both Local and Remote interfaces
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+@WebService(name = "Bean1", targetNamespace =
"http://org.jboss.ws/jbws1872")
+@Stateless
+(a)Remote(RemoteIface.class)
+(a)Local(LocalIface.class)
+public final class EJB3Bean1 implements RemoteIface, LocalIface
+{
+
+ @WebMethod
+ public String echo(String msg)
+ {
+ return "bean1-" + msg;
+ }
+
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean1.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean2.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean2.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean2.java 2008-02-20
12:38:22 UTC (rev 5750)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbws1872;
+
+import javax.ejb.Local;
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * EJB3 bean implementing local interface only
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+@WebService(name = "Bean2", targetNamespace =
"http://org.jboss.ws/jbws1872")
+@Stateless
+(a)Local(LocalIface.class)
+public final class EJB3Bean2 implements LocalIface
+{
+
+ @WebMethod
+ public String echo(String msg)
+ {
+ return "bean2-" + msg;
+ }
+
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean2.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean3.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean3.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean3.java 2008-02-20
12:38:22 UTC (rev 5750)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbws1872;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * EJB3 bean implementing remote interface only
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+@WebService(name = "Bean3", targetNamespace =
"http://org.jboss.ws/jbws1872")
+@Stateless
+(a)Remote(RemoteIface.class)
+public final class EJB3Bean3 implements RemoteIface
+{
+
+ @WebMethod
+ public String echo(String msg)
+ {
+ return "bean3-" + msg;
+ }
+
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/EJB3Bean3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/JBWS1872TestCase.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/JBWS1872TestCase.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/JBWS1872TestCase.java 2008-02-20
12:38:22 UTC (rev 5750)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbws1872;
+
+import java.net.URL;
+
+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-1872] EJB3 WebService implementation must have @Remote (instead of @Local)
Business interface
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public class JBWS1872TestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS1872TestCase.class,
"jaxws-jbws1872.jar");
+ }
+
+ public void testEJB1() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1872/EJB3Bean1?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jbws1872",
"EJB3Bean1Service");
+ Service service = Service.create(wsdlURL, serviceName);
+ ClientIface port = service.getPort(ClientIface.class);
+ String retStr = port.echo("hello");
+ assertEquals("bean1-hello", retStr);
+ }
+
+ public void testEJB2() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1872/EJB3Bean2?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jbws1872",
"EJB3Bean2Service");
+ Service service = Service.create(wsdlURL, serviceName);
+ ClientIface port = service.getPort(ClientIface.class);
+ String retStr = port.echo("hello");
+ assertEquals("bean2-hello", retStr);
+ }
+
+ public void testEJB3() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1872/EJB3Bean3?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jbws1872",
"EJB3Bean3Service");
+ Service service = Service.create(wsdlURL, serviceName);
+ ClientIface port = service.getPort(ClientIface.class);
+ String retStr = port.echo("hello");
+ assertEquals("bean3-hello", retStr);
+ }
+
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/JBWS1872TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/LocalIface.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/LocalIface.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/LocalIface.java 2008-02-20
12:38:22 UTC (rev 5750)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbws1872;
+
+/**
+ * EJB3 local interface
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface LocalIface
+{
+ String echo(String msg);
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/LocalIface.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/RemoteIface.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/RemoteIface.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/RemoteIface.java 2008-02-20
12:38:22 UTC (rev 5750)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbws1872;
+
+/**
+ * EJB3 remote interface
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public interface RemoteIface
+{
+ String echo(String msg);
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1872/RemoteIface.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF