Author: jim.ma
Date: 2013-06-08 06:24:31 -0400 (Sat, 08 Jun 2013)
New Revision: 17666
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorld.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorldImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/META-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/META-INF/MANIFEST.MF
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/web.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3560]:Add fastinfoset feature test
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 2013-06-07
14:55:24 UTC (rev 17665)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2013-06-08
10:24:31 UTC (rev 17666)
@@ -203,6 +203,17 @@
<include
name="org/jboss/test/ws/jaxws/cxf/endpoint/HelloWorld*.class"/>
</classes>
</war>
+
+ <!-- jaxws-cxf-fastinfoset -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-fastinfoset.war"
webxml="${tests.output.dir}/test-resources/jaxws/cxf/fastinfoset/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorld*.class"/>
+ </classes>
+ <manifest>
+ <attribute name="Dependencies"
value="org.apache.cxf"/>
+ </manifest>
+ </war>
+
<!-- jaxws-cxf-gzip -->
<war warfile="${tests.output.dir}/test-libs/jaxws-cxf-gzip.war"
webxml="${tests.output.dir}/test-resources/jaxws/cxf/gzip/WEB-INF/web.xml">
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java 2013-06-08
10:24:31 UTC (rev 17666)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, 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.fastinfoset;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintWriter;
+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.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+public class FastInfosetTestCase extends JBossWSTest
+{
+ private String endpointURl = "http://" + getServerHost() +
":8080/jaxws-cxf-fastinfoset/HelloWorldService/HelloWorldImpl";
+
+
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(FastInfosetTestCase.class,
"jaxws-cxf-fastinfoset.war");
+ }
+
+
+ public void testInfoset() throws Exception
+ {
+ ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();
+ ByteArrayOutputStream in = new java.io.ByteArrayOutputStream();
+ LoggingInInterceptor login = new LoggingInInterceptor(new PrintWriter(in));
+ LoggingOutInterceptor logout = new LoggingOutInterceptor(new PrintWriter(out));
+ Bus bus = BusFactory.getThreadDefaultBus();
+ bus.getInInterceptors().add(login);
+ bus.getOutInterceptors().add(logout);
+
+ URL wsdlURL = new URL(endpointURl + "?wsdl");
+ QName serviceName = new
QName("http://org.jboss.ws/jaxws/cxf/fastinfoset",
"HelloWorldService");
+ Service service = Service.create(wsdlURL, serviceName);
+ QName portQName = new QName("http://org.jboss.ws/jaxws/cxf/fastinfoset",
"HelloWorldImplPort");
+ HelloWorld port = (HelloWorld) service.getPort(portQName, HelloWorld.class);
+
((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:9090/jaxws-cxf-fastinfoset/HelloWorldService/HelloWorldImpl");
+ assertEquals("helloworld" , port.echo("helloworld"));
+ assertTrue("request is expected fastinfoset", new
String(out.toByteArray()).indexOf("application/fastinfoset") > -1);
+ assertTrue("response is expected fastinfoset", new
String(in.toByteArray()).indexOf("application/fastinfoset") > -1);
+ out.close();
+ in.close();
+
+ }
+
+
+}
Property changes on:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorld.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorld.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorld.java 2013-06-08
10:24:31 UTC (rev 17666)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, 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.fastinfoset;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.FastInfoset;
+
+@WebService(targetNamespace = "http://org.jboss.ws/jaxws/cxf/fastinfoset")
+@FastInfoset(force = true)
+public interface HelloWorld
+{
+ String echo(String input);
+}
Property changes on:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorld.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorldImpl.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorldImpl.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorldImpl.java 2013-06-08
10:24:31 UTC (rev 17666)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, 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.fastinfoset;
+
+import javax.jws.WebService;
+
+import org.apache.cxf.annotations.FastInfoset;
+
+@WebService
+(
+ serviceName = "HelloWorldService",
+ endpointInterface = "org.jboss.test.ws.jaxws.cxf.fastinfoset.HelloWorld",
+ targetNamespace = "http://org.jboss.ws/jaxws/cxf/fastinfoset"
+)
+@FastInfoset(force = true)
+public class HelloWorldImpl implements HelloWorld
+{
+ public String echo(String input)
+ {
+ return input;
+ }
+}
Property changes on:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/HelloWorldImpl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/META-INF/MANIFEST.MF
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/META-INF/MANIFEST.MF
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/META-INF/MANIFEST.MF 2013-06-08
10:24:31 UTC (rev 17666)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Dependencies: org.apache.cxf.impl
\ No newline at end of file
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/web.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/web.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/web.xml 2013-06-08
10:24:31 UTC (rev 17666)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
+
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.cxf.fastinfoset.HelloWorldImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/HelloWorldService/HelloWorldImpl</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2013-06-07 14:55:24 UTC (rev 17665)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2013-06-08 10:24:31 UTC (rev 17666)
@@ -656,6 +656,9 @@
<!--# [AS7-537] Fixed on AS 8 or greater -->
<exclude>org/jboss/test/ws/jaxws/cxf/noIntegration/AS7537TestCase**</exclude>
+ <!--# [JBWS-3560] fastinfoset module is required in as712 -->
+
<exclude>org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase*</exclude>
+
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
</excludes>
@@ -720,6 +723,8 @@
<!--# [AS7-537] Fixed on AS 8 or greater -->
<exclude>org/jboss/test/ws/jaxws/cxf/noIntegration/AS7537TestCase**</exclude>
+ <!--# [JBWS-3560] fastinfoset module is required in as713 -->
+
<exclude>org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase*</exclude>
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
@@ -782,6 +787,9 @@
<!--# [AS7-537] Fixed on AS 8 or greater -->
<exclude>org/jboss/test/ws/jaxws/cxf/noIntegration/AS7537TestCase**</exclude>
+ <!--# [JBWS-3560] fastinfoset module is required in as720 -->
+
<exclude>org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase*</exclude>
+
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
</excludes>
@@ -841,6 +849,9 @@
<!-- # Tests migrated from JBossWS-Native specific testsuite which
are meant to pass with JBossWS-CXF too, but are still to be fixed -->
<exclude>org/jboss/test/ws/jaxws/jbws2978/**</exclude>
+ <!--# [JBWS-3560] fastinfoset module is required in wildfly800
-->
+
<exclude>org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase*</exclude>
+
<!-- # [JBWS-3620] Authentication failures w/ Undertow -->
<exclude>org/jboss/test/ws/jaxws/cxf/httpauth/HelloDigestTestCase*</exclude>