cxf git commit: Updating ClineXmlSecInInterceptor, deleting the enc one which is not actually needed
Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 30e2b03d1 -> 449e39521 Updating ClineXmlSecInInterceptor, deleting the enc one which is not actually needed Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/449e3952 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/449e3952 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/449e3952 Branch: refs/heads/3.1.x-fixes Commit: 449e39521d11861c050ea53afe06d27690210e9e Parents: 30e2b03 Author: Sergey Beryozkin Authored: Mon Mar 27 17:47:16 2017 +0100 Committer: Sergey Beryozkin Committed: Mon Mar 27 17:51:58 2017 +0100 -- .../security/xml/ClientXmlEncInInterceptor.java | 36 .../security/xml/ClientXmlSecInInterceptor.java | 22 .../rs/security/xml/XmlSecInInterceptor.java| 21 +++- 3 files changed, 29 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/449e3952/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlEncInInterceptor.java -- diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlEncInInterceptor.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlEncInInterceptor.java deleted file mode 100644 index 42761f1..000 --- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlEncInInterceptor.java +++ /dev/null @@ -1,36 +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 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 ClientXmlEncInInterceptor 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/449e3952/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 index f270d1b..cfbc508 100644 --- 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 @@ -20,17 +20,27 @@ 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 javax.ws.rs.WebApplicationException; +import javax.ws.rs.ext.ReaderInterceptor; +import javax.ws.rs.ext.ReaderInterceptorContext; import org.apache.cxf.jaxrs.utils.JAXRSUtils; +import org.apache.cxf.message.Message; -public class ClientXmlSecInInterceptor extends XmlSecInInterceptor implements ClientResponseFilter { +public class ClientXmlSecInInterceptor extends XmlSecInInterceptor implements ReaderInterceptor { @Override -public void filter(ClientRequestContext reqCtx, ClientResponseContext respCtx) throws IOException { -handleMessage(JAXRSUtils.getCurrentMessage()); +public Object aroundReadFrom(ReaderInterceptorContext ctx) throws IOException, WebApplicationException { +Message message = JAXRSUtils.getCurrentMessage(); +handleMessage(message); +Object object = ctx.proceed(); +new StaxActionInInterceptor(super.isRequireSignature(), + super.isRequireEncryption()).handleMessage(message); +
cxf git commit: Updating ClineXmlSecInInterceptor, deleting the enc one which is not actually needed
Repository: cxf Updated Branches: refs/heads/master 30cc8717a -> 4e5119b3d Updating ClineXmlSecInInterceptor, deleting the enc one which is not actually needed Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4e5119b3 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4e5119b3 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4e5119b3 Branch: refs/heads/master Commit: 4e5119b3d1d807fb6885ec67ce28180beb55c360 Parents: 30cc871 Author: Sergey Beryozkin Authored: Mon Mar 27 17:47:16 2017 +0100 Committer: Sergey Beryozkin Committed: Mon Mar 27 17:47:16 2017 +0100 -- .../security/xml/ClientXmlEncInInterceptor.java | 36 .../security/xml/ClientXmlSecInInterceptor.java | 22 .../rs/security/xml/XmlSecInInterceptor.java| 11 -- 3 files changed, 24 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cxf/blob/4e5119b3/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlEncInInterceptor.java -- diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlEncInInterceptor.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlEncInInterceptor.java deleted file mode 100644 index 42761f1..000 --- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/ClientXmlEncInInterceptor.java +++ /dev/null @@ -1,36 +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 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 ClientXmlEncInInterceptor 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/4e5119b3/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 index f270d1b..cfbc508 100644 --- 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 @@ -20,17 +20,27 @@ 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 javax.ws.rs.WebApplicationException; +import javax.ws.rs.ext.ReaderInterceptor; +import javax.ws.rs.ext.ReaderInterceptorContext; import org.apache.cxf.jaxrs.utils.JAXRSUtils; +import org.apache.cxf.message.Message; -public class ClientXmlSecInInterceptor extends XmlSecInInterceptor implements ClientResponseFilter { +public class ClientXmlSecInInterceptor extends XmlSecInInterceptor implements ReaderInterceptor { @Override -public void filter(ClientRequestContext reqCtx, ClientResponseContext respCtx) throws IOException { -handleMessage(JAXRSUtils.getCurrentMessage()); +public Object aroundReadFrom(ReaderInterceptorContext ctx) throws IOException, WebApplicationException { +Message message = JAXRSUtils.getCurrentMessage(); +handleMessage(message); +Object object = ctx.proceed(); +new StaxActionInInterceptor(super.isRequireSignature(), + super.isRequireEncryption()).handleMessage(message); +return object;