Skip to content

Commit

Permalink
Merged revisions 1409910 via git cherry-pick from
Browse files Browse the repository at this point in the history
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

........
  r1409910 | dkulp | 2012-11-15 13:35:17 -0500 (Thu, 15 Nov 2012) | 11 lines

  Merged revisions 1409324 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk

  ........
    r1409324 | dkulp | 2012-11-14 14:50:20 -0500 (Wed, 14 Nov 2012) | 3 lines

    [CXF-4629] Skip the URIMappingInterceptor if ws-security is being used.
    Part 1 of fix, backportable.

  ........

........

git-svn-id: https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes@1409934 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
dkulp committed Nov 15, 2012
1 parent 8b0b16b commit e733c69
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand All @@ -73,6 +75,9 @@ public void handleMessage(Message message) throws Fault {
}
return;
}
if (MessageUtils.getContextualBoolean(message, URIMAPPING_SKIP, false)) {
return;
}

String opName = getOperationName(message);
if (LOG.isLoggable(Level.FINE)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,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;
Expand Down Expand Up @@ -196,6 +197,8 @@ public void handleMessage(SoapMessage msg) throws Fault {
if (msg.containsKey(SECURITY_PROCESSED) || isGET(msg)) {
return;
}
//make sure we skip the URIMapping as we cannot apply security requirements to that
msg.put(URIMappingInterceptor.URIMAPPING_SKIP, Boolean.TRUE);
msg.put(SECURITY_PROCESSED, Boolean.TRUE);

boolean utWithCallbacks =
Expand Down

0 comments on commit e733c69

Please sign in to comment.