[jbossws-commits] JBossWS SVN: r10947 - in stack/cxf/trunk/modules/testsuite/cxf-tests: src/test/java/org/jboss/test/ws/jaxws/cxf/aegis and 3 other directories.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Sat Oct 17 00:03:31 EDT 2009
Author: jim.ma
Date: 2009-10-17 00:03:31 -0400 (Sat, 17 Oct 2009)
New Revision: 10947
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationGroupQuery.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationGroupQueryImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/annotation/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/annotation/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/annotation/WEB-INF/web.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisGroupQuery.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisTestCase.java
Log:
[JBWS-2766]:The testcase to demonstrate configure Aegis databinding via @DataBinding annotation
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2009-10-17 00:01:15 UTC (rev 10946)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2009-10-17 04:03:31 UTC (rev 10947)
@@ -27,12 +27,24 @@
warfile="${tests.output.dir}/test-libs/jaxws-aegis.war"
webxml="${tests.output.dir}/test-resources/jaxws/cxf/aegis/jaxws/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/cxf/aegis/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/aegis/AegisGroupQuery.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/aegis/AegisGroupQueryImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/aegis/Member.class"/>
</classes>
<webinf dir="${tests.output.dir}/test-resources/jaxws/cxf/aegis/jaxws/WEB-INF/">
<include name="jbossws-cxf.xml"/>
</webinf>
</war>
+
+ <war
+ warfile="${tests.output.dir}/test-libs/jaxws-aegis-annotation.war"
+ webxml="${tests.output.dir}/test-resources/jaxws/cxf/aegis/jaxws/annotation/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationGroupQuery.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationGroupQueryImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/aegis/Member.class"/>
+ </classes>
+ </war>
<!-- jaxws-cxf-descriptor -->
<war warfile="${tests.output.dir}/test-libs/jaxws-cxf-descriptor.war" webxml="${tests.output.dir}/test-resources/jaxws/cxf/descriptor/WEB-INF/web.xml">
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationGroupQuery.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationGroupQuery.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationGroupQuery.java 2009-10-17 04:03:31 UTC (rev 10947)
@@ -0,0 +1,38 @@
+/*
+ * 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.cxf.aegis;
+
+import java.util.Map;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
+import org.apache.cxf.annotations.DataBinding;
+
+ at WebService(name="AegisGroupQuery")
+ at DataBinding(AegisDatabinding.class)
+public interface AegisAnnotationGroupQuery
+{
+ @WebMethod
+ Map getMembers();
+}
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationGroupQueryImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationGroupQueryImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationGroupQueryImpl.java 2009-10-17 04:03:31 UTC (rev 10947)
@@ -0,0 +1,48 @@
+/*
+ * 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.cxf.aegis;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jws.WebService;
+
+ at WebService(endpointInterface="org.jboss.test.ws.jaxws.cxf.aegis.AegisAnnotationGroupQuery")
+public class AegisAnnotationGroupQueryImpl implements AegisAnnotationGroupQuery
+{
+ Map<Integer, Member> members = new HashMap<Integer, Member>();
+
+ public Map getMembers() {
+ Member member1 = new Member();
+ member1.setId(1);
+ member1.setName("Jane");
+
+ Member member2 = new Member();
+ member2.setId(2);
+ member2.setName("Mike");
+
+ members.put(member1.getId(), member1);
+ members.put(member2.getId(), member2);
+ return members;
+ }
+
+}
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisAnnotationTestCase.java 2009-10-17 04:03:31 UTC (rev 10947)
@@ -0,0 +1,54 @@
+/*
+ * 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.cxf.aegis;
+
+import java.util.Map;
+
+import junit.framework.Test;
+
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
+import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+public class AegisAnnotationTestCase extends JBossWSTest
+{
+ private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-aegis-annotation";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(AegisAnnotationTestCase.class, "jaxws-aegis-annotation.war");
+ }
+
+ public void testAccessAnnotation() throws Exception
+ {
+ ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
+ proxyFactory.setDataBinding(new AegisDatabinding());
+ proxyFactory.setServiceClass(AegisGroupQuery.class);
+ proxyFactory.setAddress(endpointURL);
+ AegisGroupQuery query = (AegisGroupQuery)proxyFactory.create();
+ Map<Integer, String> members = query.getMembers();
+ this.assertEquals(2, members.size());
+ this.assertEquals(true, members.containsKey(2));
+ }
+
+}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisGroupQuery.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisGroupQuery.java 2009-10-17 00:01:15 UTC (rev 10946)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisGroupQuery.java 2009-10-17 04:03:31 UTC (rev 10947)
@@ -24,7 +24,6 @@
import java.util.Map;
import javax.jws.WebMethod;
-import javax.jws.WebParam;
import javax.jws.WebService;
@WebService(name="AegisGroupQuery")
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisTestCase.java 2009-10-17 00:01:15 UTC (rev 10946)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisTestCase.java 2009-10-17 04:03:31 UTC (rev 10947)
@@ -21,32 +21,25 @@
*/
package org.jboss.test.ws.jaxws.cxf.aegis;
-import java.net.URL;
import java.util.Map;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
import junit.framework.Test;
import org.apache.cxf.aegis.databinding.AegisDatabinding;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
-import org.jboss.test.ws.jaxws.cxf.descriptor.DescriptorEndpoint;
-import org.jboss.test.ws.jaxws.cxf.descriptor.DescriptorJSETestCase;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
public class AegisTestCase extends JBossWSTest
{
private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-aegis";
- private String targetNS = "http://org.jboss.ws.jaxws.cxf/descriptor";
public static Test suite()
{
return new JBossWSTestSetup(AegisTestCase.class, "jaxws-aegis.war");
}
- public void testLegalAccess() throws Exception
+ public void testAccess() throws Exception
{
ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
proxyFactory.setDataBinding(new AegisDatabinding());
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/annotation/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/annotation/WEB-INF/web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/annotation/WEB-INF/web.xml 2009-10-17 04:03:31 UTC (rev 10947)
@@ -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>AegisAnnotationGroupQueryService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.cxf.aegis.AegisAnnotationGroupQueryImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>AegisAnnotationGroupQueryService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
More information about the jbossws-commits
mailing list