/** * @return a generated UUID */ public static String generateUUID() { return org.apache.cxf.ws.addressing.ContextUtils.generateUUID(); }
private void doHandleRequestSoapMessage( SoapMessage message, String callbackEndpoint) throws Fault { final String callId = ContextUtils.generateUUID(); message.getHeaders().add(createHeader( RequestCallbackFeature.CALL_ID_HEADER_NAME, callId)); Map<String, Object> requestInfo = getCallInfo(message); if (requestInfo != null) { requestInfo.put(RequestCallbackFeature.CALL_ID_NAME, callId); } aggregateAddressing(message, callbackEndpoint, null); }
private W3CEndpointReference generateW3CEndpointReference() { W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder(); builder.address(ContextUtils.generateUUID()); return builder.build(); } private void proccessEndpointReference(EndpointReferenceType ref,
private W3CEndpointReference generateW3CEndpointReference() { W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder(); builder.address(ContextUtils.generateUUID()); return builder.build(); } private void proccessEndpointReference(EndpointReferenceType ref,
flowId = ContextUtils.generateUUID(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Generate new flowId '" + flowId + "'");
flowId = ContextUtils.generateUUID(); if (LOG.isLoggable(Level.FINE)) { LOG.fine("Generate new flowId '" + flowId + "'");
public void handleMessage(T message) throws Fault { String flowId = FlowIdHelper.getFlowId(message); if (flowId == null) { flowId = FlowIdProtocolHeaderCodec.readFlowId(message); } if (flowId == null) { flowId = FlowIdSoapCodec.readFlowId(message); } if (flowId == null) { Exchange ex = message.getExchange(); if (null!=ex){ Message reqMsg = ex.getOutMessage(); if ( null != reqMsg) { flowId = FlowIdHelper.getFlowId(reqMsg); if ( null != flowId) { LOG.fine("Using FlowId '" + flowId + "' from exchange."); } } } } if (flowId != null) { LOG.fine("FlowId '" + flowId + "' found in incoming message."); } else { flowId = ContextUtils.generateUUID(); LOG.fine("No flowId found in incoming message! Generate new flowId " + flowId); } FlowIdHelper.setFlowId(message, flowId); }
reqFid = ContextUtils.generateUUID();
public void handleMessage(T message) throws Fault { String flowId = FlowIdHelper.getFlowId(message); if (flowId == null) { flowId = FlowIdProtocolHeaderCodec.readFlowId(message); } if (flowId == null) { flowId = FlowIdSoapCodec.readFlowId(message); } if (flowId == null) { Exchange ex = message.getExchange(); if (null!=ex){ Message reqMsg = ex.getOutMessage(); if ( null != reqMsg) { flowId = FlowIdHelper.getFlowId(reqMsg); if ( null != flowId) { LOG.fine("Using FlowId '" + flowId + "' from exchange."); } } } } if (flowId != null) { LOG.fine("FlowId '" + flowId + "' found in incoming message."); } else { flowId = ContextUtils.generateUUID(); LOG.fine("No flowId found in incoming message! Generate new flowId " + flowId); } FlowIdHelper.setFlowId(message, flowId); }
reqFid = ContextUtils.generateUUID();
private void doHandleCallbackSoapMessage( SoapMessage message, CallContext callContext) throws Fault { final String callId = callContext.getCallId(); final String correlationID = callContext.getCorrelationId(); final String callbackId = ContextUtils.generateUUID(); List<Header> headers = message.getHeaders(); if(correlationID!=null){ message.getHeaders().add(createHeader( RequestCallbackFeature.CORRELATION_ID_HEADER_NAME, correlationID)); } message.getHeaders().add(createHeader( RequestCallbackFeature.CALL_ID_HEADER_NAME, callId)); headers.add(createHeader( RequestCallbackFeature.CALLBACK_ID_HEADER_NAME, callbackId)); Map<String, Object> requestInfo = getCallInfo(message); if (requestInfo != null) { requestInfo.put(RequestCallbackFeature.CALL_ID_NAME, callId); requestInfo.put(RequestCallbackFeature.CALLBACK_ID_NAME, callbackId); } String flowId = callContext.getFlowId(); if (flowId != null && !flowId.isEmpty()) { FlowIdHelper.setFlowId(message, flowId); } aggregateAddressing(message, null, callContext.getRequestId()); // In case of encryption propagate stored requestor certificate to callback response propagateRequestorCertificate(message, callContext); }
/** * 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); } }
correlationId = ContextUtils.generateUUID();
/** * Assemble the generic MAPs (for both requests and responses). * * @param message the current message * @return AddressingProperties containing the generic MAPs */ private AddressingProperties assembleGeneric(Message message) { AddressingProperties maps = getMAPs(message, true, true); // MessageID if (maps.getMessageID() == null) { String messageID = ContextUtils.generateUUID(); maps.setMessageID(ContextUtils.getAttributedURI(messageID)); } // Action if (ContextUtils.hasEmptyAction(maps)) { maps.setAction(InternalContextUtils.getAction(message)); if (ContextUtils.hasEmptyAction(maps) && ContextUtils.isOutbound(message)) { maps.setAction(ContextUtils.getAttributedURI(getActionUri(message, true))); } } return maps; }
correlationId = ContextUtils.generateUUID();
/** * Assemble the generic MAPs (for both requests and responses). * * @param message the current message * @return AddressingProperties containing the generic MAPs */ private AddressingProperties assembleGeneric(Message message) { AddressingProperties maps = getMAPs(message, true, true); // MessageID if (maps.getMessageID() == null) { String messageID = ContextUtils.generateUUID(); maps.setMessageID(ContextUtils.getAttributedURI(messageID)); } // Action if (ContextUtils.hasEmptyAction(maps)) { maps.setAction(InternalContextUtils.getAction(message)); if (ContextUtils.hasEmptyAction(maps) && ContextUtils.isOutbound(message)) { maps.setAction(ContextUtils.getAttributedURI(getActionUri(message, true))); } } return maps; }
correlationId = ContextUtils.generateUUID();
correlationId = ContextUtils.generateUUID();