Author: alessio.soldano(a)jboss.com
Date: 2009-09-30 11:31:15 -0400 (Wed, 30 Sep 2009)
New Revision: 10808
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/ClassA.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/Endpoint.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/EndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/JBWS2701TestCase.java
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-2701] Adding testcase
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-09-30 15:05:14 UTC
(rev 10807)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-09-30 15:31:15 UTC
(rev 10808)
@@ -830,6 +830,14 @@
<fileset
file="${tests.output.dir}/test-libs/jaxws-jbws2634-ejb3.jar"/>
<fileset
file="${tests.output.dir}/test-libs/jaxws-jbws2634-pojo.war"/>
</ear>
+
+ <!-- jaxws-jbws2701 -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2701.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2701/*.class"/>
+ <exclude
name="org/jboss/test/ws/jaxws/jbws2701/*TestCase.class"/>
+ </fileset>
+ </jar>
<!-- jaxws namespace -->
<war warfile="${tests.output.dir}/test-libs/jaxws-namespace.war"
webxml="${tests.output.dir}/test-resources/jaxws/namespace/WEB-INF/web.xml">
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/ClassA.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/ClassA.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/ClassA.java 2009-09-30
15:31:15 UTC (rev 10808)
@@ -0,0 +1,37 @@
+/*
+ * 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.jbws2701;
+
+public class ClassA
+{
+ private String s;
+
+ public String getS()
+ {
+ return s;
+ }
+
+ public void setS(String s)
+ {
+ this.s = s;
+ }
+}
Property changes on:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/ClassA.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/Endpoint.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/Endpoint.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/Endpoint.java 2009-09-30
15:31:15 UTC (rev 10808)
@@ -0,0 +1,45 @@
+/*
+ * 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.jbws2701;
+
+import java.rmi.Remote;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 30-Sep-2009
+ */
+@WebService(targetNamespace = "http://org.jboss/test/ws/jbws2701")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+(a)XmlSeeAlso(value={ClassA.class})
+public interface Endpoint extends Remote
+{
+
+ @WebMethod
+ public String echo(String s);
+
+}
Property changes on:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/Endpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/EndpointImpl.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/EndpointImpl.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/EndpointImpl.java 2009-09-30
15:31:15 UTC (rev 10808)
@@ -0,0 +1,40 @@
+/*
+ * 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.jbws2701;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+/**
+*
+* @author alessio.soldano(a)jboss.com
+* @since 30-Sep-2009
+*/
+@WebService(serviceName = "EndpointService", targetNamespace =
"http://org.jboss/test/ws/jbws2701", endpointInterface =
"org.jboss.test.ws.jaxws.jbws2701.Endpoint")
+@Stateless
+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/jbws2701/EndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/JBWS2701TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/JBWS2701TestCase.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2701/JBWS2701TestCase.java 2009-09-30
15:31:15 UTC (rev 10808)
@@ -0,0 +1,74 @@
+/*
+ * 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.jbws2701;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+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-2701] @XmlSeeAlso and generated wsdl
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 05-Aug-2009
+ */
+public class JBWS2701TestCase extends JBossWSTest
+{
+ private String endpointAddress = "http://" + this.getServerHost() +
":8080/jaxws-jbws2701/EndpointImpl";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2701TestCase.class,
"jaxws-jbws2701.jar");
+ }
+
+ public void testWSDL() throws Exception
+ {
+ URL url = new URL(endpointAddress + "?wsdl");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ String line = br.readLine();
+ StringBuilder sb = new StringBuilder();
+ while (line != null)
+ {
+ sb.append(line);
+ line = br.readLine();
+ }
+ assertTrue(sb.toString().contains("classA"));
+ }
+
+ public void testEndpoint() throws Exception
+ {
+ URL url = new URL(endpointAddress + "?wsdl");
+ QName serviceName = new QName("http://org.jboss/test/ws/jbws2701",
"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/jbws2701/JBWS2701TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF