Java Code Examples for org.apache.cxf.binding.soap.SoapVersion#getReceiver()

The following examples show how to use org.apache.cxf.binding.soap.SoapVersion#getReceiver() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WSS4JInInterceptor.java    From steady with Apache License 2.0 5 votes vote down vote up
private String getAction(SoapMessage msg, SoapVersion version) {
    String action = (String)getOption(WSHandlerConstants.ACTION);
    if (action == null) {
        action = (String)msg.get(WSHandlerConstants.ACTION);
    }
    if (action == null) {
        LOG.warning("No security action was defined!");
        throw new SoapFault("No security action was defined!", version.getReceiver());
    }
    return action;
}
 
Example 2
Source File: WSS4JInInterceptor.java    From steady with Apache License 2.0 5 votes vote down vote up
private String getAction(SoapMessage msg, SoapVersion version) {
    String action = (String)getOption(WSHandlerConstants.ACTION);
    if (action == null) {
        action = (String)msg.get(WSHandlerConstants.ACTION);
    }
    if (action == null) {
        LOG.warning("No security action was defined!");
        throw new SoapFault("No security action was defined!", version.getReceiver());
    }
    return action;
}
 
Example 3
Source File: WSS4JInInterceptor.java    From steady with Apache License 2.0 5 votes vote down vote up
private String getAction(SoapMessage msg, SoapVersion version) {
    String action = (String)getOption(WSHandlerConstants.ACTION);
    if (action == null) {
        action = (String)msg.get(WSHandlerConstants.ACTION);
    }
    if (action == null) {
        LOG.warning("No security action was defined!");
        throw new SoapFault("No security action was defined!", version.getReceiver());
    }
    return action;
}
 
Example 4
Source File: WSS4JInInterceptor.java    From steady with Apache License 2.0 5 votes vote down vote up
private String getAction(SoapMessage msg, SoapVersion version) {
    String action = (String)getOption(WSHandlerConstants.ACTION);
    if (action == null) {
        action = (String)msg.get(WSHandlerConstants.ACTION);
    }
    if (action == null) {
        LOG.warning("No security action was defined!");
        throw new SoapFault("No security action was defined!", version.getReceiver());
    }
    return action;
}
 
Example 5
Source File: WSS4JInInterceptor.java    From cxf with Apache License 2.0 5 votes vote down vote up
private String getAction(SoapMessage msg, SoapVersion version) {
    String action = (String)getOption(ConfigurationConstants.ACTION);
    if (action == null) {
        action = (String)msg.get(ConfigurationConstants.ACTION);
    }
    if (action == null && !ignoreActions) {
        LOG.warning("No security action was defined!");
        throw new SoapFault("No security action was defined!", version.getReceiver());
    }
    return action;
}
 
Example 6
Source File: WSS4JOutInterceptor.java    From steady with Apache License 2.0 4 votes vote down vote up
private void configureActions(SoapMessage mc, boolean doDebug,
        SoapVersion version, WSSConfig config) {
    
    final Map<Integer, Object> actionMap = CastUtils.cast(
        (Map<?, ?>)getProperty(mc, WSS4J_ACTION_MAP));
    if (actionMap != null) {
        for (Map.Entry<Integer, Object> entry : actionMap.entrySet()) {
            Class<?> removedAction = null;
            
            // Be defensive here since the cast above is slightly risky
            // with the handler config options not being strongly typed.
            try {
                if (entry.getValue() instanceof Class<?>) {
                    removedAction = config.setAction(
                            entry.getKey().intValue(), 
                            (Class<?>)entry.getValue());
                } else if (entry.getValue() instanceof Action) {
                    removedAction = config.setAction(
                            entry.getKey().intValue(), 
                            (Action)entry.getValue());
                } else {
                    throw new SoapFault(new Message("BAD_ACTION", LOG), version
                            .getReceiver());
                }
            } catch (ClassCastException e) {
                throw new SoapFault(new Message("BAD_ACTION", LOG), version
                        .getReceiver());
            }
            
            if (doDebug) {
                if (removedAction != null) {
                    LOG.fine("Replaced Action: " + removedAction.getName()
                            + " with Action: " + entry.getValue()
                            + " for ID: " + entry.getKey());
                } else {
                    LOG.fine("Added Action: " + entry.getValue()
                            + " with ID: " + entry.getKey());
                }
            }
        }
    }
}
 
Example 7
Source File: WSS4JOutInterceptor.java    From steady with Apache License 2.0 4 votes vote down vote up
private void configureActions(SoapMessage mc, boolean doDebug,
        SoapVersion version, WSSConfig config) {
    
    final Map<Integer, Object> actionMap = CastUtils.cast(
        (Map<?, ?>)getProperty(mc, WSS4J_ACTION_MAP));
    if (actionMap != null) {
        for (Map.Entry<Integer, Object> entry : actionMap.entrySet()) {
            Class<?> removedAction = null;
            
            // Be defensive here since the cast above is slightly risky
            // with the handler config options not being strongly typed.
            try {
                if (entry.getValue() instanceof Class<?>) {
                    removedAction = config.setAction(
                            entry.getKey().intValue(), 
                            (Class<?>)entry.getValue());
                } else if (entry.getValue() instanceof Action) {
                    removedAction = config.setAction(
                            entry.getKey().intValue(), 
                            (Action)entry.getValue());
                } else {
                    throw new SoapFault(new Message("BAD_ACTION", LOG), version
                            .getReceiver());
                }
            } catch (ClassCastException e) {
                throw new SoapFault(new Message("BAD_ACTION", LOG), version
                        .getReceiver());
            }
            
            if (doDebug) {
                if (removedAction != null) {
                    LOG.fine("Replaced Action: " + removedAction.getName()
                            + " with Action: " + entry.getValue()
                            + " for ID: " + entry.getKey());
                } else {
                    LOG.fine("Added Action: " + entry.getValue()
                            + " with ID: " + entry.getKey());
                }
            }
        }
    }
}
 
Example 8
Source File: WSS4JOutInterceptor.java    From steady with Apache License 2.0 4 votes vote down vote up
private void configureActions(SoapMessage mc, boolean doDebug,
        SoapVersion version, WSSConfig config) {
    
    final Map<Integer, Object> actionMap = CastUtils.cast(
        (Map<?, ?>)getProperty(mc, WSS4J_ACTION_MAP));
    if (actionMap != null) {
        for (Map.Entry<Integer, Object> entry : actionMap.entrySet()) {
            Class<?> removedAction = null;
            
            // Be defensive here since the cast above is slightly risky
            // with the handler config options not being strongly typed.
            try {
                if (entry.getValue() instanceof Class<?>) {
                    removedAction = config.setAction(
                            entry.getKey().intValue(), 
                            (Class<?>)entry.getValue());
                } else if (entry.getValue() instanceof Action) {
                    removedAction = config.setAction(
                            entry.getKey().intValue(), 
                            (Action)entry.getValue());
                } else {
                    throw new SoapFault(new Message("BAD_ACTION", LOG), version
                            .getReceiver());
                }
            } catch (ClassCastException e) {
                throw new SoapFault(new Message("BAD_ACTION", LOG), version
                        .getReceiver());
            }
            
            if (doDebug) {
                if (removedAction != null) {
                    LOG.fine("Replaced Action: " + removedAction.getName()
                            + " with Action: " + entry.getValue()
                            + " for ID: " + entry.getKey());
                } else {
                    LOG.fine("Added Action: " + entry.getValue()
                            + " with ID: " + entry.getKey());
                }
            }
        }
    }
}
 
Example 9
Source File: WSS4JOutInterceptor.java    From steady with Apache License 2.0 4 votes vote down vote up
private void configureActions(SoapMessage mc, boolean doDebug,
        SoapVersion version, WSSConfig config) {
    
    final Map<Integer, Object> actionMap = CastUtils.cast(
        (Map<?, ?>)getProperty(mc, WSS4J_ACTION_MAP));
    if (actionMap != null) {
        for (Map.Entry<Integer, Object> entry : actionMap.entrySet()) {
            Class<?> removedAction = null;
            
            // Be defensive here since the cast above is slightly risky
            // with the handler config options not being strongly typed.
            try {
                if (entry.getValue() instanceof Class<?>) {
                    removedAction = config.setAction(
                            entry.getKey().intValue(), 
                            (Class<?>)entry.getValue());
                } else if (entry.getValue() instanceof Action) {
                    removedAction = config.setAction(
                            entry.getKey().intValue(), 
                            (Action)entry.getValue());
                } else {
                    throw new SoapFault(new Message("BAD_ACTION", LOG), version
                            .getReceiver());
                }
            } catch (ClassCastException e) {
                throw new SoapFault(new Message("BAD_ACTION", LOG), version
                        .getReceiver());
            }
            
            if (doDebug) {
                if (removedAction != null) {
                    LOG.fine("Replaced Action: " + removedAction.getName()
                            + " with Action: " + entry.getValue()
                            + " for ID: " + entry.getKey());
                } else {
                    LOG.fine("Added Action: " + entry.getValue()
                            + " with ID: " + entry.getKey());
                }
            }
        }
    }
}
 
Example 10
Source File: WSS4JOutInterceptor.java    From cxf with Apache License 2.0 4 votes vote down vote up
private void configureActions(SoapMessage mc, boolean doDebug,
        SoapVersion version, WSSConfig config) {

    final Map<Integer, Object> actionMap = CastUtils.cast(
        (Map<?, ?>)getProperty(mc, WSS4J_ACTION_MAP));
    if (actionMap != null && !actionMap.isEmpty()) {
        for (Map.Entry<Integer, Object> entry : actionMap.entrySet()) {
            Class<?> removedAction = null;

            // Be defensive here since the cast above is slightly risky
            // with the handler config options not being strongly typed.
            try {
                if (entry.getValue() instanceof Class<?>) {
                    removedAction = config.setAction(
                            entry.getKey().intValue(),
                            (Class<?>)entry.getValue());
                } else if (entry.getValue() instanceof Action) {
                    removedAction = config.setAction(
                            entry.getKey().intValue(),
                            (Action)entry.getValue());
                } else {
                    throw new SoapFault(new Message("BAD_ACTION", LOG), version
                            .getReceiver());
                }
            } catch (ClassCastException e) {
                throw new SoapFault(new Message("BAD_ACTION", LOG), version
                        .getReceiver());
            }

            if (doDebug) {
                if (removedAction != null) {
                    LOG.fine("Replaced Action: " + removedAction.getName()
                            + " with Action: " + entry.getValue()
                            + " for ID: " + entry.getKey());
                } else {
                    LOG.fine("Added Action: " + entry.getValue()
                            + " with ID: " + entry.getKey());
                }
            }
        }
    }
}