/** * Default constructor. With no specification of security option, this constructor defaults to lower security, high * performance. */ public RandomGuid() { getRandomGuid(false); }
public URI newMessageId(SoapMessage message) { return URI.create(PREFIX + new RandomGuid(secure).toString()); } }
private URI getMessageId(SoapMessage response) { URI responseMessageId = messageIdStrategy.newMessageId(response); if (logger.isTraceEnabled()) { logger.trace("Generated reply MessageID [" + responseMessageId + "] for [" + response + "]"); } return responseMessageId; }
/** * Create a new {@code ActionCallback} with the given version, {@code Action}, and optional * {@code To}. * * @param action the value of the action property * @param version the WS-Addressing version to use * @param to the value of the destination property */ public ActionCallback(URI action, AddressingVersion version, URI to) { Assert.notNull(action, "'action' must not be null"); Assert.notNull(version, "'version' must not be null"); this.action = action; this.version = version; this.to = to; messageIdStrategy = new UuidMessageIdStrategy(); }
public final boolean handleRequest(MessageContext messageContext, Object endpoint) throws Exception { Assert.isInstanceOf(SoapMessage.class, messageContext.getRequest()); SoapMessage request = (SoapMessage) messageContext.getRequest(); MessageAddressingProperties requestMap = version.getMessageAddressingProperties(request); if (!version.hasRequiredProperties(requestMap)) { version.addMessageAddressingHeaderRequiredFault((SoapMessage) messageContext.getResponse()); return false; } if (messageIdStrategy.isDuplicate(requestMap.getMessageId())) { version.addInvalidAddressingHeaderFault((SoapMessage) messageContext.getResponse()); return false; } return true; }
private URI getMessageId(SoapMessage response) { URI responseMessageId = messageIdStrategy.newMessageId(response); if (logger.isTraceEnabled()) { logger.trace("Generated reply MessageID [" + responseMessageId + "] for [" + response + "]"); } return responseMessageId; }
/** * Create a new <code>ActionCallback</code> with the given version, <code>Action</code>, and optional * <code>To</code>. * * @param action the value of the action property * @param version the WS-Addressing version to use * @param action the value of the destination property */ public ActionCallback(URI action, AddressingVersion version, URI to) { Assert.notNull(action, "'action' must not be null"); Assert.notNull(version, "'version' must not be null"); this.action = action; this.version = version; this.to = to; messageIdStrategy = new UuidMessageIdStrategy(); }
/** * Constructor with security option. Setting secure true enables each random number generated to be * cryptographically strong. Secure false defaults to the standard Random function seeded with a single * cryptographically strong random number. */ public RandomGuid(boolean secure) { getRandomGuid(secure); }
private URI getMessageId(SoapMessage response) { URI responseMessageId = messageIdStrategy.newMessageId(response); if (logger.isTraceEnabled()) { logger.trace("Generated reply MessageID [" + responseMessageId + "] for [" + response + "]"); } return responseMessageId; }
/** * Create a new {@code ActionCallback} with the given version, {@code Action}, and optional * {@code To}. * * @param action the value of the action property * @param version the WS-Addressing version to use * @param to the value of the destination property */ public ActionCallback(URI action, AddressingVersion version, URI to) { Assert.notNull(action, "'action' must not be null"); Assert.notNull(version, "'version' must not be null"); this.action = action; this.version = version; this.to = to; messageIdStrategy = new UuidMessageIdStrategy(); }
private URI getMessageId(SoapMessage response) { URI responseMessageId = messageIdStrategy.newMessageId(response); if (logger.isTraceEnabled()) { logger.trace("Generated reply MessageID [" + responseMessageId + "] for [" + response + "]"); } return responseMessageId; }
/** * Create a new {@code ActionCallback} with the given version, {@code Action}, and optional * {@code To}. * * @param action the value of the action property * @param version the WS-Addressing version to use * @param to the value of the destination property */ public ActionCallback(URI action, AddressingVersion version, URI to) { Assert.notNull(action, "'action' must not be null"); Assert.notNull(version, "'version' must not be null"); this.action = action; this.version = version; this.to = to; messageIdStrategy = new UuidMessageIdStrategy(); }
@Override public void doWithMessage(WebServiceMessage message) throws IOException, TransformerException { Assert.isInstanceOf(SoapMessage.class, message); SoapMessage soapMessage = (SoapMessage) message; URI messageId = getMessageIdStrategy().newMessageId(soapMessage); MessageAddressingProperties map = new MessageAddressingProperties(getTo(), getFrom(), getReplyTo(), getFaultTo(), getAction(), messageId); version.addAddressingHeaders(soapMessage, map); }
/** * Initializes the default implementation for this mapping's strategies: the {@link * org.springframework.ws.soap.addressing.version.Addressing200408} and {@link org.springframework.ws.soap.addressing.version.Addressing10} * versions of the specification, and the {@link UuidMessageIdStrategy}. */ protected void initDefaultStrategies() { this.versions = new AddressingVersion[]{new Addressing200408(), new Addressing10()}; messageIdStrategy = new UuidMessageIdStrategy(); }
@Override public void doWithMessage(WebServiceMessage message) throws IOException, TransformerException { Assert.isInstanceOf(SoapMessage.class, message); SoapMessage soapMessage = (SoapMessage) message; URI messageId = getMessageIdStrategy().newMessageId(soapMessage); MessageAddressingProperties map = new MessageAddressingProperties(getTo(), getFrom(), getReplyTo(), getFaultTo(), getAction(), messageId); version.addAddressingHeaders(soapMessage, map); }
/** * Initializes the default implementation for this mapping's strategies: the {@link * org.springframework.ws.soap.addressing.version.Addressing200408} and {@link org.springframework.ws.soap.addressing.version.Addressing10} * versions of the specification, and the {@link UuidMessageIdStrategy}. */ protected void initDefaultStrategies() { this.versions = new AddressingVersion[]{new Addressing200408(), new Addressing10()}; messageIdStrategy = new UuidMessageIdStrategy(); }
public void doWithMessage(WebServiceMessage message) throws IOException, TransformerException { Assert.isInstanceOf(SoapMessage.class, message); SoapMessage soapMessage = (SoapMessage) message; URI messageId = getMessageIdStrategy().newMessageId(soapMessage); MessageAddressingProperties map = new MessageAddressingProperties(getTo(), getFrom(), getReplyTo(), getFaultTo(), getAction(), messageId); version.addAddressingHeaders(soapMessage, map); }
/** * Initializes the default implementation for this mapping's strategies: the {@link * org.springframework.ws.soap.addressing.version.Addressing200408} and {@link org.springframework.ws.soap.addressing.version.Addressing10} * versions of the specification, and the {@link UuidMessageIdStrategy}. */ protected void initDefaultStrategies() { this.versions = new AddressingVersion[]{new Addressing200408(), new Addressing10()}; messageIdStrategy = new UuidMessageIdStrategy(); }
@Override public void doWithMessage(WebServiceMessage message) throws IOException, TransformerException { Assert.isInstanceOf(SoapMessage.class, message); SoapMessage soapMessage = (SoapMessage) message; URI messageId = getMessageIdStrategy().newMessageId(soapMessage); MessageAddressingProperties map = new MessageAddressingProperties(getTo(), getFrom(), getReplyTo(), getFaultTo(), getAction(), messageId); version.addAddressingHeaders(soapMessage, map); }
/** * Initializes the default implementation for this mapping's strategies: the {@link * org.springframework.ws.soap.addressing.version.Addressing200408} and {@link org.springframework.ws.soap.addressing.version.Addressing10} * versions of the specification, and the {@link UuidMessageIdStrategy}. */ protected void initDefaultStrategies() { this.versions = new AddressingVersion[]{new Addressing200408(), new Addressing10()}; messageIdStrategy = new UuidMessageIdStrategy(); }