private boolean isWSAddressingReplyToSpecified(Exchange ex) { AddressingProperties map = ContextUtils.retrieveMAPs(ex.getInMessage(), false, false, false); return map != null && !ContextUtils.isGenericAddress(map.getReplyTo()); } };
/** * @param message the current message * @param isProviderContext true if the binding provider request context * available to the client application as opposed to the message context * visible to handlers * @param isOutbound true if the message is outbound * @return the current addressing properties */ public static AddressingProperties retrieveMAPs( Message message, boolean isProviderContext, boolean isOutbound) { return retrieveMAPs(message, isProviderContext, isOutbound, true); }
/** * @param message the current message * @param isProviderContext true if the binding provider request context * available to the client application as opposed to the message context * visible to handlers * @param isOutbound true if the message is outbound * @return the current addressing properties */ public static AddressingProperties retrieveMAPs( Message message, boolean isProviderContext, boolean isOutbound) { return retrieveMAPs(message, isProviderContext, isOutbound, true); }
/** * @param message the current message * @param isProviderContext true if the binding provider request context * available to the client application as opposed to the message context * visible to handlers * @param isOutbound true if the message is outbound * @return the current addressing properties */ public static AddressingProperties retrieveMAPs( Message message, boolean isProviderContext, boolean isOutbound) { return retrieveMAPs(message, isProviderContext, isOutbound, true); }
/** * Retrieves the addressing properties from the current message. * * @param message the current message * @param isProviderContext true if the binding provider request context * available to the client application as opposed to the message * context visible to handlers * @param isOutbound true if the message is outbound * @return the current addressing properties */ public static AddressingProperties retrieveMAPs(Message message, boolean isProviderContext, boolean isOutbound) { return org.apache.cxf.ws.addressing.ContextUtils.retrieveMAPs(message, isProviderContext, isOutbound); }
/** * @param message the current message * @param isProviderContext true if the binding provider request context * available to the client application as opposed to the message context * visible to handlers * @param isOutbound true if the message is outbound * @return the current addressing properties */ public static AddressingProperties retrieveMAPs( Message message, boolean isProviderContext, boolean isOutbound) { return retrieveMAPs(message, isProviderContext, isOutbound, true); }
/** * Get MessageId from WS Addressing properties * * @param message * @return message id */ private String getMessageId(Message message) { AddressingProperties addrProp = ContextUtils.retrieveMAPs(message, false, MessageUtils.isOutbound(message), false); return addrProp != null && addrProp.getMessageID() != null ? addrProp.getMessageID().getValue() : UUID.randomUUID().toString(); }
/** * Get MessageId from WS Addressing properties * * @param message * @return message id */ private String getMessageId(Message message) { AddressingProperties addrProp = ContextUtils.retrieveMAPs(message, false, MessageUtils.isOutbound(message), false); return addrProp != null && addrProp.getMessageID() != null ? addrProp.getMessageID().getValue() : UUID.randomUUID().toString(); }
public void handleMessage(SoapMessage message) throws Fault { AddressingProperties p = ContextUtils.retrieveMAPs(message, false, true); if (p == null) { return; } String ns = p.getNamespaceURI(); Map<String, String> nsMap = message.getEnvelopeNs(); if (nsMap == null) { nsMap = new HashMap<>(); } else { nsMap = new HashMap<>(nsMap); } message.put("soap.env.ns.map", nsMap); if (!nsMap.containsValue(ns) && !nsMap.containsKey("wsa")) { nsMap.put("wsa", ns); } message.put(AbstractOutDatabindingInterceptor.DISABLE_OUTPUTSTREAM_OPTIMIZATION, Boolean.TRUE); } });
public void handleMessage(SoapMessage message) throws Fault { AddressingProperties p = ContextUtils.retrieveMAPs(message, false, true); if (p == null) { return; } String ns = p.getNamespaceURI(); Map<String, String> nsMap = message.getEnvelopeNs(); if (nsMap == null) { nsMap = new HashMap<>(); } else { nsMap = new HashMap<>(nsMap); } message.put("soap.env.ns.map", nsMap); if (!nsMap.containsValue(ns) && !nsMap.containsKey("wsa")) { nsMap.put("wsa", ns); } message.put(AbstractOutDatabindingInterceptor.DISABLE_OUTPUTSTREAM_OPTIMIZATION, Boolean.TRUE); } });
private boolean isWSAddressingReplyToSpecified(Exchange ex) { AddressingProperties map = ContextUtils.retrieveMAPs(ex.getInMessage(), false, false, false); return map != null && !ContextUtils.isGenericAddress(map.getReplyTo()); } };
private boolean isWSAddressingReplyToSpecified(Exchange ex) { AddressingProperties map = ContextUtils.retrieveMAPs(ex.getInMessage(), false, false, false); return map != null && !ContextUtils.isGenericAddress(map.getReplyTo()); } };
/** * Get MessageId string. * if enforceMessageIDTransfer=true or WS-Addressing enabled explicitly (i.e with <wsa:addressing/> feature), * then MessageId is not null and conform with the definition in the WS-Addressing Spec; * if enforceMessageIDTransfer=false and WS-Addressing doesn't enable, * then MessageId is null. * @param message the message * @return the message id */ private String getMessageId(Message message) { String messageId = null; AddressingProperties addrProp = ContextUtils.retrieveMAPs(message, false, MessageUtils.isOutbound(message)); if (addrProp != null && addrProp.getMessageID() != null) { messageId = addrProp.getMessageID().getValue(); } return messageId; }
/** * Get MessageId string. * if enforceMessageIDTransfer=true or WS-Addressing enabled explicitly (i.e with <wsa:addressing/> feature), * then MessageId is not null and conform with the definition in the WS-Addressing Spec; * if enforceMessageIDTransfer=false and WS-Addressing doesn't enable, * then MessageId is null. * @param message the message * @return the message id */ private String getMessageId(Message message) { String messageId = null; AddressingProperties addrProp = ContextUtils.retrieveMAPs(message, false, MessageUtils.isOutbound(message)); if (addrProp != null && addrProp.getMessageID() != null) { messageId = addrProp.getMessageID().getValue(); } return messageId; }
@Override public void handleMessage(SoapMessage message) { AddressingProperties ap = ContextUtils.retrieveMAPs(message, true, false); if (ap != null) { EndpointReferenceType epr = new EndpointReferenceType(); AttributedURIType aut = new AttributedURIType(); aut.setValue("http://www.w3.org/2005/08/addressing/anonymous"); epr.setAddress(aut); ap.setReplyTo(epr); } } }
public void handle(Message message) throws SequenceFault, RMException { final AddressingProperties maps = ContextUtils.retrieveMAPs(message, false, false, false); //if wsrmp:RMAssertion and addressing is optional if (maps == null && isRMPolicyEnabled(message)) { return; } LOG.entering(getClass().getName(), "handleMessage"); Destination dest = getManager().getDestination(message); final boolean robust = MessageUtils.getContextualBoolean(message, Message.ROBUST_ONEWAY, false); if (robust) { message.remove(RMMessageConstants.DELIVERING_ROBUST_ONEWAY); dest.acknowledge(message); } dest.processingComplete(message); // close InputStream of RMCaptureInInterceptor, to delete tmp files in filesystem Closeable closable = (Closeable)message.get("org.apache.cxf.ws.rm.content.closeable"); if (null != closable) { try { closable.close(); } catch (IOException e) { // Ignore } } } }
private void updateOutputAction(String append) { AddressingProperties p = ContextUtils.retrieveMAPs(PhaseInterceptorChain.getCurrentMessage(), false, false); AddressingProperties pout = new AddressingProperties(); AttributedURIType action = new AttributedURIType(); action.setValue(p.getAction().getValue() + append); pout.exposeAs(p.getNamespaceURI()); pout.setAction(action); ContextUtils.storeMAPs(pout, PhaseInterceptorChain.getCurrentMessage(), true); }
private void updateOutputAction(String append) { AddressingProperties p = ContextUtils.retrieveMAPs(PhaseInterceptorChain.getCurrentMessage(), false, false); AddressingProperties pout = new AddressingProperties(); AttributedURIType action = new AttributedURIType(); action.setValue(p.getAction().getValue() + append); pout.exposeAs(p.getNamespaceURI()); pout.setAction(action); ContextUtils.storeMAPs(pout, PhaseInterceptorChain.getCurrentMessage(), true); }
/** * check if MessageID exists in the message, if not, only generate new MessageID for outbound message. * @param message */ private void checkMessageID(Message message) { if (!MessageUtils.isOutbound(message)) return; AddressingProperties maps = ContextUtils.retrieveMAPs(message, false, MessageUtils.isOutbound(message)); if (maps == null) { maps = new AddressingProperties(); } if (maps.getMessageID() == null) { String messageID = ContextUtils.generateUUID(); boolean isRequestor = ContextUtils.isRequestor(message); maps.setMessageID(ContextUtils.getAttributedURI(messageID)); ContextUtils.storeMAPs(maps, message, ContextUtils.isOutbound(message), isRequestor); } }
/** * check if MessageID exists in the message, if not, only generate new MessageID for outbound message. * @param message */ private void checkMessageID(Message message) { if (!MessageUtils.isOutbound(message)) return; AddressingProperties maps = ContextUtils.retrieveMAPs(message, false, MessageUtils.isOutbound(message)); if (maps == null) { maps = new AddressingProperties(); } if (maps.getMessageID() == null) { String messageID = ContextUtils.generateUUID(); boolean isRequestor = ContextUtils.isRequestor(message); maps.setMessageID(ContextUtils.getAttributedURI(messageID)); ContextUtils.storeMAPs(maps, message, ContextUtils.isOutbound(message), isRequestor); } }