[13/22] cxf git commit: Fix UDP tests on my mac
Fix UDP tests on my mac Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/9499a9ab Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/9499a9ab Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/9499a9ab Branch: refs/heads/master-jaxrs-2.1 Commit: 9499a9ab9ed4aec9e8b58abf45e8a70d5801c585 Parents: 94e99ce Author: Daniel KulpAuthored: Tue Jun 7 13:52:42 2016 -0400 Committer: Daniel Kulp Committed: Tue Jun 7 13:56:54 2016 -0400 -- .../cxf/transport/udp/UDPTransportTest.java | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/9499a9ab/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java -- diff --git a/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java b/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java index fea6ce1..9c0052c 100644 --- a/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java +++ b/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java @@ -22,12 +22,13 @@ package org.apache.cxf.transport.udp; import java.net.NetworkInterface; import java.util.Enumeration; +import javax.jws.WebService; + import org.apache.cxf.endpoint.Server; import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; import org.apache.cxf.jaxws.JaxWsServerFactoryBean; import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase; import org.apache.hello_world.Greeter; -import org.apache.hello_world.GreeterImpl; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -40,6 +41,23 @@ public class UDPTransportTest extends AbstractBusClientServerTestBase { static final String PORT = allocatePort(UDPTransportTest.class); private static Server server; +@WebService(serviceName = "SOAPService", +endpointInterface = "org.apache.hello_world.Greeter", +targetNamespace = "http://apache.org/hello_world;) +static class GreeterImpl implements Greeter { +private String myName = "defaultGreeter"; +GreeterImpl() { +} +public String greetMe(String me) { +return "Hello " + me; +} +public String sayHi() { +return "Bonjour from " + myName; +} +public void pingMe() { +} +} + @BeforeClass public static void setUpBeforeClass() throws Exception { @@ -53,7 +71,9 @@ public class UDPTransportTest extends AbstractBusClientServerTestBase { @AfterClass public static void shutdown() throws Exception { -server.stop(); +if (server != null) { +server.stop(); +} } @Test
[03/22] cxf git commit: Syncing jaxrs sprong boot demo poms/descriptions with a jaxws demo
Syncing jaxrs sprong boot demo poms/descriptions with a jaxws demo Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/404c2565 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/404c2565 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/404c2565 Branch: refs/heads/master-jaxrs-2.1 Commit: 404c2565487eba17d24f13abbb8115a2b0fc445c Parents: cd57c46 Author: Sergey BeryozkinAuthored: Mon Jun 6 22:47:50 2016 +0100 Committer: Sergey Beryozkin Committed: Mon Jun 6 22:47:50 2016 +0100 -- .../samples/jax_rs/jaxrs_spring_boot/README | 13 .../samples/jax_rs/jaxrs_spring_boot/pom.xml| 21 ++-- .../jax_rs/jaxrs_spring_boot_scan/README| 13 .../jax_rs/jaxrs_spring_boot_scan/pom.xml | 21 ++-- 4 files changed, 64 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/404c2565/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/README -- diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/README b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/README index e46b561..5e1fbf1 100644 --- a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/README +++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/README @@ -26,3 +26,16 @@ To run the client from a command line open a new terminal window and run: $ mvn exec:java +Using Docker: +If you have Docker running on your machine (and appropriate DOCKER_HOST set), +you can run + + +$ mvn docker:build + + +to create the Docker image. Once created, you can start the container via: + + +docker run -p 8080:8080 -t org.apache.cxf.samples/spring-boot-sample-rs-cxf + http://git-wip-us.apache.org/repos/asf/cxf/blob/404c2565/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml index df96aed..bb82ad7 100644 --- a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml @@ -4,7 +4,7 @@ org.springframework.boot spring-boot-starter-parent -1.2.3.RELEASE +1.3.5.RELEASE spring-boot-sample-rs-cxf Spring Boot CXF REST Application @@ -32,7 +32,7 @@ io.swagger swagger-jaxrs -1.5.4 +1.5.8 javax.ws.rs @@ -63,6 +63,23 @@ sample.rs.client.SampleRestClientApplication + +com.spotify +docker-maven-plugin +0.4.9 + + ${project.groupId}/${project.artifactId} + frolvlad/alpine-oraclejdk8:slim + java -Djava.security.egd=file:/dev/./urandom -jar ${project.build.finalName}.jar + + + / + ${project.build.directory} + ${project.build.finalName}.jar + + + + http://git-wip-us.apache.org/repos/asf/cxf/blob/404c2565/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/README -- diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/README b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/README index e46b561..a61d608 100644 --- a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/README +++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/README @@ -26,3 +26,16 @@ To run the client from a command line open a new terminal window and run: $ mvn exec:java +Using Docker: +If you have Docker running on your machine (and appropriate DOCKER_HOST set), +you can run + + +$ mvn docker:build + + +to create the Docker image. Once created, you can start the container via: + + +docker run -p 8080:8080 -t org.apache.cxf.samples/spring-boot-sample-rs-cxf-scan + http://git-wip-us.apache.org/repos/asf/cxf/blob/404c2565/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml
[16/22] cxf git commit: CXF-5855: Introduce support for Server Sent Events. Initial implementation based on Atmosphere
http://git-wip-us.apache.org/repos/asf/cxf/blob/0bf3beb1/distribution/src/main/release/samples/pom.xml -- diff --git a/distribution/src/main/release/samples/pom.xml b/distribution/src/main/release/samples/pom.xml index d73a7d0..53f32d5 100644 --- a/distribution/src/main/release/samples/pom.xml +++ b/distribution/src/main/release/samples/pom.xml @@ -114,6 +114,8 @@ jax_rs/tracing_htrace clustering/failover_jaxws_osgi clustering/failover_server +jax_rs/sse +jax_rs/sse_tomcat + + +maven.java.net +java.net snapshots +https://maven.java.net/content/repositories/snapshots/ + +false + + +true + + + http://git-wip-us.apache.org/repos/asf/cxf/blob/0bf3beb1/rt/rs/pom.xml -- diff --git a/rt/rs/pom.xml b/rt/rs/pom.xml index a79671e..765330d 100644 --- a/rt/rs/pom.xml +++ b/rt/rs/pom.xml @@ -37,5 +37,6 @@ extensions/providers extensions/search security +sse http://git-wip-us.apache.org/repos/asf/cxf/blob/0bf3beb1/rt/rs/sse/pom.xml -- diff --git a/rt/rs/sse/pom.xml b/rt/rs/sse/pom.xml new file mode 100644 index 000..43e5c66 --- /dev/null +++ b/rt/rs/sse/pom.xml @@ -0,0 +1,70 @@ + + +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> +4.0.0 +cxf-rt-rs-sse +bundle +Apache CXF JAX-RS Server-Side Events Support +Apache CXF JAX-RS Server-Side Events Support +http://cxf.apache.org + +org.apache.cxf +cxf-parent +3.2.0-SNAPSHOT +../../../parent/pom.xml + + + +javax.servlet*;version="${cxf.osgi.javax.servlet.version}", + + + + +org.apache.cxf +cxf-rt-frontend-jaxrs +${project.version} + + +junit +junit +test + + +${cxf.servlet-api.group} +${cxf.servlet-api.artifact} +provided + + +org.atmosphere +atmosphere-runtime +${cxf.atmosphere.version} + + + + + +maven-checkstyle-plugin + +true + + + + + http://git-wip-us.apache.org/repos/asf/cxf/blob/0bf3beb1/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/OutboundSseEventBodyWriter.java -- diff --git a/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/OutboundSseEventBodyWriter.java b/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/OutboundSseEventBodyWriter.java new file mode 100644 index 000..4a9b3aa --- /dev/null +++ b/rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/OutboundSseEventBodyWriter.java @@ -0,0 +1,139 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.jaxrs.sse; + +import java.io.IOException; +import java.io.OutputStream; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.nio.charset.StandardCharsets; + +import javax.ws.rs.InternalServerErrorException; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.ext.MessageBodyWriter; +import javax.ws.rs.ext.Provider; +import javax.ws.rs.sse.OutboundSseEvent; + +import org.apache.cxf.jaxrs.provider.ServerProviderFactory; +import org.apache.cxf.message.Exchange; +import org.apache.cxf.message.Message; +import org.apache.cxf.message.MessageImpl; + +@Provider +public class OutboundSseEventBodyWriter implements MessageBodyWriter { +public static final String SERVER_SENT_EVENTS = "text/event-stream"; +public static final MediaType SERVER_SENT_EVENTS_TYPE =
[01/22] cxf git commit: Add docker plugin to experiment with creating a spring-boot docker image for the example [Forced Update!]
Repository: cxf Updated Branches: refs/heads/master-jaxrs-2.1 375c541b8 -> 0bf3beb12 (forced update) Add docker plugin to experiment with creating a spring-boot docker image for the example Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/540033d2 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/540033d2 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/540033d2 Branch: refs/heads/master-jaxrs-2.1 Commit: 540033d24dee4d02ec5ed8fc2b47faa28b4231e8 Parents: e0742cf Author: Daniel KulpAuthored: Mon Jun 6 15:10:43 2016 -0400 Committer: Daniel Kulp Committed: Mon Jun 6 15:12:54 2016 -0400 -- .../release/samples/jaxws_spring_boot/README| 15 +++ .../release/samples/jaxws_spring_boot/pom.xml | 20 2 files changed, 35 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/540033d2/distribution/src/main/release/samples/jaxws_spring_boot/README -- diff --git a/distribution/src/main/release/samples/jaxws_spring_boot/README b/distribution/src/main/release/samples/jaxws_spring_boot/README index 62b3a1a..1217e41 100644 --- a/distribution/src/main/release/samples/jaxws_spring_boot/README +++ b/distribution/src/main/release/samples/jaxws_spring_boot/README @@ -17,3 +17,18 @@ to run the client run in a new terminal window: $ mvn exec:java + + +Using Docker: +If you have Docker running on your machine (and appropriate DOCKER_HOST set), +you can run + + +$ mvn docker:build + + +to create the Docker image. Once created, you can start the container via: + + +docker run -p 8080:8080 -t org.apache.cxf.samples/spring-boot-sample-ws-cxf + http://git-wip-us.apache.org/repos/asf/cxf/blob/540033d2/distribution/src/main/release/samples/jaxws_spring_boot/pom.xml -- diff --git a/distribution/src/main/release/samples/jaxws_spring_boot/pom.xml b/distribution/src/main/release/samples/jaxws_spring_boot/pom.xml index 57e4210..cbc02fb 100644 --- a/distribution/src/main/release/samples/jaxws_spring_boot/pom.xml +++ b/distribution/src/main/release/samples/jaxws_spring_boot/pom.xml @@ -7,6 +7,8 @@ 1.3.5.RELEASE spring-boot-sample-ws-cxf +org.apache.cxf.samples +3.2.0-SNAPSHOT Spring Boot CXF Web Services Sample Spring Boot CXF Web Services Sample @@ -47,6 +49,24 @@ sample.ws.service.client.HelloClient + + +com.spotify +docker-maven-plugin +0.4.9 + + ${project.groupId}/${project.artifactId} +frolvlad/alpine-oraclejdk8:slim +java -Djava.security.egd=file:/dev/./urandom -jar ${project.build.finalName}.jar + + +/ +${project.build.directory} +${project.build.finalName}.jar + + + +
[14/22] cxf git commit: [CXF-6869] Adding rs-client dep to starter-jaxrs
[CXF-6869] Adding rs-client dep to starter-jaxrs Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a28ea6b2 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a28ea6b2 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a28ea6b2 Branch: refs/heads/master-jaxrs-2.1 Commit: a28ea6b29c095ed9627dafa05b3d0d6ef6c89be6 Parents: 9499a9a Author: Sergey BeryozkinAuthored: Tue Jun 7 21:52:39 2016 +0100 Committer: Sergey Beryozkin Committed: Tue Jun 7 21:52:39 2016 +0100 -- .../src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml | 5 - .../main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml | 5 - integration/spring-boot/starter-jaxrs/pom.xml | 5 + 3 files changed, 5 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/a28ea6b2/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml index 41a50bf..592e2f8 100644 --- a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml @@ -23,11 +23,6 @@ org.apache.cxf -cxf-rt-rs-client -${cxf.version} - - -org.apache.cxf cxf-rt-rs-service-description ${cxf.version} http://git-wip-us.apache.org/repos/asf/cxf/blob/a28ea6b2/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml index f8c3a14..c3210bc0 100644 --- a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml @@ -23,11 +23,6 @@ org.apache.cxf -cxf-rt-rs-client -${cxf.version} - - -org.apache.cxf cxf-rt-rs-service-description ${cxf.version} http://git-wip-us.apache.org/repos/asf/cxf/blob/a28ea6b2/integration/spring-boot/starter-jaxrs/pom.xml -- diff --git a/integration/spring-boot/starter-jaxrs/pom.xml b/integration/spring-boot/starter-jaxrs/pom.xml index 30d1e59..6902115 100644 --- a/integration/spring-boot/starter-jaxrs/pom.xml +++ b/integration/spring-boot/starter-jaxrs/pom.xml @@ -55,6 +55,11 @@ ${project.version} +org.apache.cxf +cxf-rt-rs-client +${project.version} + + javax.validation validation-api
[10/22] cxf git commit: Use a "keys" classifier for the jar containing the test keys. Make sure that is build in package phase for -Pfastinstall to work.
Use a "keys" classifier for the jar containing the test keys. Make sure that is build in package phase for -Pfastinstall to work. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e6d42f6d Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e6d42f6d Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e6d42f6d Branch: refs/heads/master-jaxrs-2.1 Commit: e6d42f6d6684feb46fc0bfbc0520ed13f0f002aa Parents: 1b9056c Author: Daniel KulpAuthored: Tue Jun 7 12:05:25 2016 -0400 Committer: Daniel Kulp Committed: Tue Jun 7 12:05:25 2016 -0400 -- services/sts/sts-core/pom.xml | 2 +- services/sts/systests/advanced/pom.xml | 2 +- services/sts/systests/basic/pom.xml| 2 +- services/xkms/xkms-client/pom.xml | 2 +- systests/jaxrs/pom.xml | 2 +- systests/kerberos/pom.xml | 2 +- systests/rs-security/pom.xml | 2 +- systests/transport-jms/pom.xml | 2 +- systests/transport-undertow/pom.xml| 2 +- systests/transports-ssl3/pom.xml | 2 +- systests/transports/pom.xml| 2 +- systests/ws-rm/pom.xml | 2 +- systests/ws-security-examples/pom.xml | 2 +- systests/ws-security/pom.xml | 2 +- testutils/pom.xml | 14 ++ 15 files changed, 28 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/e6d42f6d/services/sts/sts-core/pom.xml -- diff --git a/services/sts/sts-core/pom.xml b/services/sts/sts-core/pom.xml index 14bfdda..72d0917 100644 --- a/services/sts/sts-core/pom.xml +++ b/services/sts/sts-core/pom.xml @@ -145,7 +145,7 @@ cxf-testutils ${project.version} test -tests +keys http://git-wip-us.apache.org/repos/asf/cxf/blob/e6d42f6d/services/sts/systests/advanced/pom.xml -- diff --git a/services/sts/systests/advanced/pom.xml b/services/sts/systests/advanced/pom.xml index d7502dd..49800aa 100644 --- a/services/sts/systests/advanced/pom.xml +++ b/services/sts/systests/advanced/pom.xml @@ -95,7 +95,7 @@ cxf-testutils ${project.version} test -tests +keys org.bouncycastle http://git-wip-us.apache.org/repos/asf/cxf/blob/e6d42f6d/services/sts/systests/basic/pom.xml -- diff --git a/services/sts/systests/basic/pom.xml b/services/sts/systests/basic/pom.xml index 9acab84..6cf92bb 100644 --- a/services/sts/systests/basic/pom.xml +++ b/services/sts/systests/basic/pom.xml @@ -89,7 +89,7 @@ cxf-testutils ${project.version} test -tests +keys org.apache.cxf http://git-wip-us.apache.org/repos/asf/cxf/blob/e6d42f6d/services/xkms/xkms-client/pom.xml -- diff --git a/services/xkms/xkms-client/pom.xml b/services/xkms/xkms-client/pom.xml index 6d60ace..f338df2 100644 --- a/services/xkms/xkms-client/pom.xml +++ b/services/xkms/xkms-client/pom.xml @@ -106,7 +106,7 @@ cxf-testutils ${project.version} test -tests +keys org.slf4j http://git-wip-us.apache.org/repos/asf/cxf/blob/e6d42f6d/systests/jaxrs/pom.xml -- diff --git a/systests/jaxrs/pom.xml b/systests/jaxrs/pom.xml index d036dcd..3c2194c 100644 --- a/systests/jaxrs/pom.xml +++ b/systests/jaxrs/pom.xml @@ -305,7 +305,7 @@ cxf-testutils ${project.version} test -tests +keys org.apache.cxf http://git-wip-us.apache.org/repos/asf/cxf/blob/e6d42f6d/systests/kerberos/pom.xml -- diff --git a/systests/kerberos/pom.xml b/systests/kerberos/pom.xml index ceeab08..209d6d8 100644 --- a/systests/kerberos/pom.xml +++ b/systests/kerberos/pom.xml @@ -168,7 +168,7 @@ cxf-testutils ${project.version} test -tests +keys org.springframework http://git-wip-us.apache.org/repos/asf/cxf/blob/e6d42f6d/systests/rs-security/pom.xml -- diff --git a/systests/rs-security/pom.xml b/systests/rs-security/pom.xml index 823979e..72fb35b 100644 --- a/systests/rs-security/pom.xml
[15/22] cxf git commit: Renamed misspelled CxfUndertwoServlet to CxfUndertowServlet
Renamed misspelled CxfUndertwoServlet to CxfUndertowServlet Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1c3085ea Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1c3085ea Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1c3085ea Branch: refs/heads/master-jaxrs-2.1 Commit: 1c3085ea94a902e6bf4a49b50c121e778efd28c2 Parents: a28ea6b Author: retaAuthored: Tue Jun 7 21:46:11 2016 -0400 Committer: reta Committed: Tue Jun 7 21:46:11 2016 -0400 -- .../http_undertow/CxfUndertowServlet.java | 58 .../http_undertow/CxfUndertwoServlet.java | 58 .../http_undertow/UndertowHTTPServerEngine.java | 2 +- 3 files changed, 59 insertions(+), 59 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/1c3085ea/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertowServlet.java -- diff --git a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertowServlet.java b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertowServlet.java new file mode 100644 index 000..85a10c7 --- /dev/null +++ b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertowServlet.java @@ -0,0 +1,58 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.transport.http_undertow; + +import java.io.IOException; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.cxf.Bus; +import org.apache.cxf.transport.servlet.AbstractHTTPServlet; + +public class CxfUndertowServlet extends AbstractHTTPServlet { + +@Override +public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) +throws IOException, ServletException { + +} + +@Override +protected Bus getBus() { +return null; +} + +@Override +protected void invoke(HttpServletRequest request, HttpServletResponse response) throws ServletException { +UndertowHTTPDestination undertowHTTPDestination = + (UndertowHTTPDestination)request.getAttribute("UNDERTOW_DESTINATION"); +try { +undertowHTTPDestination.doService(request.getServletContext(), request, response); +} catch (IOException e) { +e.printStackTrace(); +throw new ServletException(e); +} +} + +} http://git-wip-us.apache.org/repos/asf/cxf/blob/1c3085ea/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertwoServlet.java -- diff --git a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertwoServlet.java b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertwoServlet.java deleted file mode 100644 index efb60d7..000 --- a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertwoServlet.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR
[17/22] cxf git commit: CXF-5855: Introduce support for Server Sent Events. Initial implementation based on Atmosphere
http://git-wip-us.apache.org/repos/asf/cxf/blob/0bf3beb1/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/resources/web-ui/javascripts/jquery-1.9.0.min.js -- diff --git a/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/resources/web-ui/javascripts/jquery-1.9.0.min.js b/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/resources/web-ui/javascripts/jquery-1.9.0.min.js new file mode 100644 index 000..50d1b22 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/resources/web-ui/javascripts/jquery-1.9.0.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */(function(e,t){"use strict";function n(e){var t=e.length,n=st.type(e);return st.isWindow(e)?!1:1===e.nodeType&?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&>0& in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&if(f&[f]&&(i||c[f].data)||!u||r!==t)return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.conc at(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++)delete r[t[i]];if(!(n?s:st.isEmptyObject)(r))return}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t))return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return st.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t))return st.filter(t,r,!n);t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}function y(e,t){if(1===t.nodeType&(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)st.event.add(t,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&[st.ex pando]){r=st._data(t);for(i in r.events)st.removeEvent(t,i,r.handle);t.removeAttribute(st.expando)}"script"===n&!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n));return n===t||n&(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var
[08/22] cxf git commit: Finishing keys refactor
http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml index 86df044..984c70b 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml @@ -81,10 +81,10 @@ - + - + @@ -93,10 +93,10 @@ https://localhost.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml index 0124abd..ce52ce5 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml @@ -72,10 +72,10 @@ https://localhost:.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml index f24227f..421c940 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml @@ -41,10 +41,10 @@ - + - + @@ -53,10 +53,10 @@ https://localhost.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml index 3e1a440..b906034 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml @@ -48,10 +48,10 @@ https://localhost:.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml index d8dce9a..5ca2ea2 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml @@ -51,10 +51,10 @@ https://localhost:.*;> - + - +
[21/22] cxf git commit: CXF-5855: Introduce support for Server Sent Events. Initial implementation based on Atmosphere
http://git-wip-us.apache.org/repos/asf/cxf/blob/0bf3beb1/distribution/src/main/release/samples/jax_rs/sse/src/main/resources/web-ui/javascripts/highcharts.js -- diff --git a/distribution/src/main/release/samples/jax_rs/sse/src/main/resources/web-ui/javascripts/highcharts.js b/distribution/src/main/release/samples/jax_rs/sse/src/main/resources/web-ui/javascripts/highcharts.js new file mode 100644 index 000..327d865 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse/src/main/resources/web-ui/javascripts/highcharts.js @@ -0,0 +1,270 @@ +/* + Highcharts JS v3.0.1 (2013-04-09) + + (c) 2009-2013 Torstein Hønsi + + License: www.highcharts.com/license +*/ +(function(){function v(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function y(){var a,b=arguments.length,c={},d=function(a,b){var c,h;for(h in b)b.hasOwnProperty(h)&&(c=b[h],typeof a!=="object"&&(a={}),a[h]=c& c==="object"&(c)!=="[object Array]"& c.nodeType!=="number"?d(a[h]||{},c):b[h]);return a};for(a=0;a3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+Q(a-c).toFixed(f).slice(2):"")}function ua(a,b){return Array((b||2)+1-String(a).length).join(0)+a}function Ea(a,b){for(var c="{",d=!1,e,f,g,h,i,j=[];(c=a.indexOf(c))!==-1;){e=a.slice(0,c);if(d){f=e.split(":");g=f.shift().split(".");i=g.length;e=b;for(h=0;h< +i;h++)e=e[g[h]];if(f.length)f=f.join(":"),g=/\.([0-9])/,h=N.lang,i=void 0,/f$/.test(f)?(i=(i=f.match(g))?i[1]:-1,e=Na(e,i,h.decimalPoint,f.indexOf(",")>-1?h.thousandsSep:"")):e=Ua(f,e)}j.push(e);a=a.slice(c+1);c=(d=!d)?"}":"{"}j.push(a);return j.join("")}function ib(a,b,c,d){var e,c=o(c,1);e=a/c;b||(b=[1,2,2.5,5,10],d&===!1&&(c===1?b=[1,2,5,10]:c<=0.1&&(b=[1/c])));for(d=0;d=E[jb]&& +(i.setMilliseconds(0),i.setSeconds(j>=E[Va]?0:k*T(i.getSeconds()/k)));if(j>=E[Va])i[Bb](j>=E[Oa]?0:k*T(i[kb]()/k));if(j>=E[Oa])i[Cb](j>=E[oa]?0:k*T(i[lb]()/k));if(j>=E[oa])i[mb](j>=E[Pa]?1:k*T(i[Qa]()/k));j>=E[Pa]&&(i[Db](j>=E[va]?0:k*T(i[Xa]()/k)),h=i[Ya]());j>=E[va]&&(h-=h%k,i[Eb](h));if(j===E[Wa])i[mb](i[Qa]()-i[nb]()+o(d,1));b=1;h=i[Ya]();for(var d=i.getTime(),m=i[Xa](),l=i[Qa](),i=g?0:(864E5+i.getTimezoneOffset()*6E4)%864E5;d c&&(c=a[b]);return c}function Ga(a, +b){for(var c in a)a[c]&[c]!==b&[c].destroy&[c].destroy(),delete a[c]}function Ra(a){$a||($a=U(wa));a&&$a.appendChild(a);$a.innerHTML=""}function qa(a,b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(b)throw c;else O.console&(c)}function ia(a){return
[04/22] cxf git commit: Adding groupId and version to jaxrs spring boot demos
Adding groupId and version to jaxrs spring boot demos Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/703acfd7 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/703acfd7 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/703acfd7 Branch: refs/heads/master-jaxrs-2.1 Commit: 703acfd72d0e6ce02b8d0813ceedb8a36fe06dc9 Parents: 404c256 Author: Sergey BeryozkinAuthored: Mon Jun 6 22:55:31 2016 +0100 Committer: Sergey Beryozkin Committed: Mon Jun 6 22:55:31 2016 +0100 -- .../src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml | 2 ++ .../src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml | 2 ++ 2 files changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/703acfd7/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml index bb82ad7..41a50bf 100644 --- a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml @@ -7,6 +7,8 @@ 1.3.5.RELEASE spring-boot-sample-rs-cxf +org.apache.cxf.samples +3.2.0-SNAPSHOT Spring Boot CXF REST Application Spring Boot CXF REST Application http://git-wip-us.apache.org/repos/asf/cxf/blob/703acfd7/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml index 4357528..f8c3a14 100644 --- a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml @@ -7,6 +7,8 @@ 1.3.5.RELEASE spring-boot-sample-rs-cxf-scan +org.apache.cxf.samples +3.2.0-SNAPSHOT Spring Boot CXF REST Scan Application Spring Boot CXF REST Scan Application
[09/22] cxf git commit: Finishing keys refactor
Finishing keys refactor Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1b9056ce Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1b9056ce Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1b9056ce Branch: refs/heads/master-jaxrs-2.1 Commit: 1b9056cebf8a2b5c5ff702b6df206c5d125433c9 Parents: 96eee75 Author: Colm O hEigeartaighAuthored: Tue Jun 7 13:47:57 2016 +0100 Committer: Colm O hEigeartaigh Committed: Tue Jun 7 13:48:10 2016 +0100 -- services/sts/sts-core/pom.xml | 7 +++ .../sts/claims/mapper/JexlIssueSamlClaimsTest.java | 2 +- .../apache/cxf/sts/operation/CancelSCTUnitTest.java | 2 +- .../cxf/sts/operation/IssueEncryptedUnitTest.java | 4 ++-- .../cxf/sts/operation/IssueJWTClaimsUnitTest.java | 2 +- .../sts/operation/IssueJWTOnbehalfofUnitTest.java | 2 +- .../cxf/sts/operation/IssueJWTRealmUnitTest.java| 2 +- .../apache/cxf/sts/operation/IssueJWTUnitTest.java | 2 +- .../cxf/sts/operation/IssueOnbehalfofUnitTest.java | 2 +- .../apache/cxf/sts/operation/IssueSCTUnitTest.java | 2 +- .../cxf/sts/operation/IssueSamlClaimsUnitTest.java | 2 +- .../cxf/sts/operation/IssueSamlRealmUnitTest.java | 2 +- .../apache/cxf/sts/operation/IssueSamlUnitTest.java | 4 ++-- .../apache/cxf/sts/operation/RenewSamlUnitTest.java | 2 +- .../operation/ValidateJWTTransformationTest.java| 2 +- .../cxf/sts/operation/ValidateJWTUnitTest.java | 2 +- .../cxf/sts/operation/ValidateSCTUnitTest.java | 2 +- .../cxf/sts/operation/ValidateSamlUnitTest.java | 2 +- .../ValidateTokenTransformationUnitTest.java| 2 +- .../operation/ValidateUsernameTokenUnitTest.java| 2 +- .../sts/operation/ValidateX509TokenUnitTest.java| 2 +- .../cxf/sts/request/RequestParserUnitTest.java | 2 +- .../cxf/sts/token/canceller/SCTCancellerTest.java | 2 +- .../cxf/sts/token/provider/JWTClaimsTest.java | 2 +- .../sts/token/provider/JWTProviderActAsTest.java| 2 +- .../sts/token/provider/JWTProviderLifetimeTest.java | 2 +- .../token/provider/JWTProviderOnBehalfOfTest.java | 2 +- .../token/provider/JWTTokenProviderRealmTest.java | 2 +- .../sts/token/provider/JWTTokenProviderTest.java| 4 ++-- .../cxf/sts/token/provider/SAMLClaimsTest.java | 2 +- .../sts/token/provider/SAMLProviderActAsTest.java | 2 +- .../sts/token/provider/SAMLProviderCustomTest.java | 2 +- .../sts/token/provider/SAMLProviderKeyTypeTest.java | 2 +- .../token/provider/SAMLProviderLifetimeTest.java| 2 +- .../token/provider/SAMLProviderOnBehalfOfTest.java | 2 +- .../sts/token/provider/SAMLProviderRealmTest.java | 2 +- .../cxf/sts/token/provider/SCTProviderTest.java | 2 +- .../token/renewer/SAMLTokenRenewerLifetimeTest.java | 2 +- .../sts/token/renewer/SAMLTokenRenewerPOPTest.java | 2 +- .../token/renewer/SAMLTokenRenewerRealmTest.java| 2 +- .../cxf/sts/token/renewer/SAMLTokenRenewerTest.java | 2 +- .../token/validator/JWTTokenValidatorRealmTest.java | 2 +- .../sts/token/validator/JWTTokenValidatorTest.java | 2 +- .../SAMLTokenValidatorCachedRealmTest.java | 2 +- .../validator/SAMLTokenValidatorRealmTest.java | 2 +- .../sts/token/validator/SAMLTokenValidatorTest.java | 2 +- .../cxf/sts/token/validator/SCTValidatorTest.java | 2 +- .../token/validator/UsernameTokenValidatorTest.java | 2 +- .../sts/token/validator/X509TokenValidatorTest.java | 2 +- .../sts/sts-core/src/test/resources/clientstore.jks | Bin 4559 -> 0 bytes .../sts-core/src/test/resources/servicestore.jks| Bin 3475 -> 0 bytes .../sts/sts-core/src/test/resources/stsstore.jks| Bin 4557 -> 0 bytes services/sts/systests/advanced/pom.xml | 7 +++ .../src/test/resources/clientKeystore.properties| 2 +- .../advanced/src/test/resources/clientstore.jks | Bin 4559 -> 0 bytes .../cxf/systest/sts/basic_auth/cxf-bad-client.xml | 2 +- .../cxf/systest/sts/basic_auth/cxf-client.xml | 2 +- .../cxf/systest/sts/basic_auth/cxf-service.xml | 6 +++--- .../cxf/systest/sts/basic_auth/stax-cxf-service.xml | 6 +++--- .../cxf/systest/sts/batch/cxf-client-unit.xml | 4 ++-- .../org/apache/cxf/systest/sts/batch/cxf-sts.xml| 4 ++-- .../apache/cxf/systest/sts/batch/stax-cxf-sts.xml | 4 ++-- .../systest/sts/binarysecuritytoken/cxf-service.xml | 4 ++-- .../sts/binarysecuritytoken/stax-cxf-service.xml| 4 ++-- .../cxf/systest/sts/caching/cxf-caching-service.xml | 8 .../apache/cxf/systest/sts/caching/cxf-client.xml | 4 ++-- .../apache/cxf/systest/sts/caching/cxf-service.xml | 8 .../cxf/systest/sts/claims/cxf-bad-client.xml | 4 ++--
[02/22] cxf git commit: [CXF-6933] Correctly processing docs with the same target, patch from Mike Golod applied with thanks, This closes #141
[CXF-6933] Correctly processing docs with the same target, patch from Mike Golod applied with thanks, This closes #141 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/cd57c465 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/cd57c465 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/cd57c465 Branch: refs/heads/master-jaxrs-2.1 Commit: cd57c465dd081c60e799e414871533400e8f466c Parents: 540033d Author: Sergey BeryozkinAuthored: Mon Jun 6 21:49:25 2016 +0100 Committer: Sergey Beryozkin Committed: Mon Jun 6 21:49:25 2016 +0100 -- .../java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/cd57c465/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java -- diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java index 14d323b..17b745f 100644 --- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java +++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java @@ -1743,6 +1743,7 @@ public class WadlGenerator implements ContainerRequestFilter { String category, boolean allowDefault, boolean isJson) { +boolean found = false; for (Annotation a : anns) { if (a.annotationType() == Descriptions.class) { Descriptions ds = (Descriptions)a; @@ -1781,10 +1782,10 @@ public class WadlGenerator implements ContainerRequestFilter { } } sb.append(""); -return true; +found = true; } } -return false; +return found; } private String getNamespace() {
[20/22] cxf git commit: CXF-5855: Introduce support for Server Sent Events. Initial implementation based on Atmosphere
http://git-wip-us.apache.org/repos/asf/cxf/blob/0bf3beb1/distribution/src/main/release/samples/jax_rs/sse/src/main/resources/web-ui/javascripts/jquery-1.9.0.min.js -- diff --git a/distribution/src/main/release/samples/jax_rs/sse/src/main/resources/web-ui/javascripts/jquery-1.9.0.min.js b/distribution/src/main/release/samples/jax_rs/sse/src/main/resources/web-ui/javascripts/jquery-1.9.0.min.js new file mode 100644 index 000..50d1b22 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse/src/main/resources/web-ui/javascripts/jquery-1.9.0.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */(function(e,t){"use strict";function n(e){var t=e.length,n=st.type(e);return st.isWindow(e)?!1:1===e.nodeType&?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&>0& in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&if(f&[f]&&(i||c[f].data)||!u||r!==t)return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.conc at(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++)delete r[t[i]];if(!(n?s:st.isEmptyObject)(r))return}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t))return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return st.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t))return st.filter(t,r,!n);t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}function y(e,t){if(1===t.nodeType&(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)st.event.add(t,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&[st.ex pando]){r=st._data(t);for(i in r.events)st.removeEvent(t,i,r.handle);t.removeAttribute(st.expando)}"script"===n&!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n));return n===t||n&(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var
[18/22] cxf git commit: CXF-5855: Introduce support for Server Sent Events. Initial implementation based on Atmosphere
http://git-wip-us.apache.org/repos/asf/cxf/blob/0bf3beb1/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/resources/web-ui/javascripts/highcharts.js -- diff --git a/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/resources/web-ui/javascripts/highcharts.js b/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/resources/web-ui/javascripts/highcharts.js new file mode 100644 index 000..327d865 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse_tomcat/src/main/resources/web-ui/javascripts/highcharts.js @@ -0,0 +1,270 @@ +/* + Highcharts JS v3.0.1 (2013-04-09) + + (c) 2009-2013 Torstein Hønsi + + License: www.highcharts.com/license +*/ +(function(){function v(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function y(){var a,b=arguments.length,c={},d=function(a,b){var c,h;for(h in b)b.hasOwnProperty(h)&&(c=b[h],typeof a!=="object"&&(a={}),a[h]=c& c==="object"&(c)!=="[object Array]"& c.nodeType!=="number"?d(a[h]||{},c):b[h]);return a};for(a=0;a3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+Q(a-c).toFixed(f).slice(2):"")}function ua(a,b){return Array((b||2)+1-String(a).length).join(0)+a}function Ea(a,b){for(var c="{",d=!1,e,f,g,h,i,j=[];(c=a.indexOf(c))!==-1;){e=a.slice(0,c);if(d){f=e.split(":");g=f.shift().split(".");i=g.length;e=b;for(h=0;h< +i;h++)e=e[g[h]];if(f.length)f=f.join(":"),g=/\.([0-9])/,h=N.lang,i=void 0,/f$/.test(f)?(i=(i=f.match(g))?i[1]:-1,e=Na(e,i,h.decimalPoint,f.indexOf(",")>-1?h.thousandsSep:"")):e=Ua(f,e)}j.push(e);a=a.slice(c+1);c=(d=!d)?"}":"{"}j.push(a);return j.join("")}function ib(a,b,c,d){var e,c=o(c,1);e=a/c;b||(b=[1,2,2.5,5,10],d&===!1&&(c===1?b=[1,2,5,10]:c<=0.1&&(b=[1/c])));for(d=0;d=E[jb]&& +(i.setMilliseconds(0),i.setSeconds(j>=E[Va]?0:k*T(i.getSeconds()/k)));if(j>=E[Va])i[Bb](j>=E[Oa]?0:k*T(i[kb]()/k));if(j>=E[Oa])i[Cb](j>=E[oa]?0:k*T(i[lb]()/k));if(j>=E[oa])i[mb](j>=E[Pa]?1:k*T(i[Qa]()/k));j>=E[Pa]&&(i[Db](j>=E[va]?0:k*T(i[Xa]()/k)),h=i[Ya]());j>=E[va]&&(h-=h%k,i[Eb](h));if(j===E[Wa])i[mb](i[Qa]()-i[nb]()+o(d,1));b=1;h=i[Ya]();for(var d=i.getTime(),m=i[Xa](),l=i[Qa](),i=g?0:(864E5+i.getTimezoneOffset()*6E4)%864E5;d c&&(c=a[b]);return c}function Ga(a, +b){for(var c in a)a[c]&[c]!==b&[c].destroy&[c].destroy(),delete a[c]}function Ra(a){$a||($a=U(wa));a&&$a.appendChild(a);$a.innerHTML=""}function qa(a,b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(b)throw c;else
[06/22] cxf git commit: [CXF-6863] WS-RM 3.x fix for retransmission works with attachments upon a network error
[CXF-6863] WS-RM 3.x fix for retransmission works with attachments upon a network error Change-Id: I92c59f572c31fe94e2fa6413304db9ec4b9f514c Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/96eee75e Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/96eee75e Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/96eee75e Branch: refs/heads/master-jaxrs-2.1 Commit: 96eee75e4d2ef481fabf2745e9e0ccba9e682d93 Parents: 574b2a9 Author: Kai RommelAuthored: Fri Jun 3 19:13:12 2016 +0200 Committer: Akitoshi Yoshida Committed: Tue Jun 7 14:21:08 2016 +0200 -- .../org/apache/cxf/io/CachedOutputStream.java | 17 +++- .../cxf/ws/rm/RMCaptureOutInterceptor.java | 10 .../cxf/ws/rm/soap/RetransmissionQueueImpl.java | 27 ++-- 3 files changed, 34 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/96eee75e/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java -- diff --git a/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java b/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java index 905f6f7..eeced83 100644 --- a/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java +++ b/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java @@ -258,14 +258,17 @@ public class CachedOutputStream extends OutputStream { } } else { // read the file -currentStream.close(); -if (copyOldContent) { -InputStream fin = createInputStream(tempFile); -IOUtils.copyAndCloseInput(fin, out); +try { +currentStream.close(); +if (copyOldContent) { +InputStream fin = createInputStream(tempFile); +IOUtils.copyAndCloseInput(fin, out); +} +} finally { +streamList.remove(currentStream); +deleteTempFile(); +inmem = true; } -streamList.remove(currentStream); -deleteTempFile(); -inmem = true; } } currentStream = out; http://git-wip-us.apache.org/repos/asf/cxf/blob/96eee75e/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java -- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java index 4514e03..b3c412d 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java @@ -21,6 +21,7 @@ package org.apache.cxf.ws.rm; import java.io.IOException; import java.io.InputStream; +import java.io.OutputStream; import java.util.Collection; import java.util.List; import java.util.Map; @@ -41,6 +42,7 @@ import org.apache.cxf.interceptor.AttachmentOutInterceptor; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.interceptor.LoggingOutInterceptor; import org.apache.cxf.io.CachedOutputStream; +import org.apache.cxf.io.WriteOnCloseOutputStream; import org.apache.cxf.message.Exchange; import org.apache.cxf.message.ExchangeImpl; import org.apache.cxf.message.FaultMode; @@ -200,6 +202,14 @@ public class RMCaptureOutInterceptor extends AbstractRMInterceptor { // capture message if retransmission possible if (isApplicationMessage && !isPartialResponse) { +OutputStream os = msg.getContent(OutputStream.class); +// We need to ensure that we have an output stream which won't start writing the +// message until connection is setup +if (!(os instanceof WriteOnCloseOutputStream)) { +WriteOnCloseOutputStream cached = new WriteOnCloseOutputStream(os); +msg.setContent(OutputStream.class, cached); +os = cached; +} getManager().initializeInterceptorChain(msg); //doneCaptureMessage(msg); captureMessage(msg); http://git-wip-us.apache.org/repos/asf/cxf/blob/96eee75e/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java -- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java index 5ae80dd..3181efe 100644 ---
[22/22] cxf git commit: CXF-5855: Introduce support for Server Sent Events. Initial implementation based on Atmosphere
CXF-5855: Introduce support for Server Sent Events. Initial implementation based on Atmosphere Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0bf3beb1 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0bf3beb1 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0bf3beb1 Branch: refs/heads/master-jaxrs-2.1 Commit: 0bf3beb1227dc8b4533d970269216bd7303f5032 Parents: 1c3085e Author: retaAuthored: Sun Apr 17 21:44:28 2016 -0400 Committer: reta Committed: Tue Jun 7 21:46:45 2016 -0400 -- .../main/release/samples/jax_rs/sse/README.txt | 35 +++ .../src/main/release/samples/jax_rs/sse/pom.xml | 143 ++ .../sse/src/main/java/demo/jaxrs/sse/Stats.java | 56 .../java/demo/jaxrs/sse/StatsApplication.java | 44 +++ .../demo/jaxrs/sse/StatsRestServiceImpl.java| 80 ++ .../main/java/demo/jaxrs/sse/StatsServer.java | 62 + .../src/main/resources/META-INF/atmosphere.xml | 6 + .../sse/src/main/resources/META-INF/beans.xml | 10 + .../META-INF/cxf/org.apache.cxf.Logger | 1 + .../sse/src/main/resources/log.properties | 3 + .../jax_rs/sse/src/main/resources/logback.xml | 16 ++ .../sse/src/main/resources/web-ui/index.html| 49 .../resources/web-ui/javascripts/highcharts.js | 270 +++ .../web-ui/javascripts/jquery-1.9.0.min.js | 4 + .../samples/jax_rs/sse_tomcat/README.txt| 35 +++ .../release/samples/jax_rs/sse_tomcat/pom.xml | 167 .../src/main/java/demo/jaxrs/sse/Stats.java | 56 .../java/demo/jaxrs/sse/StatsApplication.java | 44 +++ .../demo/jaxrs/sse/StatsRestServiceImpl.java| 80 ++ .../main/java/demo/jaxrs/sse/StatsServer.java | 71 + .../src/main/resources/META-INF/atmosphere.xml | 6 + .../src/main/resources/META-INF/beans.xml | 10 + .../src/main/resources/META-INF/context.xml | 6 + .../META-INF/cxf/org.apache.cxf.Logger | 1 + .../src/main/resources/log.properties | 3 + .../sse_tomcat/src/main/resources/logback.xml | 16 ++ .../src/main/resources/web-ui/index.html| 49 .../resources/web-ui/javascripts/highcharts.js | 270 +++ .../web-ui/javascripts/jquery-1.9.0.min.js | 4 + distribution/src/main/release/samples/pom.xml | 2 + parent/pom.xml | 17 +- rt/rs/pom.xml | 1 + rt/rs/sse/pom.xml | 70 + .../jaxrs/sse/OutboundSseEventBodyWriter.java | 139 ++ .../cxf/jaxrs/sse/OutboundSseEventImpl.java | 171 .../cxf/jaxrs/sse/SseBroadcasterImpl.java | 65 + .../cxf/jaxrs/sse/SseEventOutputProvider.java | 53 .../org/apache/cxf/jaxrs/sse/SseFeature.java| 41 +++ .../SseAtmosphereContextProvider.java | 57 .../SseAtmosphereEventOutputImpl.java | 111 .../atmosphere/SseAtmosphereInterceptor.java| 180 + .../SseAtmosphereInterceptorWriter.java | 30 +++ .../SseAtmosphereResourceContext.java | 60 + .../cxf/jaxrs/sse/servlet/CXFSseServlet.java| 41 +++ .../sci/SseServletContainerInitializer.java | 67 + 45 files changed, 2701 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/0bf3beb1/distribution/src/main/release/samples/jax_rs/sse/README.txt -- diff --git a/distribution/src/main/release/samples/jax_rs/sse/README.txt b/distribution/src/main/release/samples/jax_rs/sse/README.txt new file mode 100644 index 000..bc73a45 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/sse/README.txt @@ -0,0 +1,35 @@ +JAX-RS SSE Demo += + +This is a SSE version of JAX-RS Basic Demo. + +A SSE endpoint service is provided on URL http://localhost:8686/rest/api/stats/sse/{id} +where {id} is any integer value, f.e.: + + http://localhost:8686/rest/api/stats/sse/1 + +This sample includes a simple web UI using Highcharts JavaScript library to show off +randomly generated statistics about particular server, pushed to the client using +SSE JAX-RS endpoint. The UI is available at + + http://localhost:8686/static/ + +Under the hood, embedded Jetty 9 container is being used. + +Building and running the demo using maven +--- + +From the base directory of this sample (i.e., where this README file is +located), the maven pom.xml file can be used to build and run the demo. + +Using either UNIX or Windows: + + mvn install + mvn -Pserver + +To remove the target dir, run mvn clean". + +Connecting to the SSE stream +--- +
cxf git commit: Renamed misspelled CxfUndertwoServlet to CxfUndertowServlet
Repository: cxf Updated Branches: refs/heads/master a28ea6b29 -> 1c3085ea9 Renamed misspelled CxfUndertwoServlet to CxfUndertowServlet Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1c3085ea Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1c3085ea Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1c3085ea Branch: refs/heads/master Commit: 1c3085ea94a902e6bf4a49b50c121e778efd28c2 Parents: a28ea6b Author: retaAuthored: Tue Jun 7 21:46:11 2016 -0400 Committer: reta Committed: Tue Jun 7 21:46:11 2016 -0400 -- .../http_undertow/CxfUndertowServlet.java | 58 .../http_undertow/CxfUndertwoServlet.java | 58 .../http_undertow/UndertowHTTPServerEngine.java | 2 +- 3 files changed, 59 insertions(+), 59 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/1c3085ea/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertowServlet.java -- diff --git a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertowServlet.java b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertowServlet.java new file mode 100644 index 000..85a10c7 --- /dev/null +++ b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertowServlet.java @@ -0,0 +1,58 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.transport.http_undertow; + +import java.io.IOException; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.cxf.Bus; +import org.apache.cxf.transport.servlet.AbstractHTTPServlet; + +public class CxfUndertowServlet extends AbstractHTTPServlet { + +@Override +public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) +throws IOException, ServletException { + +} + +@Override +protected Bus getBus() { +return null; +} + +@Override +protected void invoke(HttpServletRequest request, HttpServletResponse response) throws ServletException { +UndertowHTTPDestination undertowHTTPDestination = + (UndertowHTTPDestination)request.getAttribute("UNDERTOW_DESTINATION"); +try { +undertowHTTPDestination.doService(request.getServletContext(), request, response); +} catch (IOException e) { +e.printStackTrace(); +throw new ServletException(e); +} +} + +} http://git-wip-us.apache.org/repos/asf/cxf/blob/1c3085ea/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertwoServlet.java -- diff --git a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertwoServlet.java b/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertwoServlet.java deleted file mode 100644 index efb60d7..000 --- a/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/CxfUndertwoServlet.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the
cxf git commit: [CXF-6869] Adding rs-client dep to starter-jaxrs
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes f7db188bb -> 27917f3ac [CXF-6869] Adding rs-client dep to starter-jaxrs Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/27917f3a Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/27917f3a Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/27917f3a Branch: refs/heads/3.1.x-fixes Commit: 27917f3accef78556fa7ed8e79f1746052bfd4d9 Parents: f7db188 Author: Sergey BeryozkinAuthored: Tue Jun 7 21:52:39 2016 +0100 Committer: Sergey Beryozkin Committed: Tue Jun 7 21:54:27 2016 +0100 -- .../src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml | 5 - .../main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml | 5 - integration/spring-boot/starter-jaxrs/pom.xml | 5 + 3 files changed, 5 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/27917f3a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml index 06586a9..ea8d8a7 100644 --- a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml @@ -23,11 +23,6 @@ org.apache.cxf -cxf-rt-rs-client -${cxf.version} - - -org.apache.cxf cxf-rt-rs-service-description ${cxf.version} http://git-wip-us.apache.org/repos/asf/cxf/blob/27917f3a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml index 654c127..931dedd 100644 --- a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml @@ -23,11 +23,6 @@ org.apache.cxf -cxf-rt-rs-client -${cxf.version} - - -org.apache.cxf cxf-rt-rs-service-description ${cxf.version} http://git-wip-us.apache.org/repos/asf/cxf/blob/27917f3a/integration/spring-boot/starter-jaxrs/pom.xml -- diff --git a/integration/spring-boot/starter-jaxrs/pom.xml b/integration/spring-boot/starter-jaxrs/pom.xml index eabdca0..198e41c 100644 --- a/integration/spring-boot/starter-jaxrs/pom.xml +++ b/integration/spring-boot/starter-jaxrs/pom.xml @@ -55,6 +55,11 @@ ${project.version} +org.apache.cxf +cxf-rt-rs-client +${project.version} + + javax.validation validation-api
cxf git commit: Fix UDP tests on my mac
Repository: cxf Updated Branches: refs/heads/master 94e99ce4a -> 9499a9ab9 Fix UDP tests on my mac Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/9499a9ab Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/9499a9ab Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/9499a9ab Branch: refs/heads/master Commit: 9499a9ab9ed4aec9e8b58abf45e8a70d5801c585 Parents: 94e99ce Author: Daniel KulpAuthored: Tue Jun 7 13:52:42 2016 -0400 Committer: Daniel Kulp Committed: Tue Jun 7 13:56:54 2016 -0400 -- .../cxf/transport/udp/UDPTransportTest.java | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/9499a9ab/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java -- diff --git a/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java b/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java index fea6ce1..9c0052c 100644 --- a/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java +++ b/rt/transports/udp/src/test/java/org/apache/cxf/transport/udp/UDPTransportTest.java @@ -22,12 +22,13 @@ package org.apache.cxf.transport.udp; import java.net.NetworkInterface; import java.util.Enumeration; +import javax.jws.WebService; + import org.apache.cxf.endpoint.Server; import org.apache.cxf.jaxws.JaxWsProxyFactoryBean; import org.apache.cxf.jaxws.JaxWsServerFactoryBean; import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase; import org.apache.hello_world.Greeter; -import org.apache.hello_world.GreeterImpl; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -40,6 +41,23 @@ public class UDPTransportTest extends AbstractBusClientServerTestBase { static final String PORT = allocatePort(UDPTransportTest.class); private static Server server; +@WebService(serviceName = "SOAPService", +endpointInterface = "org.apache.hello_world.Greeter", +targetNamespace = "http://apache.org/hello_world;) +static class GreeterImpl implements Greeter { +private String myName = "defaultGreeter"; +GreeterImpl() { +} +public String greetMe(String me) { +return "Hello " + me; +} +public String sayHi() { +return "Bonjour from " + myName; +} +public void pingMe() { +} +} + @BeforeClass public static void setUpBeforeClass() throws Exception { @@ -53,7 +71,9 @@ public class UDPTransportTest extends AbstractBusClientServerTestBase { @AfterClass public static void shutdown() throws Exception { -server.stop(); +if (server != null) { +server.stop(); +} } @Test
cxf git commit: Adding a test with multiple JAXRS proxy callbacks
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes c3bef354c -> f7db188bb Adding a test with multiple JAXRS proxy callbacks Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/f7db188b Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f7db188b Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f7db188b Branch: refs/heads/3.1.x-fixes Commit: f7db188bb0da238dac2e7714285d5ae3463d6428 Parents: c3bef35 Author: Sergey BeryozkinAuthored: Tue Jun 7 18:04:48 2016 +0100 Committer: Sergey Beryozkin Committed: Tue Jun 7 18:05:27 2016 +0100 -- .../cxf/systest/jaxrs/JAXRSAsyncClientTest.java | 38 1 file changed, 38 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/f7db188b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java -- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java index cd5580f..8713229 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java @@ -302,6 +302,44 @@ public class JAXRSAsyncClientTest extends AbstractBusClientServerTestBase { assertNotNull(holder.value); assertEquals(123L, holder.value.getId()); } +@Test +public void testAsyncProxyMultipleCallbacks() throws Exception { +String address = "http://localhost:; + PORT; +final Holder bookHolder = new Holder(); +final InvocationCallback bookCallback = new InvocationCallback() { +public void completed(Book response) { +bookHolder.value = response; +} +public void failed(Throwable error) { +} +}; +final Holder booleanHolder = new Holder(); +final InvocationCallback booleanCallback = new InvocationCallback() { +public void completed(Boolean response) { +booleanHolder.value = response; +} +public void failed(Throwable error) { +} +}; +List callbacks = new ArrayList (); +callbacks.add(bookCallback); +callbacks.add(booleanCallback); + +BookStore store = JAXRSClientFactory.create(address, BookStore.class); + WebClient.getConfig(store).getRequestContext().put(InvocationCallback.class.getName(), callbacks); + + + +Book book = store.getBookByMatrixParams("12", "3"); +assertNull(book); +Thread.sleep(3000); +assertNotNull(bookHolder.value); +assertEquals(123L, bookHolder.value.getId()); + +store.checkBook(123L); +Thread.sleep(3000); +assertTrue(booleanHolder.value); +} @SuppressWarnings({ "unchecked", "rawtypes"
cxf git commit: Adding a test with multiple JAXRS proxy callbacks
Repository: cxf Updated Branches: refs/heads/master 471f8851f -> 94e99ce4a Adding a test with multiple JAXRS proxy callbacks Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/94e99ce4 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/94e99ce4 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/94e99ce4 Branch: refs/heads/master Commit: 94e99ce4ae6e6fb31790c2fb84b3541268fde62f Parents: 471f885 Author: Sergey BeryozkinAuthored: Tue Jun 7 18:04:48 2016 +0100 Committer: Sergey Beryozkin Committed: Tue Jun 7 18:04:48 2016 +0100 -- .../cxf/systest/jaxrs/JAXRSAsyncClientTest.java | 38 1 file changed, 38 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/94e99ce4/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java -- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java index cd5580f..8713229 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java @@ -302,6 +302,44 @@ public class JAXRSAsyncClientTest extends AbstractBusClientServerTestBase { assertNotNull(holder.value); assertEquals(123L, holder.value.getId()); } +@Test +public void testAsyncProxyMultipleCallbacks() throws Exception { +String address = "http://localhost:; + PORT; +final Holder bookHolder = new Holder(); +final InvocationCallback bookCallback = new InvocationCallback() { +public void completed(Book response) { +bookHolder.value = response; +} +public void failed(Throwable error) { +} +}; +final Holder booleanHolder = new Holder(); +final InvocationCallback booleanCallback = new InvocationCallback() { +public void completed(Boolean response) { +booleanHolder.value = response; +} +public void failed(Throwable error) { +} +}; +List callbacks = new ArrayList (); +callbacks.add(bookCallback); +callbacks.add(booleanCallback); + +BookStore store = JAXRSClientFactory.create(address, BookStore.class); + WebClient.getConfig(store).getRequestContext().put(InvocationCallback.class.getName(), callbacks); + + + +Book book = store.getBookByMatrixParams("12", "3"); +assertNull(book); +Thread.sleep(3000); +assertNotNull(bookHolder.value); +assertEquals(123L, bookHolder.value.getId()); + +store.checkBook(123L); +Thread.sleep(3000); +assertTrue(booleanHolder.value); +} @SuppressWarnings({ "unchecked", "rawtypes"
cxf git commit: Prototyping the JAX-RS proxy async support
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes dbe659d16 -> c3bef354c Prototyping the JAX-RS proxy async support Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c3bef354 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c3bef354 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c3bef354 Branch: refs/heads/3.1.x-fixes Commit: c3bef354ca5cd17e3bc545e03f7c01ac64969867 Parents: dbe659d Author: Sergey BeryozkinAuthored: Tue Jun 7 17:42:07 2016 +0100 Committer: Sergey Beryozkin Committed: Tue Jun 7 17:43:02 2016 +0100 -- .../apache/cxf/common/util/PrimitiveUtils.java | 18 +++ .../apache/cxf/jaxrs/client/AbstractClient.java | 100 +- .../cxf/jaxrs/client/ClientProxyImpl.java | 86 +++- .../org/apache/cxf/jaxrs/client/WebClient.java | 133 +++ .../cxf/systest/jaxrs/JAXRSAsyncClientTest.java | 40 ++ 5 files changed, 264 insertions(+), 113 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/c3bef354/core/src/main/java/org/apache/cxf/common/util/PrimitiveUtils.java -- diff --git a/core/src/main/java/org/apache/cxf/common/util/PrimitiveUtils.java b/core/src/main/java/org/apache/cxf/common/util/PrimitiveUtils.java index c641b50..16408d8 100644 --- a/core/src/main/java/org/apache/cxf/common/util/PrimitiveUtils.java +++ b/core/src/main/java/org/apache/cxf/common/util/PrimitiveUtils.java @@ -19,12 +19,30 @@ package org.apache.cxf.common.util; +import java.util.HashMap; +import java.util.Map; + public final class PrimitiveUtils { +private static final Map AUTOBOXED_PRIMITIVES_MAP; +static { +AUTOBOXED_PRIMITIVES_MAP = new HashMap (); +AUTOBOXED_PRIMITIVES_MAP.put(byte.class, Byte.class); +AUTOBOXED_PRIMITIVES_MAP.put(short.class, Short.class); +AUTOBOXED_PRIMITIVES_MAP.put(int.class, Integer.class); +AUTOBOXED_PRIMITIVES_MAP.put(long.class, Long.class); +AUTOBOXED_PRIMITIVES_MAP.put(float.class, Float.class); +AUTOBOXED_PRIMITIVES_MAP.put(double.class, Double.class); +AUTOBOXED_PRIMITIVES_MAP.put(boolean.class, Boolean.class); +} private PrimitiveUtils() { } +public static boolean canPrimitiveTypeBeAutoboxed(Class primitiveClass, Class type) { +return primitiveClass.isPrimitive() && type == AUTOBOXED_PRIMITIVES_MAP.get(primitiveClass); +} + public static Class getClass(String value) { Class clz = null; if ("int".equals(value)) { http://git-wip-us.apache.org/repos/asf/cxf/blob/c3bef354/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java -- diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java index d98c34d..f9d9aec 100644 --- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java +++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java @@ -24,7 +24,9 @@ import java.io.InputStream; import java.io.OutputStream; import java.lang.annotation.Annotation; import java.lang.reflect.Constructor; +import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; import java.net.HttpURLConnection; import java.net.URI; import java.text.SimpleDateFormat; @@ -43,6 +45,7 @@ import java.util.logging.Logger; import javax.ws.rs.ProcessingException; import javax.ws.rs.WebApplicationException; +import javax.ws.rs.client.InvocationCallback; import javax.ws.rs.core.Cookie; import javax.ws.rs.core.EntityTag; import javax.ws.rs.core.Form; @@ -1014,7 +1017,7 @@ public abstract class AbstractClient implements Client { = CastUtils.cast((Map)outMessage.get(Message.INVOCATION_CONTEXT)); return CastUtils.cast((Map)invContext.get(REQUEST_CONTEXT)); } - + protected List getContentsList(Object body) { return body == null ? new MessageContentsList() : new MessageContentsList(body); } @@ -1067,6 +1070,50 @@ public abstract class AbstractClient implements Client { outMessage.getExchange().put("org.apache.cxf.resource.operation.name", name); } +protected static Type getCallbackType(InvocationCallback callback) { +Class cls = callback.getClass(); +ParameterizedType pt = findCallbackType(cls); +Type actualType = null; +for (Type tp : pt.getActualTypeArguments()) { +actualType = tp; +break; +} +if
cxf git commit: Prototyping the JAX-RS proxy async support
Repository: cxf Updated Branches: refs/heads/master e6d42f6d6 -> 471f8851f Prototyping the JAX-RS proxy async support Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/471f8851 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/471f8851 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/471f8851 Branch: refs/heads/master Commit: 471f8851f5cb1af293276eb312aa0744114a0a9b Parents: e6d42f6 Author: Sergey BeryozkinAuthored: Tue Jun 7 17:42:07 2016 +0100 Committer: Sergey Beryozkin Committed: Tue Jun 7 17:42:07 2016 +0100 -- .../apache/cxf/common/util/PrimitiveUtils.java | 18 +++ .../apache/cxf/jaxrs/client/AbstractClient.java | 100 +- .../cxf/jaxrs/client/ClientProxyImpl.java | 86 +++- .../org/apache/cxf/jaxrs/client/WebClient.java | 133 +++ .../cxf/systest/jaxrs/JAXRSAsyncClientTest.java | 40 ++ 5 files changed, 264 insertions(+), 113 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/471f8851/core/src/main/java/org/apache/cxf/common/util/PrimitiveUtils.java -- diff --git a/core/src/main/java/org/apache/cxf/common/util/PrimitiveUtils.java b/core/src/main/java/org/apache/cxf/common/util/PrimitiveUtils.java index c641b50..16408d8 100644 --- a/core/src/main/java/org/apache/cxf/common/util/PrimitiveUtils.java +++ b/core/src/main/java/org/apache/cxf/common/util/PrimitiveUtils.java @@ -19,12 +19,30 @@ package org.apache.cxf.common.util; +import java.util.HashMap; +import java.util.Map; + public final class PrimitiveUtils { +private static final Map AUTOBOXED_PRIMITIVES_MAP; +static { +AUTOBOXED_PRIMITIVES_MAP = new HashMap (); +AUTOBOXED_PRIMITIVES_MAP.put(byte.class, Byte.class); +AUTOBOXED_PRIMITIVES_MAP.put(short.class, Short.class); +AUTOBOXED_PRIMITIVES_MAP.put(int.class, Integer.class); +AUTOBOXED_PRIMITIVES_MAP.put(long.class, Long.class); +AUTOBOXED_PRIMITIVES_MAP.put(float.class, Float.class); +AUTOBOXED_PRIMITIVES_MAP.put(double.class, Double.class); +AUTOBOXED_PRIMITIVES_MAP.put(boolean.class, Boolean.class); +} private PrimitiveUtils() { } +public static boolean canPrimitiveTypeBeAutoboxed(Class primitiveClass, Class type) { +return primitiveClass.isPrimitive() && type == AUTOBOXED_PRIMITIVES_MAP.get(primitiveClass); +} + public static Class getClass(String value) { Class clz = null; if ("int".equals(value)) { http://git-wip-us.apache.org/repos/asf/cxf/blob/471f8851/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java -- diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java index d98c34d..f9d9aec 100644 --- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java +++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java @@ -24,7 +24,9 @@ import java.io.InputStream; import java.io.OutputStream; import java.lang.annotation.Annotation; import java.lang.reflect.Constructor; +import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; import java.net.HttpURLConnection; import java.net.URI; import java.text.SimpleDateFormat; @@ -43,6 +45,7 @@ import java.util.logging.Logger; import javax.ws.rs.ProcessingException; import javax.ws.rs.WebApplicationException; +import javax.ws.rs.client.InvocationCallback; import javax.ws.rs.core.Cookie; import javax.ws.rs.core.EntityTag; import javax.ws.rs.core.Form; @@ -1014,7 +1017,7 @@ public abstract class AbstractClient implements Client { = CastUtils.cast((Map)outMessage.get(Message.INVOCATION_CONTEXT)); return CastUtils.cast((Map)invContext.get(REQUEST_CONTEXT)); } - + protected List getContentsList(Object body) { return body == null ? new MessageContentsList() : new MessageContentsList(body); } @@ -1067,6 +1070,50 @@ public abstract class AbstractClient implements Client { outMessage.getExchange().put("org.apache.cxf.resource.operation.name", name); } +protected static Type getCallbackType(InvocationCallback callback) { +Class cls = callback.getClass(); +ParameterizedType pt = findCallbackType(cls); +Type actualType = null; +for (Type tp : pt.getActualTypeArguments()) { +actualType = tp; +break; +} +if (actualType
svn commit: r990117 - in /websites/production/cxf/content: cache/docs.pageCache docs/swaggerfeature-swagger2feature.html
Author: buildbot Date: Tue Jun 7 13:47:31 2016 New Revision: 990117 Log: Production update by buildbot for cxf Modified: websites/production/cxf/content/cache/docs.pageCache websites/production/cxf/content/docs/swaggerfeature-swagger2feature.html Modified: websites/production/cxf/content/cache/docs.pageCache == Binary files - no diff available. Modified: websites/production/cxf/content/docs/swaggerfeature-swagger2feature.html == --- websites/production/cxf/content/docs/swaggerfeature-swagger2feature.html (original) +++ websites/production/cxf/content/docs/swaggerfeature-swagger2feature.html Tue Jun 7 13:47:31 2016 @@ -118,12 +118,12 @@ Apache CXF -- SwaggerFeature / Swagger2F SwaggerFeature / Swagger2Feature/**/ -SwaggerFeature / Swagger2FeaturePropertiesConfiguring ProgramaticallyConfiguring in SpringConfiguring in BlueprintConfiguring in CXFNonSpringJaxrsServletSamples +/*]]>*/ +SwaggerFeature / Swagger2FeaturePropertiesConfiguring ProgramaticallyConfiguring in SpringConfiguring in BlueprintConfiguring in CXFNonSpringJaxrsServletAccessing Swagger documentsSamples The CXF Swagger2Feature allows you to generatehttp://swagger.io/specification/; rel="nofollow">Swagger 2.0documents from JAX-RS service endpoints with a simple configuration.For generating https://github.com/swagger-api/swagger-spec/blob/master/versions/1.2.md; rel="nofollow">Swagger 1.2 documents, you can use SwaggerFeature instead of Swagger2Feature.These features can be configured programatically in Java or using Spring or Blueprint beans.PropertiesThe following optional parameters can be configured in Swagger2FeatureNote some properties listed below are not available or used differently in SwaggerFeature, as the corresponding properties are used differently in Swagger 2.0 and Swagger 1.2 . Please refer to the corresponding Swagger documentation for more information.)NameDescriptionDefaultbasePaththe context root path+nullcontactthe contact information+"us...@cxf.apache.org"descriptionthe description+"The Application"filterClassa security filter+nullhostthe host and port+nullignoreRoutesexcludes specific paths when scanning all resources (see scanAllResources)++nulllicensethe license+"Apache 2.0 License"licenceUrlthe license URL+"http://www.apache.org/licenses/LICENSE-2.0.html"prettyPrintwhen generating swagger.json, pretty-print the json document+falseresourcePackagea list of comma separated package names where resources must be scanned+a list of service classes configured at the endpointrunAsFilterruns the feature as a filterfalsescangenerates the swagger documentation+truescanAllResourcesscans all resources including non-annotated JAX-RS resources++falseschemesthe protocol schemes+nulltermsOfServiceUrlthe terms of service URL+nulltitlethe title+"Sample REST Application"versionthe version+"1.0.0"Note: those descriptions marked with+ correspond to the properties defined in Swagger's BeanConfig, and those marked with++ correspond tothe properties defined in Swagger's ReaderConfig.Configuring Programatically import org.apache.cxf.frontend.ServerFactoryBean; import org.apache.cxf.jaxrs.swagger.Swagger2Feature; @@ -224,7 +224,7 @@ import org.apache.cxf.jaxrs.swagger.Swag param-namejaxrs.serviceClasses/param-name param-value org.apache.cxf.systest.jaxrs.BookStore - /param-value +/param-value /init-param init-param param-namejaxrs.features/param-name @@ -242,7 +242,7 @@ import org.apache.cxf.jaxrs.swagger.Swag /servlet-mapping /web-app -SamplesCXF's distribution contains the following samples.https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/description_swagger; rel="nofollow">samples/jax_rs/description_swagger: Swagger 1.2 sample using SwaggerFeature programaticallyhttps://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/description_swagger2; rel="nofollow">samples/jax_rs/description_swagger2:Swagger 2.0 sample using Swagger2Feature programaticallyhttps://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/description_swagger2_web; rel="nofollow">samples/jax_rs/description_swagger2_web:Swagger 2.0 web application sample using Swagger2Feature using Spring<
[3/3] cxf git commit: Finishing keys refactor
Finishing keys refactor Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/dbe659d1 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/dbe659d1 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/dbe659d1 Branch: refs/heads/3.1.x-fixes Commit: dbe659d16f536944afaee85d76715558761936c6 Parents: 907fbb7 Author: Colm O hEigeartaighAuthored: Tue Jun 7 13:47:57 2016 +0100 Committer: Colm O hEigeartaigh Committed: Tue Jun 7 13:48:41 2016 +0100 -- services/sts/sts-core/pom.xml | 7 +++ .../sts/claims/mapper/JexlIssueSamlClaimsTest.java | 2 +- .../apache/cxf/sts/operation/CancelSCTUnitTest.java | 2 +- .../cxf/sts/operation/IssueEncryptedUnitTest.java | 4 ++-- .../cxf/sts/operation/IssueJWTClaimsUnitTest.java | 2 +- .../sts/operation/IssueJWTOnbehalfofUnitTest.java | 2 +- .../cxf/sts/operation/IssueJWTRealmUnitTest.java| 2 +- .../apache/cxf/sts/operation/IssueJWTUnitTest.java | 2 +- .../cxf/sts/operation/IssueOnbehalfofUnitTest.java | 2 +- .../apache/cxf/sts/operation/IssueSCTUnitTest.java | 2 +- .../cxf/sts/operation/IssueSamlClaimsUnitTest.java | 2 +- .../cxf/sts/operation/IssueSamlRealmUnitTest.java | 2 +- .../apache/cxf/sts/operation/IssueSamlUnitTest.java | 4 ++-- .../apache/cxf/sts/operation/RenewSamlUnitTest.java | 2 +- .../operation/ValidateJWTTransformationTest.java| 2 +- .../cxf/sts/operation/ValidateJWTUnitTest.java | 2 +- .../cxf/sts/operation/ValidateSCTUnitTest.java | 2 +- .../cxf/sts/operation/ValidateSamlUnitTest.java | 2 +- .../ValidateTokenTransformationUnitTest.java| 2 +- .../operation/ValidateUsernameTokenUnitTest.java| 2 +- .../sts/operation/ValidateX509TokenUnitTest.java| 2 +- .../cxf/sts/request/RequestParserUnitTest.java | 2 +- .../cxf/sts/token/canceller/SCTCancellerTest.java | 2 +- .../cxf/sts/token/provider/JWTClaimsTest.java | 2 +- .../sts/token/provider/JWTProviderActAsTest.java| 2 +- .../sts/token/provider/JWTProviderLifetimeTest.java | 2 +- .../token/provider/JWTProviderOnBehalfOfTest.java | 2 +- .../token/provider/JWTTokenProviderRealmTest.java | 2 +- .../sts/token/provider/JWTTokenProviderTest.java| 4 ++-- .../cxf/sts/token/provider/SAMLClaimsTest.java | 2 +- .../sts/token/provider/SAMLProviderActAsTest.java | 2 +- .../sts/token/provider/SAMLProviderCustomTest.java | 2 +- .../sts/token/provider/SAMLProviderKeyTypeTest.java | 2 +- .../token/provider/SAMLProviderLifetimeTest.java| 2 +- .../token/provider/SAMLProviderOnBehalfOfTest.java | 2 +- .../sts/token/provider/SAMLProviderRealmTest.java | 2 +- .../cxf/sts/token/provider/SCTProviderTest.java | 2 +- .../token/renewer/SAMLTokenRenewerLifetimeTest.java | 2 +- .../sts/token/renewer/SAMLTokenRenewerPOPTest.java | 2 +- .../token/renewer/SAMLTokenRenewerRealmTest.java| 2 +- .../cxf/sts/token/renewer/SAMLTokenRenewerTest.java | 2 +- .../token/validator/JWTTokenValidatorRealmTest.java | 2 +- .../sts/token/validator/JWTTokenValidatorTest.java | 2 +- .../SAMLTokenValidatorCachedRealmTest.java | 2 +- .../validator/SAMLTokenValidatorRealmTest.java | 2 +- .../sts/token/validator/SAMLTokenValidatorTest.java | 2 +- .../cxf/sts/token/validator/SCTValidatorTest.java | 2 +- .../token/validator/UsernameTokenValidatorTest.java | 2 +- .../sts/token/validator/X509TokenValidatorTest.java | 2 +- .../sts/sts-core/src/test/resources/clientstore.jks | Bin 4559 -> 0 bytes .../sts-core/src/test/resources/servicestore.jks| Bin 3475 -> 0 bytes .../sts/sts-core/src/test/resources/stsstore.jks| Bin 4557 -> 0 bytes services/sts/systests/advanced/pom.xml | 7 +++ .../src/test/resources/clientKeystore.properties| 2 +- .../advanced/src/test/resources/clientstore.jks | Bin 4559 -> 0 bytes .../cxf/systest/sts/basic_auth/cxf-bad-client.xml | 2 +- .../cxf/systest/sts/basic_auth/cxf-client.xml | 2 +- .../cxf/systest/sts/basic_auth/cxf-service.xml | 6 +++--- .../cxf/systest/sts/basic_auth/stax-cxf-service.xml | 6 +++--- .../cxf/systest/sts/batch/cxf-client-unit.xml | 4 ++-- .../org/apache/cxf/systest/sts/batch/cxf-sts.xml| 4 ++-- .../apache/cxf/systest/sts/batch/stax-cxf-sts.xml | 4 ++-- .../systest/sts/binarysecuritytoken/cxf-service.xml | 4 ++-- .../sts/binarysecuritytoken/stax-cxf-service.xml| 4 ++-- .../cxf/systest/sts/caching/cxf-caching-service.xml | 8 .../apache/cxf/systest/sts/caching/cxf-client.xml | 4 ++-- .../apache/cxf/systest/sts/caching/cxf-service.xml | 8 .../cxf/systest/sts/claims/cxf-bad-client.xml | 4 ++--
[2/3] cxf git commit: Finishing keys refactor
http://git-wip-us.apache.org/repos/asf/cxf/blob/dbe659d1/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml index 86df044..984c70b 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml @@ -81,10 +81,10 @@ - + - + @@ -93,10 +93,10 @@ https://localhost.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/dbe659d1/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml index 0124abd..ce52ce5 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml @@ -72,10 +72,10 @@ https://localhost:.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/dbe659d1/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml index f24227f..421c940 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml @@ -41,10 +41,10 @@ - + - + @@ -53,10 +53,10 @@ https://localhost.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/dbe659d1/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml index 3e1a440..b906034 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml @@ -48,10 +48,10 @@ https://localhost:.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/dbe659d1/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml index d8dce9a..5ca2ea2 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml @@ -51,10 +51,10 @@ https://localhost:.*;> - + - +
[1/3] cxf git commit: Finishing keys refactor
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 907fbb7b8 -> dbe659d16 http://git-wip-us.apache.org/repos/asf/cxf/blob/dbe659d1/services/sts/systests/basic/src/test/resources/clientKeystore.properties -- diff --git a/services/sts/systests/basic/src/test/resources/clientKeystore.properties b/services/sts/systests/basic/src/test/resources/clientKeystore.properties index 8ab391e..b76fb47 100644 --- a/services/sts/systests/basic/src/test/resources/clientKeystore.properties +++ b/services/sts/systests/basic/src/test/resources/clientKeystore.properties @@ -20,5 +20,5 @@ org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto. org.apache.ws.security.crypto.merlin.keystore.type=jks org.apache.ws.security.crypto.merlin.keystore.password=cspass org.apache.ws.security.crypto.merlin.keystore.alias=myclientkey -org.apache.ws.security.crypto.merlin.keystore.file=clientstore.jks +org.apache.ws.security.crypto.merlin.keystore.file=keys/clientstore.jks http://git-wip-us.apache.org/repos/asf/cxf/blob/dbe659d1/services/sts/systests/basic/src/test/resources/clientstore.jks -- diff --git a/services/sts/systests/basic/src/test/resources/clientstore.jks b/services/sts/systests/basic/src/test/resources/clientstore.jks deleted file mode 100644 index f734f87..000 Binary files a/services/sts/systests/basic/src/test/resources/clientstore.jks and /dev/null differ http://git-wip-us.apache.org/repos/asf/cxf/blob/dbe659d1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-client.xml -- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-client.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-client.xml index b4281c9..64eb335 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-client.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-client.xml @@ -51,10 +51,10 @@ https://localhost.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/dbe659d1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml -- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml index 04a696f..e733d03 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml @@ -37,10 +37,10 @@ - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/dbe659d1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml -- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml index 94c24e3..3f68318 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml @@ -39,10 +39,10 @@ - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/dbe659d1/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-unsigned-client.xml -- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-unsigned-client.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-unsigned-client.xml index 1cc647a..abcea11 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-unsigned-client.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-unsigned-client.xml @@ -30,10 +30,10
[2/3] cxf git commit: Finishing keys refactor
http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml index 86df044..984c70b 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-caching-service.xml @@ -81,10 +81,10 @@ - + - + @@ -93,10 +93,10 @@ https://localhost.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml index 0124abd..ce52ce5 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml @@ -72,10 +72,10 @@ https://localhost:.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml index f24227f..421c940 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml @@ -41,10 +41,10 @@ - + - + @@ -53,10 +53,10 @@ https://localhost.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml index 3e1a440..b906034 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-bad-client.xml @@ -48,10 +48,10 @@ https://localhost:.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml -- diff --git a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml index d8dce9a..5ca2ea2 100644 --- a/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml +++ b/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/claims/cxf-client-cbhandler.xml @@ -51,10 +51,10 @@ https://localhost:.*;> - + - +
[3/3] cxf git commit: Finishing keys refactor
Finishing keys refactor Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1b9056ce Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1b9056ce Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1b9056ce Branch: refs/heads/master Commit: 1b9056cebf8a2b5c5ff702b6df206c5d125433c9 Parents: 96eee75 Author: Colm O hEigeartaighAuthored: Tue Jun 7 13:47:57 2016 +0100 Committer: Colm O hEigeartaigh Committed: Tue Jun 7 13:48:10 2016 +0100 -- services/sts/sts-core/pom.xml | 7 +++ .../sts/claims/mapper/JexlIssueSamlClaimsTest.java | 2 +- .../apache/cxf/sts/operation/CancelSCTUnitTest.java | 2 +- .../cxf/sts/operation/IssueEncryptedUnitTest.java | 4 ++-- .../cxf/sts/operation/IssueJWTClaimsUnitTest.java | 2 +- .../sts/operation/IssueJWTOnbehalfofUnitTest.java | 2 +- .../cxf/sts/operation/IssueJWTRealmUnitTest.java| 2 +- .../apache/cxf/sts/operation/IssueJWTUnitTest.java | 2 +- .../cxf/sts/operation/IssueOnbehalfofUnitTest.java | 2 +- .../apache/cxf/sts/operation/IssueSCTUnitTest.java | 2 +- .../cxf/sts/operation/IssueSamlClaimsUnitTest.java | 2 +- .../cxf/sts/operation/IssueSamlRealmUnitTest.java | 2 +- .../apache/cxf/sts/operation/IssueSamlUnitTest.java | 4 ++-- .../apache/cxf/sts/operation/RenewSamlUnitTest.java | 2 +- .../operation/ValidateJWTTransformationTest.java| 2 +- .../cxf/sts/operation/ValidateJWTUnitTest.java | 2 +- .../cxf/sts/operation/ValidateSCTUnitTest.java | 2 +- .../cxf/sts/operation/ValidateSamlUnitTest.java | 2 +- .../ValidateTokenTransformationUnitTest.java| 2 +- .../operation/ValidateUsernameTokenUnitTest.java| 2 +- .../sts/operation/ValidateX509TokenUnitTest.java| 2 +- .../cxf/sts/request/RequestParserUnitTest.java | 2 +- .../cxf/sts/token/canceller/SCTCancellerTest.java | 2 +- .../cxf/sts/token/provider/JWTClaimsTest.java | 2 +- .../sts/token/provider/JWTProviderActAsTest.java| 2 +- .../sts/token/provider/JWTProviderLifetimeTest.java | 2 +- .../token/provider/JWTProviderOnBehalfOfTest.java | 2 +- .../token/provider/JWTTokenProviderRealmTest.java | 2 +- .../sts/token/provider/JWTTokenProviderTest.java| 4 ++-- .../cxf/sts/token/provider/SAMLClaimsTest.java | 2 +- .../sts/token/provider/SAMLProviderActAsTest.java | 2 +- .../sts/token/provider/SAMLProviderCustomTest.java | 2 +- .../sts/token/provider/SAMLProviderKeyTypeTest.java | 2 +- .../token/provider/SAMLProviderLifetimeTest.java| 2 +- .../token/provider/SAMLProviderOnBehalfOfTest.java | 2 +- .../sts/token/provider/SAMLProviderRealmTest.java | 2 +- .../cxf/sts/token/provider/SCTProviderTest.java | 2 +- .../token/renewer/SAMLTokenRenewerLifetimeTest.java | 2 +- .../sts/token/renewer/SAMLTokenRenewerPOPTest.java | 2 +- .../token/renewer/SAMLTokenRenewerRealmTest.java| 2 +- .../cxf/sts/token/renewer/SAMLTokenRenewerTest.java | 2 +- .../token/validator/JWTTokenValidatorRealmTest.java | 2 +- .../sts/token/validator/JWTTokenValidatorTest.java | 2 +- .../SAMLTokenValidatorCachedRealmTest.java | 2 +- .../validator/SAMLTokenValidatorRealmTest.java | 2 +- .../sts/token/validator/SAMLTokenValidatorTest.java | 2 +- .../cxf/sts/token/validator/SCTValidatorTest.java | 2 +- .../token/validator/UsernameTokenValidatorTest.java | 2 +- .../sts/token/validator/X509TokenValidatorTest.java | 2 +- .../sts/sts-core/src/test/resources/clientstore.jks | Bin 4559 -> 0 bytes .../sts-core/src/test/resources/servicestore.jks| Bin 3475 -> 0 bytes .../sts/sts-core/src/test/resources/stsstore.jks| Bin 4557 -> 0 bytes services/sts/systests/advanced/pom.xml | 7 +++ .../src/test/resources/clientKeystore.properties| 2 +- .../advanced/src/test/resources/clientstore.jks | Bin 4559 -> 0 bytes .../cxf/systest/sts/basic_auth/cxf-bad-client.xml | 2 +- .../cxf/systest/sts/basic_auth/cxf-client.xml | 2 +- .../cxf/systest/sts/basic_auth/cxf-service.xml | 6 +++--- .../cxf/systest/sts/basic_auth/stax-cxf-service.xml | 6 +++--- .../cxf/systest/sts/batch/cxf-client-unit.xml | 4 ++-- .../org/apache/cxf/systest/sts/batch/cxf-sts.xml| 4 ++-- .../apache/cxf/systest/sts/batch/stax-cxf-sts.xml | 4 ++-- .../systest/sts/binarysecuritytoken/cxf-service.xml | 4 ++-- .../sts/binarysecuritytoken/stax-cxf-service.xml| 4 ++-- .../cxf/systest/sts/caching/cxf-caching-service.xml | 8 .../apache/cxf/systest/sts/caching/cxf-client.xml | 4 ++-- .../apache/cxf/systest/sts/caching/cxf-service.xml | 8 .../cxf/systest/sts/claims/cxf-bad-client.xml | 4 ++-- .../cxf/systest/sts/claims/cxf-client-cbhandler.xml |
[1/3] cxf git commit: Finishing keys refactor
Repository: cxf Updated Branches: refs/heads/master 96eee75e4 -> 1b9056ceb http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/basic/src/test/resources/clientKeystore.properties -- diff --git a/services/sts/systests/basic/src/test/resources/clientKeystore.properties b/services/sts/systests/basic/src/test/resources/clientKeystore.properties index 8ab391e..b76fb47 100644 --- a/services/sts/systests/basic/src/test/resources/clientKeystore.properties +++ b/services/sts/systests/basic/src/test/resources/clientKeystore.properties @@ -20,5 +20,5 @@ org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto. org.apache.ws.security.crypto.merlin.keystore.type=jks org.apache.ws.security.crypto.merlin.keystore.password=cspass org.apache.ws.security.crypto.merlin.keystore.alias=myclientkey -org.apache.ws.security.crypto.merlin.keystore.file=clientstore.jks +org.apache.ws.security.crypto.merlin.keystore.file=keys/clientstore.jks http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/basic/src/test/resources/clientstore.jks -- diff --git a/services/sts/systests/basic/src/test/resources/clientstore.jks b/services/sts/systests/basic/src/test/resources/clientstore.jks deleted file mode 100644 index f734f87..000 Binary files a/services/sts/systests/basic/src/test/resources/clientstore.jks and /dev/null differ http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-client.xml -- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-client.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-client.xml index b4281c9..64eb335 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-client.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-client.xml @@ -51,10 +51,10 @@ https://localhost.*;> - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml -- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml index 04a696f..e733d03 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml @@ -37,10 +37,10 @@ - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml -- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml index 94c24e3..3f68318 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml @@ -39,10 +39,10 @@ - + - + http://git-wip-us.apache.org/repos/asf/cxf/blob/1b9056ce/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-unsigned-client.xml -- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-unsigned-client.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-unsigned-client.xml index 1cc647a..abcea11 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-unsigned-client.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-unsigned-client.xml @@ -30,10 +30,10 @@
[2/2] cxf git commit: [CXF-6863] WS-RM 3.x fix for retransmission works with attachments upon a network error
[CXF-6863] WS-RM 3.x fix for retransmission works with attachments upon a network error Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/907fbb7b Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/907fbb7b Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/907fbb7b Branch: refs/heads/3.1.x-fixes Commit: 907fbb7b8b437ebfa902b2daeebf610aa5888bdd Parents: 27a95f0 Author: Kai RommelAuthored: Fri Jun 3 19:13:12 2016 +0200 Committer: Akitoshi Yoshida Committed: Tue Jun 7 14:30:22 2016 +0200 -- .../org/apache/cxf/io/CachedOutputStream.java | 17 +++- .../cxf/ws/rm/RMCaptureOutInterceptor.java | 10 .../cxf/ws/rm/soap/RetransmissionQueueImpl.java | 27 ++-- 3 files changed, 34 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/907fbb7b/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java -- diff --git a/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java b/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java index 905f6f7..eeced83 100644 --- a/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java +++ b/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java @@ -258,14 +258,17 @@ public class CachedOutputStream extends OutputStream { } } else { // read the file -currentStream.close(); -if (copyOldContent) { -InputStream fin = createInputStream(tempFile); -IOUtils.copyAndCloseInput(fin, out); +try { +currentStream.close(); +if (copyOldContent) { +InputStream fin = createInputStream(tempFile); +IOUtils.copyAndCloseInput(fin, out); +} +} finally { +streamList.remove(currentStream); +deleteTempFile(); +inmem = true; } -streamList.remove(currentStream); -deleteTempFile(); -inmem = true; } } currentStream = out; http://git-wip-us.apache.org/repos/asf/cxf/blob/907fbb7b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java -- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java index 4514e03..b3c412d 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java @@ -21,6 +21,7 @@ package org.apache.cxf.ws.rm; import java.io.IOException; import java.io.InputStream; +import java.io.OutputStream; import java.util.Collection; import java.util.List; import java.util.Map; @@ -41,6 +42,7 @@ import org.apache.cxf.interceptor.AttachmentOutInterceptor; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.interceptor.LoggingOutInterceptor; import org.apache.cxf.io.CachedOutputStream; +import org.apache.cxf.io.WriteOnCloseOutputStream; import org.apache.cxf.message.Exchange; import org.apache.cxf.message.ExchangeImpl; import org.apache.cxf.message.FaultMode; @@ -200,6 +202,14 @@ public class RMCaptureOutInterceptor extends AbstractRMInterceptor { // capture message if retransmission possible if (isApplicationMessage && !isPartialResponse) { +OutputStream os = msg.getContent(OutputStream.class); +// We need to ensure that we have an output stream which won't start writing the +// message until connection is setup +if (!(os instanceof WriteOnCloseOutputStream)) { +WriteOnCloseOutputStream cached = new WriteOnCloseOutputStream(os); +msg.setContent(OutputStream.class, cached); +os = cached; +} getManager().initializeInterceptorChain(msg); //doneCaptureMessage(msg); captureMessage(msg); http://git-wip-us.apache.org/repos/asf/cxf/blob/907fbb7b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java -- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java index 5ae80dd..3181efe 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java +++
[1/2] cxf git commit: [CXF-6646] CXF 3.x WSRM Replace RewindableInputStream with CachedOutputStream
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 40b19d7f6 -> 907fbb7b8 [CXF-6646] CXF 3.x WSRM Replace RewindableInputStream with CachedOutputStream Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/27a95f05 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/27a95f05 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/27a95f05 Branch: refs/heads/3.1.x-fixes Commit: 27a95f050bfdbeb9d3e63af11fc2e8c4370ae549 Parents: 40b19d7 Author: Kai RommelAuthored: Wed May 4 02:45:38 2016 +0200 Committer: Akitoshi Yoshida Committed: Tue Jun 7 14:28:51 2016 +0200 -- .../apache/cxf/ws/rm/DestinationSequence.java | 7 +-- .../cxf/ws/rm/RMCaptureInInterceptor.java | 6 +-- .../cxf/ws/rm/RMCaptureOutInterceptor.java | 13 -- .../apache/cxf/ws/rm/RMMessageConstants.java| 6 ++- .../cxf/ws/rm/persistence/PersistenceUtils.java | 48 +++- .../apache/cxf/ws/rm/persistence/RMMessage.java | 14 +++--- .../cxf/ws/rm/persistence/jdbc/RMTxStore.java | 18 +++- .../cxf/ws/rm/soap/RetransmissionQueueImpl.java | 43 ++ .../org/apache/cxf/ws/rm/RMManagerTest.java | 22 ++--- .../ws/rm/persistence/PersistenceUtilsTest.java | 22 ++--- .../ws/rm/persistence/RMLargeMessageTest.java | 4 -- .../cxf/ws/rm/persistence/RMMessageTest.java| 16 +-- .../rm/persistence/jdbc/RMTxStoreTestBase.java | 25 +++--- 13 files changed, 167 insertions(+), 77 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/27a95f05/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java -- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java index 2e1a54b..58b7906 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/DestinationSequence.java @@ -33,6 +33,7 @@ import org.apache.cxf.common.logging.LogUtils; import org.apache.cxf.continuations.Continuation; import org.apache.cxf.continuations.ContinuationProvider; import org.apache.cxf.continuations.SuspendedInvocationException; +import org.apache.cxf.io.CachedOutputStream; import org.apache.cxf.message.Message; import org.apache.cxf.message.MessageUtils; import org.apache.cxf.ws.addressing.EndpointReferenceType; @@ -167,9 +168,9 @@ public class DestinationSequence extends AbstractSequence { RMMessage msg = null; if (!MessageUtils.isTrue(message.getContextualProperty(Message.ROBUST_ONEWAY))) { msg = new RMMessage(); -RewindableInputStream in = (RewindableInputStream)message.get(RMMessageConstants.SAVED_CONTENT); -in.rewind(); -msg.setContent(in); +CachedOutputStream cos = (CachedOutputStream)message.get(RMMessageConstants.SAVED_CONTENT); +msg.setContent(cos); +msg.setContentType((String) message.get(Message.CONTENT_TYPE)); msg.setMessageNumber(st.getMessageNumber()); } store.persistIncoming(this, msg); http://git-wip-us.apache.org/repos/asf/cxf/blob/27a95f05/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureInInterceptor.java -- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureInInterceptor.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureInInterceptor.java index 40b4fab..9d48cbc 100755 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureInInterceptor.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureInInterceptor.java @@ -57,9 +57,9 @@ public class RMCaptureInInterceptor extends AbstractRMInterceptor { saved.lockOutputStream(); LOG.fine("Capturing the original RM message"); -RewindableInputStream ris = RewindableInputStream.makeRewindable(saved.getInputStream()); -message.setContent(InputStream.class, ris); -message.put(RMMessageConstants.SAVED_CONTENT, ris); +//RewindableInputStream ris = RewindableInputStream.makeRewindable(saved.getInputStream()); +message.setContent(InputStream.class, saved.getInputStream()); +message.put(RMMessageConstants.SAVED_CONTENT, saved); } catch (Exception e) { throw new Fault(e); } http://git-wip-us.apache.org/repos/asf/cxf/blob/27a95f05/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java
cxf git commit: [CXF-6863] WS-RM 3.x fix for retransmission works with attachments upon a network error
Repository: cxf Updated Branches: refs/heads/master 574b2a999 -> 96eee75e4 [CXF-6863] WS-RM 3.x fix for retransmission works with attachments upon a network error Change-Id: I92c59f572c31fe94e2fa6413304db9ec4b9f514c Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/96eee75e Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/96eee75e Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/96eee75e Branch: refs/heads/master Commit: 96eee75e4d2ef481fabf2745e9e0ccba9e682d93 Parents: 574b2a9 Author: Kai RommelAuthored: Fri Jun 3 19:13:12 2016 +0200 Committer: Akitoshi Yoshida Committed: Tue Jun 7 14:21:08 2016 +0200 -- .../org/apache/cxf/io/CachedOutputStream.java | 17 +++- .../cxf/ws/rm/RMCaptureOutInterceptor.java | 10 .../cxf/ws/rm/soap/RetransmissionQueueImpl.java | 27 ++-- 3 files changed, 34 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/96eee75e/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java -- diff --git a/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java b/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java index 905f6f7..eeced83 100644 --- a/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java +++ b/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java @@ -258,14 +258,17 @@ public class CachedOutputStream extends OutputStream { } } else { // read the file -currentStream.close(); -if (copyOldContent) { -InputStream fin = createInputStream(tempFile); -IOUtils.copyAndCloseInput(fin, out); +try { +currentStream.close(); +if (copyOldContent) { +InputStream fin = createInputStream(tempFile); +IOUtils.copyAndCloseInput(fin, out); +} +} finally { +streamList.remove(currentStream); +deleteTempFile(); +inmem = true; } -streamList.remove(currentStream); -deleteTempFile(); -inmem = true; } } currentStream = out; http://git-wip-us.apache.org/repos/asf/cxf/blob/96eee75e/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java -- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java index 4514e03..b3c412d 100644 --- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java +++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java @@ -21,6 +21,7 @@ package org.apache.cxf.ws.rm; import java.io.IOException; import java.io.InputStream; +import java.io.OutputStream; import java.util.Collection; import java.util.List; import java.util.Map; @@ -41,6 +42,7 @@ import org.apache.cxf.interceptor.AttachmentOutInterceptor; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.interceptor.LoggingOutInterceptor; import org.apache.cxf.io.CachedOutputStream; +import org.apache.cxf.io.WriteOnCloseOutputStream; import org.apache.cxf.message.Exchange; import org.apache.cxf.message.ExchangeImpl; import org.apache.cxf.message.FaultMode; @@ -200,6 +202,14 @@ public class RMCaptureOutInterceptor extends AbstractRMInterceptor { // capture message if retransmission possible if (isApplicationMessage && !isPartialResponse) { +OutputStream os = msg.getContent(OutputStream.class); +// We need to ensure that we have an output stream which won't start writing the +// message until connection is setup +if (!(os instanceof WriteOnCloseOutputStream)) { +WriteOnCloseOutputStream cached = new WriteOnCloseOutputStream(os); +msg.setContent(OutputStream.class, cached); +os = cached; +} getManager().initializeInterceptorChain(msg); //doneCaptureMessage(msg); captureMessage(msg); http://git-wip-us.apache.org/repos/asf/cxf/blob/96eee75e/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java -- diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java index 5ae80dd..3181efe 100644
cxf git commit: add swagger2_spring sample and also fix the jackson dependency for cxf-3.1.6 (adjusted for 3.0.x)
Repository: cxf Updated Branches: refs/heads/3.0.x-fixes f56ef0eaf -> 8554177b3 add swagger2_spring sample and also fix the jackson dependency for cxf-3.1.6 (adjusted for 3.0.x) Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8554177b Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8554177b Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8554177b Branch: refs/heads/3.0.x-fixes Commit: 8554177b382ddb90286862f43ac824ad481a5c57 Parents: f56ef0e Author: Akitoshi YoshidaAuthored: Tue Jun 7 09:45:13 2016 +0200 Committer: Akitoshi Yoshida Committed: Tue Jun 7 10:02:01 2016 +0200 -- .../samples/jax_rs/description_swagger2/pom.xml | 10 -- .../jax_rs/description_swagger2_osgi/pom.xml| 10 -- .../description_swagger2_spring/README.txt | 42 ++ .../jax_rs/description_swagger2_spring/pom.xml | 113 +++ .../jaxrs/swagger/server/ApiOriginFilter.java | 45 ++ .../java/demo/jaxrs/swagger/server/Item.java| 49 +++ .../java/demo/jaxrs/swagger/server/Sample.java | 140 +++ .../java/demo/jaxrs/swagger/server/Server.java | 38 + .../META-INF/cxf/org.apache.cxf.Logger | 1 + .../src/main/resources/context.xml | 63 + .../src/main/resources/logback.xml | 16 +++ .../jax_rs/description_swagger2_web/pom.xml | 10 -- distribution/src/main/release/samples/pom.xml | 1 + 13 files changed, 508 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/8554177b/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml b/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml index 5b3e006..e3f7f55 100644 --- a/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml @@ -106,16 +106,6 @@ provided - com.fasterxml.jackson.jaxrs - jackson-jaxrs-json-provider - 2.4.1 - - -com.fasterxml.jackson.core - jackson-core - 2.4.1 - - org.apache.cxf cxf-rt-transports-http 3.0.10-SNAPSHOT http://git-wip-us.apache.org/repos/asf/cxf/blob/8554177b/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml b/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml index 6471a8b..9fe4ac9 100644 --- a/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml @@ -75,16 +75,6 @@ under the License. -com.fasterxml.jackson.jaxrs -jackson-jaxrs-json-provider -2.4.6 - - -com.fasterxml.jackson.core -jackson-core -2.4.6 - - org.apache.cxf cxf-rt-transports-http 3.0.10-SNAPSHOT http://git-wip-us.apache.org/repos/asf/cxf/blob/8554177b/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/README.txt -- diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/README.txt b/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/README.txt new file mode 100644 index 000..22c9bc3 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/README.txt @@ -0,0 +1,42 @@ +JAX-RS Swagger2Feature Spring Demo += + +The demo shows a basic usage of Swagger 2.0 API documentation with REST based Web Services using +JAX-RS 2.0 (JSR-339). + +Building and running the demo using Maven +--- + +From the base directory of this sample (i.e., where this README file is +located), the Maven pom.xml file can be used to build and run the demo. + + +Using either UNIX or Windows: + + mvn install + mvn -Pserver (from one command line window) + + +After the service is started, the Swagger API documents in JSON and YAML +are available at + + http://localhost:9000/swaggerSample/swagger.json + http://localhost:9000/swaggerSample/swagger.yaml + +To remove the target dir, run mvn clean". + +
cxf git commit: ajdust swagger2_spring pom.xml for cxf-3.1.x
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes d8a6e85e7 -> 40b19d7f6 ajdust swagger2_spring pom.xml for cxf-3.1.x Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/40b19d7f Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/40b19d7f Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/40b19d7f Branch: refs/heads/3.1.x-fixes Commit: 40b19d7f6f1877f6c2c397548a4e24582c053706 Parents: d8a6e85 Author: Akitoshi YoshidaAuthored: Tue Jun 7 09:59:26 2016 +0200 Committer: Akitoshi Yoshida Committed: Tue Jun 7 09:59:26 2016 +0200 -- .../samples/jax_rs/description_swagger2_spring/pom.xml| 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/40b19d7f/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/pom.xml b/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/pom.xml index 66d854a..e9038f6 100644 --- a/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/pom.xml @@ -25,7 +25,7 @@ org.apache.cxf.samples cxf-samples -3.2.0-SNAPSHOT +3.1.7-SNAPSHOT ../.. @@ -74,23 +74,23 @@ org.apache.cxf cxf-rt-transports-http -3.2.0-SNAPSHOT +3.1.7-SNAPSHOT org.apache.cxf cxf-rt-transports-http-jetty -3.2.0-SNAPSHOT +3.1.7-SNAPSHOT org.apache.cxf cxf-rt-frontend-jaxrs -3.2.0-SNAPSHOT +3.1.7-SNAPSHOT org.apache.cxf cxf-rt-rs-service-description -3.2.0-SNAPSHOT +3.1.7-SNAPSHOT commons-httpclient
cxf git commit: add swagger2_spring sample and also fix the jackson dependency for cxf-3.1.6
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 541ce124b -> d8a6e85e7 add swagger2_spring sample and also fix the jackson dependency for cxf-3.1.6 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d8a6e85e Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d8a6e85e Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d8a6e85e Branch: refs/heads/3.1.x-fixes Commit: d8a6e85e7de8f01f08462a683e9c9f1aaabff908 Parents: 541ce12 Author: Akitoshi YoshidaAuthored: Tue Jun 7 09:45:13 2016 +0200 Committer: Akitoshi Yoshida Committed: Tue Jun 7 09:51:40 2016 +0200 -- .../samples/jax_rs/description_swagger2/pom.xml | 10 -- .../jax_rs/description_swagger2_osgi/pom.xml| 10 -- .../description_swagger2_spring/README.txt | 42 ++ .../jax_rs/description_swagger2_spring/pom.xml | 113 +++ .../jaxrs/swagger/server/ApiOriginFilter.java | 45 ++ .../java/demo/jaxrs/swagger/server/Item.java| 49 +++ .../java/demo/jaxrs/swagger/server/Sample.java | 140 +++ .../java/demo/jaxrs/swagger/server/Server.java | 38 + .../META-INF/cxf/org.apache.cxf.Logger | 1 + .../src/main/resources/context.xml | 63 + .../src/main/resources/logback.xml | 16 +++ .../jax_rs/description_swagger2_web/pom.xml | 10 -- distribution/src/main/release/samples/pom.xml | 1 + 13 files changed, 508 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/d8a6e85e/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml b/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml index fee06ce..a2ed0db 100644 --- a/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml @@ -107,16 +107,6 @@ provided - com.fasterxml.jackson.jaxrs - jackson-jaxrs-json-provider - 2.4.1 - - -com.fasterxml.jackson.core - jackson-core - 2.4.1 - - org.apache.cxf cxf-rt-transports-http 3.1.7-SNAPSHOT http://git-wip-us.apache.org/repos/asf/cxf/blob/d8a6e85e/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml b/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml index 925dd36..bc2d0c4 100644 --- a/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml @@ -75,16 +75,6 @@ under the License. -com.fasterxml.jackson.jaxrs -jackson-jaxrs-json-provider -2.4.6 - - -com.fasterxml.jackson.core -jackson-core -2.4.6 - - org.apache.cxf cxf-rt-transports-http 3.1.7-SNAPSHOT http://git-wip-us.apache.org/repos/asf/cxf/blob/d8a6e85e/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/README.txt -- diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/README.txt b/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/README.txt new file mode 100644 index 000..22c9bc3 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/README.txt @@ -0,0 +1,42 @@ +JAX-RS Swagger2Feature Spring Demo += + +The demo shows a basic usage of Swagger 2.0 API documentation with REST based Web Services using +JAX-RS 2.0 (JSR-339). + +Building and running the demo using Maven +--- + +From the base directory of this sample (i.e., where this README file is +located), the Maven pom.xml file can be used to build and run the demo. + + +Using either UNIX or Windows: + + mvn install + mvn -Pserver (from one command line window) + + +After the service is started, the Swagger API documents in JSON and YAML +are available at + + http://localhost:9000/swaggerSample/swagger.json + http://localhost:9000/swaggerSample/swagger.yaml + +To remove the target dir, run mvn clean". + + +If you do not have your
cxf git commit: add swagger2_spring sample and also fix the jackson dependency for cxf-3.1.6
Repository: cxf Updated Branches: refs/heads/master 703acfd72 -> 574b2a999 add swagger2_spring sample and also fix the jackson dependency for cxf-3.1.6 Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/574b2a99 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/574b2a99 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/574b2a99 Branch: refs/heads/master Commit: 574b2a9997c94011794fa2e083181e23c9936f15 Parents: 703acfd Author: Akitoshi YoshidaAuthored: Tue Jun 7 09:45:13 2016 +0200 Committer: Akitoshi Yoshida Committed: Tue Jun 7 09:47:21 2016 +0200 -- .../samples/jax_rs/description_swagger2/pom.xml | 10 -- .../jax_rs/description_swagger2_osgi/pom.xml| 10 -- .../description_swagger2_spring/README.txt | 42 ++ .../jax_rs/description_swagger2_spring/pom.xml | 113 +++ .../jaxrs/swagger/server/ApiOriginFilter.java | 45 ++ .../java/demo/jaxrs/swagger/server/Item.java| 49 +++ .../java/demo/jaxrs/swagger/server/Sample.java | 140 +++ .../java/demo/jaxrs/swagger/server/Server.java | 38 + .../META-INF/cxf/org.apache.cxf.Logger | 1 + .../src/main/resources/context.xml | 63 + .../src/main/resources/logback.xml | 16 +++ .../jax_rs/description_swagger2_web/pom.xml | 10 -- distribution/src/main/release/samples/pom.xml | 1 + 13 files changed, 508 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/574b2a99/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml b/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml index 292c80b..50b7503 100644 --- a/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/description_swagger2/pom.xml @@ -107,16 +107,6 @@ provided - com.fasterxml.jackson.jaxrs - jackson-jaxrs-json-provider - 2.4.1 - - -com.fasterxml.jackson.core - jackson-core - 2.4.1 - - org.apache.cxf cxf-rt-transports-http 3.2.0-SNAPSHOT http://git-wip-us.apache.org/repos/asf/cxf/blob/574b2a99/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml -- diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml b/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml index 4df1a58..c2c02cb 100644 --- a/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi/pom.xml @@ -75,16 +75,6 @@ under the License. -com.fasterxml.jackson.jaxrs -jackson-jaxrs-json-provider -2.4.6 - - -com.fasterxml.jackson.core -jackson-core -2.4.6 - - org.apache.cxf cxf-rt-transports-http 3.2.0-SNAPSHOT http://git-wip-us.apache.org/repos/asf/cxf/blob/574b2a99/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/README.txt -- diff --git a/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/README.txt b/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/README.txt new file mode 100644 index 000..22c9bc3 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/description_swagger2_spring/README.txt @@ -0,0 +1,42 @@ +JAX-RS Swagger2Feature Spring Demo += + +The demo shows a basic usage of Swagger 2.0 API documentation with REST based Web Services using +JAX-RS 2.0 (JSR-339). + +Building and running the demo using Maven +--- + +From the base directory of this sample (i.e., where this README file is +located), the Maven pom.xml file can be used to build and run the demo. + + +Using either UNIX or Windows: + + mvn install + mvn -Pserver (from one command line window) + + +After the service is started, the Swagger API documents in JSON and YAML +are available at + + http://localhost:9000/swaggerSample/swagger.json + http://localhost:9000/swaggerSample/swagger.yaml + +To remove the target dir, run mvn clean". + + +If you do not have your swagger-ui