RandomGuid deprecation
This commit is contained in:
@@ -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.
|
||||
* <p/>
|
||||
* 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.
|
||||
* <p/>
|
||||
* 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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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:";
|
||||
|
||||
@@ -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}.
|
||||
* <p/>
|
||||
* The {@link #setMessageIdStrategy(MessageIdStrategy) messageIdStrategy} property defines the strategy to use for
|
||||
* creating reply <code>MessageIDs</code>. By default, this is the {@link UuidMessageIdStrategy} on Java 5 and higher,
|
||||
* and the {@link RandomGuidMessageIdStrategy} on Java 1.4.
|
||||
* creating reply <code>MessageIDs</code>. By default, this is the {@link UuidMessageIdStrategy}.
|
||||
* <p/>
|
||||
* 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.
|
||||
* <p/>
|
||||
* 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");
|
||||
|
||||
Reference in New Issue
Block a user