Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CFC4C200C44 for ; Mon, 27 Mar 2017 18:24:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CE75A160B99; Mon, 27 Mar 2017 16:24:35 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2AB0B160B5D for ; Mon, 27 Mar 2017 18:24:35 +0200 (CEST) Received: (qmail 31961 invoked by uid 500); 27 Mar 2017 16:24:34 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 31948 invoked by uid 99); 27 Mar 2017 16:24:34 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Mar 2017 16:24:34 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 36E97DFDCD; Mon, 27 Mar 2017 16:24:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Date: Mon, 27 Mar 2017 16:24:34 -0000 Message-Id: <2a93f3647cc54a0e8522588764126e63@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] cxf git commit: Making it possible for to run XMLSec in interceptors as JAXRS client response filters archived-at: Mon, 27 Mar 2017 16:24:36 -0000 Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 15c7bcde4 -> 30e2b03d1 Making it possible for to run XMLSec in interceptors as JAXRS client response filters Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/516f8cbe Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/516f8cbe Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/516f8cbe Branch: refs/heads/3.1.x-fixes Commit: 516f8cbe28b6fa73969bdcf96f447a675fafe023 Parents: 15c7bcd Author: Sergey Beryozkin Authored: Mon Mar 27 17:18:16 2017 +0100 Committer: Sergey Beryozkin Committed: Mon Mar 27 17:24:03 2017 +0100 ---------------------------------------------------------------------- .../security/xml/ClientXmlEncInterceptor.java | 36 ++++++++++++++++++++ .../security/xml/ClientXmlSecInInterceptor.java | 36 ++++++++++++++++++++ 2 files changed, 72 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/516f8cbe/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlEncInterceptor.java ---------------------------------------------------------------------- diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlEncInterceptor.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlEncInterceptor.java new file mode 100644 index 0000000..1cfa36e --- /dev/null +++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlEncInterceptor.java @@ -0,0 +1,36 @@ +/** + * 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.rs.security.xml; + +import java.io.IOException; + +import javax.ws.rs.client.ClientRequestContext; +import javax.ws.rs.client.ClientResponseContext; +import javax.ws.rs.client.ClientResponseFilter; + +import org.apache.cxf.jaxrs.utils.JAXRSUtils; + +public class ClientXmlEncInterceptor extends XmlEncInInterceptor implements ClientResponseFilter { + + @Override + public void filter(ClientRequestContext reqCtx, ClientResponseContext respCtx) throws IOException { + handleMessage(JAXRSUtils.getCurrentMessage()); + } + +} http://git-wip-us.apache.org/repos/asf/cxf/blob/516f8cbe/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlSecInInterceptor.java ---------------------------------------------------------------------- diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlSecInInterceptor.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlSecInInterceptor.java new file mode 100644 index 0000000..f270d1b --- /dev/null +++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlSecInInterceptor.java @@ -0,0 +1,36 @@ +/** + * 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.rs.security.xml; + +import java.io.IOException; + +import javax.ws.rs.client.ClientRequestContext; +import javax.ws.rs.client.ClientResponseContext; +import javax.ws.rs.client.ClientResponseFilter; + +import org.apache.cxf.jaxrs.utils.JAXRSUtils; + +public class ClientXmlSecInInterceptor extends XmlSecInInterceptor implements ClientResponseFilter { + + @Override + public void filter(ClientRequestContext reqCtx, ClientResponseContext respCtx) throws IOException { + handleMessage(JAXRSUtils.getCurrentMessage()); + } + +}