Author: jim.ma
Date: 2009-10-11 23:02:36 -0400 (Sun, 11 Oct 2009)
New Revision: 10886
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/
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/AegisGroupQueryImpl.java
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/Member.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/WEB-INF/jbossws-cxf.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/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/resources/jaxws/cxf/descriptor/WEB-INF/jbossws-cxf.xml
Log:
[JBWS-2766]:jaxws aegis databinding test case
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-09
16:52:55 UTC (rev 10885)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2009-10-12
03:02:36 UTC (rev 10886)
@@ -22,6 +22,18 @@
<mkdir dir="${tests.output.dir}/test-libs"/>
+ <!-- jaxws-aegis -->
+ <war
+ 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"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/cxf/aegis/jaxws/WEB-INF/">
+ <include name="jbossws-cxf.xml"/>
+ </webinf>
+ </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">
<classes dir="${tests.output.dir}/test-classes">
Added:
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
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisGroupQuery.java 2009-10-12
03:02:36 UTC (rev 10886)
@@ -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.cxf.aegis;
+
+import java.util.Map;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+
+@WebService(name="AegisGroupQuery")
+public interface AegisGroupQuery
+{
+ @WebMethod
+ Map getMembers();
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisGroupQueryImpl.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisGroupQueryImpl.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisGroupQueryImpl.java 2009-10-12
03:02:36 UTC (rev 10886)
@@ -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;
+
+(a)WebService(endpointInterface="org.jboss.test.ws.jaxws.cxf.aegis.AegisGroupQuery")
+public class AegisGroupQueryImpl implements AegisGroupQuery
+{
+ 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;
+ }
+
+}
Added:
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
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/AegisTestCase.java 2009-10-12
03:02:36 UTC (rev 10886)
@@ -0,0 +1,61 @@
+/*
+ * 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.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() +
":9090/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
+ {
+ 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));
+ }
+
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/Member.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/Member.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/aegis/Member.java 2009-10-12
03:02:36 UTC (rev 10886)
@@ -0,0 +1,43 @@
+/*
+ * 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;
+
+public class Member
+{
+ private Integer id;
+ private String name;
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+ public Integer getId() {
+ return this.id;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getName() {
+ return this.name;
+ }
+
+
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/WEB-INF/jbossws-cxf.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/WEB-INF/jbossws-cxf.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/WEB-INF/jbossws-cxf.xml 2009-10-12
03:02:36 UTC (rev 10886)
@@ -0,0 +1,27 @@
+<beans
xmlns='http://www.springframework.org/schema/beans'
+
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:beans='http://www.springframework.org/schema/beans'
+
xmlns:jaxws='http://cxf.apache.org/jaxws'
+
xsi:schemaLocation='http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+
http://www.w3.org/2006/07/ws-policy http://www.w3.org/2006/07/ws-policy.xsd
+
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd'>
+
+ <bean id="aegisBean"
class="org.apache.cxf.aegis.databinding.AegisDatabinding"
+ scope="prototype" />
+
+ <bean id="aegis-service-factory"
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
+ scope="prototype">
+ <property name="dataBinding" ref="aegisBean" />
+ </bean>
+
+ <jaxws:endpoint id='AegisGroupQueryService'
+ address='http://@jboss.bind.address@:8080/jaxws-aegis'
+ implementor='org.jboss.test.ws.jaxws.cxf.aegis.AegisGroupQueryImpl'>
+ <jaxws:serviceFactory>
+ <ref bean='aegis-service-factory' />
+ </jaxws:serviceFactory>
+ <jaxws:invoker>
+ <bean class='org.jboss.wsf.stack.cxf.InvokerJSE' />
+ </jaxws:invoker>
+ </jaxws:endpoint>
+
+</beans>
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/WEB-INF/web.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/WEB-INF/web.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/aegis/jaxws/WEB-INF/web.xml 2009-10-12
03:02:36 UTC (rev 10886)
@@ -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>AegisGroupQueryService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.cxf.aegis.AegisGroupQueryImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>AegisGroupQueryService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/descriptor/WEB-INF/jbossws-cxf.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/descriptor/WEB-INF/jbossws-cxf.xml 2009-10-09
16:52:55 UTC (rev 10885)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/descriptor/WEB-INF/jbossws-cxf.xml 2009-10-12
03:02:36 UTC (rev 10886)
@@ -1,16 +1,30 @@
-<beans
xmlns='http://www.springframework.org/schema/beans'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:beans='http://www.springframework.org/schema/beans'
-
xmlns:jaxws='http://cxf.apache.org/jaxws'
-
xsi:schemaLocation='http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+<beans
xmlns='http://www.springframework.org/schema/beans'
+
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:beans='http://www.springframework.org/schema/beans'
+
xmlns:jaxws='http://cxf.apache.org/jaxws'
+
xsi:schemaLocation='http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.w3.org/2006/07/ws-policy http://www.w3.org/2006/07/ws-policy.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd'>
-
- <jaxws:endpoint id='TestService'
address='http://@jboss.bind.address@:8080/jaxws-cxf-descriptor'
-
implementor='org.jboss.test.ws.jaxws.cxf.descriptor.DescriptorEndpointImpl'>
-
- <jaxws:invoker>
- <bean class='org.jboss.wsf.stack.cxf.InvokerJSE'/>
- </jaxws:invoker>
-
- </jaxws:endpoint>
-
+
+ <bean id="aegisBean"
class="org.apache.cxf.aegis.databinding.AegisDatabinding"
+ scope="prototype" />
+
+ <bean id="aegis-service-factory"
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
+ scope="prototype">
+ <property name="dataBinding" ref="aegisBean" />
+ </bean>
+
+ <jaxws:endpoint id='TestService'
+ address='http://@jboss.bind.address@:8080/jaxws-cxf-descriptor'
+ implementor='org.jboss.test.ws.jaxws.cxf.descriptor.DescriptorEndpointImpl'>
+
+ <jaxws:serviceFactory>
+ <ref bean='jaxws-and-aegis-service-factory' />
+ </jaxws:serviceFactory>
+
+ <jaxws:invoker>
+ <bean class='org.jboss.wsf.stack.cxf.InvokerJSE' />
+ </jaxws:invoker>
+
+ </jaxws:endpoint>
+
</beans>