Author: alessio.soldano(a)jboss.com
Date: 2013-02-01 10:14:50 -0500 (Fri, 01 Feb 2013)
New Revision: 17266
Modified:
thirdparty/cxf/branches/cxf-2.4.10/rt/core/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java
thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Log:
BZ 906819 (backport CXF-4629)
Modified:
thirdparty/cxf/branches/cxf-2.4.10/rt/core/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java
===================================================================
---
thirdparty/cxf/branches/cxf-2.4.10/rt/core/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java 2013-02-01
11:04:55 UTC (rev 17265)
+++
thirdparty/cxf/branches/cxf-2.4.10/rt/core/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java 2013-02-01
15:14:50 UTC (rev 17266)
@@ -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.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
===================================================================
---
thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java 2013-02-01
11:04:55 UTC (rev 17265)
+++
thirdparty/cxf/branches/cxf-2.4.10/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java 2013-02-01
15:14:50 UTC (rev 17266)
@@ -52,6 +52,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.message.MessageUtils;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.phase.PhaseInterceptor;
@@ -170,7 +171,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