Author: alessio.soldano(a)jboss.com
Date: 2013-02-01 11:19:16 -0500 (Fri, 01 Feb 2013)
New Revision: 17268
Modified:
thirdparty/cxf/branches/cxf-2.2.12/rt/core/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java
thirdparty/cxf/branches/cxf-2.2.12/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Log:
[JBPAPP-10585] backporting CXF-4629
Modified:
thirdparty/cxf/branches/cxf-2.2.12/rt/core/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java
===================================================================
---
thirdparty/cxf/branches/cxf-2.2.12/rt/core/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java 2013-02-01
16:18:10 UTC (rev 17267)
+++
thirdparty/cxf/branches/cxf-2.2.12/rt/core/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java 2013-02-01
16:19:16 UTC (rev 17268)
@@ -46,6 +46,7 @@
import org.apache.cxf.message.Exchange;
import org.apache.cxf.message.Message;
import org.apache.cxf.message.MessageContentsList;
+import org.apache.cxf.message.MessageUtils;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.service.Service;
import org.apache.cxf.service.model.BindingInfo;
@@ -55,6 +56,7 @@
import org.apache.cxf.service.model.ServiceModelUtil;
public class URIMappingInterceptor extends AbstractInDatabindingInterceptor {
+ public static final String URIMAPPING_SKIP = URIMappingInterceptor.class.getName() +
".skip";
private static final Logger LOG =
LogUtils.getL7dLogger(URIMappingInterceptor.class);
@@ -73,6 +75,9 @@
}
return;
}
+ if (MessageUtils.getContextualBoolean(message, URIMAPPING_SKIP, false)) {
+ return;
+ }
String opName = getOperationName(message);
if (LOG.isLoggable(Level.FINE)) {
Modified:
thirdparty/cxf/branches/cxf-2.2.12/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
===================================================================
---
thirdparty/cxf/branches/cxf-2.2.12/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java 2013-02-01
16:18:10 UTC (rev 17267)
+++
thirdparty/cxf/branches/cxf-2.2.12/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java 2013-02-01
16:19:16 UTC (rev 17268)
@@ -49,6 +49,7 @@
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.interceptor.URIMappingInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.security.SecurityContext;
import org.apache.cxf.staxutils.StaxUtils;
@@ -145,7 +146,13 @@
}
public final boolean isGET(SoapMessage message) {
String method = (String)message.get(SoapMessage.HTTP_REQUEST_METHOD);
- return "GET".equals(method) &&
message.getContent(XMLStreamReader.class) == null;
+ boolean isGet =
+ "GET".equals(method) &&
message.getContent(XMLStreamReader.class) == null;
+ if (isGet) {
+ //make sure we skip the URIMapping as we cannot apply security requirements
to that
+ message.put(URIMappingInterceptor.URIMAPPING_SKIP, Boolean.TRUE);
+ }
+ return isGet;
}
public void handleMessage(SoapMessage msg) throws Fault {
Show replies by date