diff --git a/core/src/main/java/org/springframework/ws/soap/addressing/client/ActionCallback.java b/core/src/main/java/org/springframework/ws/soap/addressing/client/ActionCallback.java index 1fc23498..79f48997 100644 --- a/core/src/main/java/org/springframework/ws/soap/addressing/client/ActionCallback.java +++ b/core/src/main/java/org/springframework/ws/soap/addressing/client/ActionCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 the original author or authors. + * Copyright 2005-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ import java.net.URI; import java.net.URISyntaxException; import javax.xml.transform.TransformerException; -import org.springframework.core.JdkVersion; import org.springframework.util.Assert; import org.springframework.ws.WebServiceMessage; import org.springframework.ws.client.core.WebServiceMessageCallback; @@ -29,7 +28,6 @@ import org.springframework.ws.soap.SoapMessage; import org.springframework.ws.soap.addressing.core.EndpointReference; import org.springframework.ws.soap.addressing.core.MessageAddressingProperties; import org.springframework.ws.soap.addressing.messageid.MessageIdStrategy; -import org.springframework.ws.soap.addressing.messageid.RandomGuidMessageIdStrategy; import org.springframework.ws.soap.addressing.messageid.UuidMessageIdStrategy; import org.springframework.ws.soap.addressing.version.Addressing10; import org.springframework.ws.soap.addressing.version.AddressingVersion; @@ -124,12 +122,7 @@ public class ActionCallback implements WebServiceMessageCallback { this.action = action; this.version = version; this.to = to; - if (JdkVersion.isAtLeastJava15()) { - messageIdStrategy = new UuidMessageIdStrategy(); - } - else { - messageIdStrategy = new RandomGuidMessageIdStrategy(); - } + messageIdStrategy = new UuidMessageIdStrategy(); } /** @@ -143,8 +136,7 @@ public class ActionCallback implements WebServiceMessageCallback { /** * Returns the message id strategy used for creating WS-Addressing MessageIds. *
- * By default, the {@link UuidMessageIdStrategy} is used on Java 5 and higher, and the {@link - * RandomGuidMessageIdStrategy} on Java 1.4. + * By default, the {@link UuidMessageIdStrategy} is used. */ public MessageIdStrategy getMessageIdStrategy() { return messageIdStrategy; @@ -153,8 +145,7 @@ public class ActionCallback implements WebServiceMessageCallback { /** * Sets the message id strategy used for creating WS-Addressing MessageIds. * - * By default, the {@link UuidMessageIdStrategy} is used on Java 5 and higher, and the {@link - * RandomGuidMessageIdStrategy} on Java 1.4. + * By default, the {@link UuidMessageIdStrategy} is used. */ public void setMessageIdStrategy(MessageIdStrategy messageIdStrategy) { Assert.notNull(messageIdStrategy, "'messageIdStrategy' must not be null"); diff --git a/core/src/main/java/org/springframework/ws/soap/addressing/messageid/RandomGuid.java b/core/src/main/java/org/springframework/ws/soap/addressing/messageid/RandomGuid.java index ecef4547..0b7bc457 100644 --- a/core/src/main/java/org/springframework/ws/soap/addressing/messageid/RandomGuid.java +++ b/core/src/main/java/org/springframework/ws/soap/addressing/messageid/RandomGuid.java @@ -82,8 +82,9 @@ import java.util.Random; * modification. This class is free for all uses. * * @author Marc A. Mnich - * @version 1.2.1 11/05/02 + * @deprecated as of Spring Web Services 2.0, in favor of {@link UuidMessageIdStrategy} */ +@Deprecated public class RandomGuid { private static Random random; diff --git a/core/src/main/java/org/springframework/ws/soap/addressing/messageid/RandomGuidMessageIdStrategy.java b/core/src/main/java/org/springframework/ws/soap/addressing/messageid/RandomGuidMessageIdStrategy.java index 03b41e94..5991c80f 100644 --- a/core/src/main/java/org/springframework/ws/soap/addressing/messageid/RandomGuidMessageIdStrategy.java +++ b/core/src/main/java/org/springframework/ws/soap/addressing/messageid/RandomGuidMessageIdStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2007 the original author or authors. + * Copyright 2005-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,9 @@ import org.springframework.ws.soap.SoapMessage; * * @author Arjen Poutsma * @since 1.5.0 + * @deprecated as of Spring Web Services 2.0, in favor of {@link UuidMessageIdStrategy} */ +@Deprecated public class RandomGuidMessageIdStrategy implements MessageIdStrategy { public static final String PREFIX = "urn:guid:"; diff --git a/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractAddressingEndpointMapping.java b/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractAddressingEndpointMapping.java index fe0ad568..3dd6dea1 100644 --- a/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractAddressingEndpointMapping.java +++ b/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractAddressingEndpointMapping.java @@ -22,7 +22,6 @@ import java.util.Iterator; import javax.xml.transform.TransformerException; import org.springframework.beans.factory.InitializingBean; -import org.springframework.core.JdkVersion; import org.springframework.util.Assert; import org.springframework.ws.context.MessageContext; import org.springframework.ws.server.EndpointInterceptor; @@ -33,7 +32,6 @@ import org.springframework.ws.soap.SoapHeaderElement; import org.springframework.ws.soap.SoapMessage; import org.springframework.ws.soap.addressing.core.MessageAddressingProperties; import org.springframework.ws.soap.addressing.messageid.MessageIdStrategy; -import org.springframework.ws.soap.addressing.messageid.RandomGuidMessageIdStrategy; import org.springframework.ws.soap.addressing.messageid.UuidMessageIdStrategy; import org.springframework.ws.soap.addressing.version.Addressing10; import org.springframework.ws.soap.addressing.version.Addressing200408; @@ -50,8 +48,7 @@ import org.springframework.xml.transform.TransformerObjectSupport; * org.springframework.ws.soap.addressing.version.Addressing200408} and {@link org.springframework.ws.soap.addressing.version.Addressing10}. * * The {@link #setMessageIdStrategy(MessageIdStrategy) messageIdStrategy} property defines the strategy to use for - * creating replyMessageIDs. By default, this is the {@link UuidMessageIdStrategy} on Java 5 and higher,
- * and the {@link RandomGuidMessageIdStrategy} on Java 1.4.
+ * creating reply MessageIDs. By default, this is the {@link UuidMessageIdStrategy}.
*
* The {@link #setMessageSenders(WebServiceMessageSender[]) messageSenders} are used to send out-of-band reply messages.
* If a request messages defines a non-anonymous reply address, these senders will be used to send the message.
@@ -90,17 +87,11 @@ public abstract class AbstractAddressingEndpointMapping extends TransformerObjec
/**
* 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 specication, and the {@link UuidMessageIdStrategy} on Java 5 and higher; the {@link
- * RandomGuidMessageIdStrategy} on Java 1.4.
+ * versions of the specification, and the {@link UuidMessageIdStrategy}.
*/
protected void initDefaultStrategies() {
this.versions = new AddressingVersion[]{new Addressing200408(), new Addressing10()};
- if (JdkVersion.isAtLeastJava15()) {
- messageIdStrategy = new UuidMessageIdStrategy();
- }
- else {
- messageIdStrategy = new RandomGuidMessageIdStrategy();
- }
+ messageIdStrategy = new UuidMessageIdStrategy();
}
public final void setActorOrRole(String actorOrRole) {
@@ -138,8 +129,7 @@ public abstract class AbstractAddressingEndpointMapping extends TransformerObjec
/**
* Sets the message id strategy used for creating WS-Addressing MessageIds.
*
- * By default, the {@link UuidMessageIdStrategy} is used on Java 5 and higher, and the {@link
- * RandomGuidMessageIdStrategy} on Java 1.4.
+ * By default, the {@link UuidMessageIdStrategy} is used.
*/
public final void setMessageIdStrategy(MessageIdStrategy messageIdStrategy) {
Assert.notNull(messageIdStrategy, "'messageIdStrategy' must not be null");