- Renamed WsAddressingVersions to AddressingVersions
- Renamed Addressing200605 to Addressing10
This commit is contained in:
@@ -35,9 +35,9 @@ 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.WsAddressing200408;
|
||||
import org.springframework.ws.soap.addressing.version.WsAddressing200605;
|
||||
import org.springframework.ws.soap.addressing.version.WsAddressingVersion;
|
||||
import org.springframework.ws.soap.addressing.version.Addressing10;
|
||||
import org.springframework.ws.soap.addressing.version.Addressing200408;
|
||||
import org.springframework.ws.soap.addressing.version.AddressingVersion;
|
||||
import org.springframework.ws.soap.server.SoapEndpointInvocationChain;
|
||||
import org.springframework.ws.soap.server.SoapEndpointMapping;
|
||||
import org.springframework.ws.transport.WebServiceMessageSender;
|
||||
@@ -45,9 +45,9 @@ import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
|
||||
/**
|
||||
* Abstract base class for {@link EndpointMapping} implementations that handle WS-Addressing. Besides the normal {@link
|
||||
* SoapEndpointMapping} properties, this mapping has a {@link #setVersions(WsAddressingVersion[]) versions} property,
|
||||
* which defines the WS-Addressing specifications supported. By default, these are {@link WsAddressing200408} and {@link
|
||||
* WsAddressing200605}.
|
||||
* SoapEndpointMapping} properties, this mapping has a {@link #setVersions(org.springframework.ws.soap.addressing.version.AddressingVersion[])
|
||||
* versions} property, which defines the WS-Addressing specifications supported. By default, these are {@link
|
||||
* 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,
|
||||
@@ -76,7 +76,7 @@ public abstract class AbstractAddressingEndpointMapping extends TransformerObjec
|
||||
|
||||
private WebServiceMessageSender[] messageSenders = new WebServiceMessageSender[0];
|
||||
|
||||
private WsAddressingVersion[] versions;
|
||||
private AddressingVersion[] versions;
|
||||
|
||||
private EndpointInterceptor[] preInterceptors = new EndpointInterceptor[0];
|
||||
|
||||
@@ -88,12 +88,13 @@ public abstract class AbstractAddressingEndpointMapping extends TransformerObjec
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the default implementation for this mapping's strategies: the {@link WsAddressing200408} and {@link
|
||||
* WsAddressing200605} versions of the specication, and the {@link UuidMessageIdStrategy} on Java 5 and higher; the
|
||||
* {@link RandomGuidMessageIdStrategy} on Java 1.4.
|
||||
* 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.
|
||||
*/
|
||||
protected void initDefaultStrategies() {
|
||||
this.versions = new WsAddressingVersion[]{new WsAddressing200408(), new WsAddressing200605()};
|
||||
this.versions = new AddressingVersion[]{new Addressing200408(), new Addressing10()};
|
||||
if (JdkVersion.isAtLeastJava15()) {
|
||||
messageIdStrategy = new UuidMessageIdStrategy();
|
||||
}
|
||||
@@ -153,10 +154,11 @@ public abstract class AbstractAddressingEndpointMapping extends TransformerObjec
|
||||
/**
|
||||
* Sets the WS-Addressing versions to be supported by this mapping.
|
||||
* <p/>
|
||||
* By default, this array is set to support {@link WsAddressing200408 the August 2004} and the {@link
|
||||
* WsAddressing200605 May 2006} versions of the specification.
|
||||
* By default, this array is set to support {@link org.springframework.ws.soap.addressing.version.Addressing200408
|
||||
* the August 2004} and the {@link org.springframework.ws.soap.addressing.version.Addressing10 May 2006} versions of
|
||||
* the specification.
|
||||
*/
|
||||
public final void setVersions(WsAddressingVersion[] versions) {
|
||||
public final void setVersions(AddressingVersion[] versions) {
|
||||
this.versions = versions;
|
||||
}
|
||||
|
||||
@@ -188,8 +190,11 @@ public abstract class AbstractAddressingEndpointMapping extends TransformerObjec
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Creates a {@link SoapEndpointInvocationChain} based on the given endpoint and {@link WsAddressingVersion}. */
|
||||
private EndpointInvocationChain getEndpointInvocationChain(Object endpoint, WsAddressingVersion version) {
|
||||
/**
|
||||
* Creates a {@link SoapEndpointInvocationChain} based on the given endpoint and {@link
|
||||
* org.springframework.ws.soap.addressing.version.AddressingVersion}.
|
||||
*/
|
||||
private EndpointInvocationChain getEndpointInvocationChain(Object endpoint, AddressingVersion version) {
|
||||
URI responseAction = getResponseAction(endpoint);
|
||||
URI faultAction = getFaultAction(endpoint);
|
||||
EndpointInterceptor[] interceptors =
|
||||
@@ -202,7 +207,7 @@ public abstract class AbstractAddressingEndpointMapping extends TransformerObjec
|
||||
return new SoapEndpointInvocationChain(endpoint, interceptors, actorsOrRoles, isUltimateReceiver);
|
||||
}
|
||||
|
||||
private boolean supports(WsAddressingVersion version, SoapMessage request) {
|
||||
private boolean supports(AddressingVersion version, SoapMessage request) {
|
||||
SoapHeader header = request.getSoapHeader();
|
||||
if (header != null) {
|
||||
for (Iterator iterator = header.examineAllHeaderElements(); iterator.hasNext();) {
|
||||
|
||||
@@ -29,7 +29,7 @@ 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.version.WsAddressingVersion;
|
||||
import org.springframework.ws.soap.addressing.version.AddressingVersion;
|
||||
import org.springframework.ws.soap.server.SoapEndpointInterceptor;
|
||||
import org.springframework.ws.transport.WebServiceConnection;
|
||||
import org.springframework.ws.transport.WebServiceMessageSender;
|
||||
@@ -45,7 +45,7 @@ class AddressingEndpointInterceptor implements SoapEndpointInterceptor {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(AddressingEndpointInterceptor.class);
|
||||
|
||||
private final WsAddressingVersion version;
|
||||
private final AddressingVersion version;
|
||||
|
||||
private final MessageIdStrategy messageIdStrategy;
|
||||
|
||||
@@ -55,7 +55,7 @@ class AddressingEndpointInterceptor implements SoapEndpointInterceptor {
|
||||
|
||||
private URI faultAction;
|
||||
|
||||
AddressingEndpointInterceptor(WsAddressingVersion version,
|
||||
AddressingEndpointInterceptor(AddressingVersion version,
|
||||
MessageIdStrategy messageIdStrategy,
|
||||
WebServiceMessageSender[] messageSenders,
|
||||
URI replyAction,
|
||||
|
||||
@@ -50,13 +50,13 @@ import org.springframework.xml.xpath.XPathExpression;
|
||||
import org.springframework.xml.xpath.XPathExpressionFactory;
|
||||
|
||||
/**
|
||||
* Abstract base class for {@link WsAddressingVersion} implementations. Uses {@link XPathExpression}s to retrieve
|
||||
* Abstract base class for {@link AddressingVersion} implementations. Uses {@link XPathExpression}s to retrieve
|
||||
* addressing information.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public abstract class AbstractWsAddressingVersion extends TransformerObjectSupport implements WsAddressingVersion {
|
||||
public abstract class AbstractAddressingVersion extends TransformerObjectSupport implements AddressingVersion {
|
||||
|
||||
private final XPathExpression toExpression;
|
||||
|
||||
@@ -76,7 +76,7 @@ public abstract class AbstractWsAddressingVersion extends TransformerObjectSuppo
|
||||
|
||||
private final XPathExpression referenceParametersExpression;
|
||||
|
||||
protected AbstractWsAddressingVersion() {
|
||||
protected AbstractAddressingVersion() {
|
||||
Properties namespaces = new Properties();
|
||||
namespaces.setProperty(getNamespacePrefix(), getNamespaceUri());
|
||||
toExpression = createNormalizedExpression(getToName(), namespaces);
|
||||
@@ -23,15 +23,15 @@ import org.springframework.ws.soap.addressing.core.EndpointReference;
|
||||
import org.springframework.xml.namespace.QNameUtils;
|
||||
|
||||
/**
|
||||
* Implements the May 2006 edition of the WS-Addressing specification. This version of the specification is used by
|
||||
* Microsoft's Windows Communication Foundation (WCF), and supported by Axis 1 and 2.
|
||||
* Implements WS-Addressing 1.0 (May 2006). This version of the specification is used by Microsoft's Windows
|
||||
* Communication Foundation (WCF), and supported by Axis 1 and 2.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see <a href="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509">Web Services Addressing, August 2004</a>
|
||||
* @since 1.5.0
|
||||
*/
|
||||
|
||||
public class WsAddressing200605 extends AbstractWsAddressingVersion {
|
||||
public class Addressing10 extends AbstractAddressingVersion {
|
||||
|
||||
private static final String NAMESPACE_URI = "http://www.w3.org/2005/08/addressing";
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.xml.namespace.QNameUtils;
|
||||
* @see <a href="http://msdn.microsoft.com/ws/2004/08/ws-addressing/">Web Services Addressing, August 2004</a>
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public class WsAddressing200408 extends AbstractWsAddressingVersion {
|
||||
public class Addressing200408 extends AbstractAddressingVersion {
|
||||
|
||||
private static final String NAMESPACE_URI = "http://schemas.xmlsoap.org/ws/2004/08/addressing";
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.ws.soap.addressing.core.MessageAddressingProperties;
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.5.0
|
||||
*/
|
||||
public interface WsAddressingVersion {
|
||||
public interface AddressingVersion {
|
||||
|
||||
/**
|
||||
* Returns the {@link org.springframework.ws.soap.addressing.core.MessageAddressingProperties} for the given
|
||||
@@ -16,7 +16,7 @@ import org.springframework.ws.soap.SoapHeaderElement;
|
||||
import org.springframework.ws.soap.SoapMessage;
|
||||
import org.springframework.ws.soap.addressing.AbstractWsAddressingTestCase;
|
||||
import org.springframework.ws.soap.addressing.messageid.MessageIdStrategy;
|
||||
import org.springframework.ws.soap.addressing.version.WsAddressingVersion;
|
||||
import org.springframework.ws.soap.addressing.version.AddressingVersion;
|
||||
import org.springframework.ws.soap.saaj.SaajSoapMessage;
|
||||
import org.springframework.ws.soap.saaj.SaajSoapMessageFactory;
|
||||
import org.springframework.ws.transport.WebServiceConnection;
|
||||
@@ -168,7 +168,7 @@ public abstract class AbstractAddressingInterceptorTestCase extends AbstractWsAd
|
||||
connectionControl.verify();
|
||||
}
|
||||
|
||||
protected abstract WsAddressingVersion getVersion();
|
||||
protected abstract AddressingVersion getVersion();
|
||||
|
||||
protected abstract String getTestPath();
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Your Corporation. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.soap.addressing.server;
|
||||
|
||||
import org.springframework.ws.soap.addressing.version.Addressing10;
|
||||
import org.springframework.ws.soap.addressing.version.AddressingVersion;
|
||||
|
||||
public class AddressingInterceptor10Test extends AbstractAddressingInterceptorTestCase {
|
||||
|
||||
protected AddressingVersion getVersion() {
|
||||
return new Addressing10();
|
||||
}
|
||||
|
||||
protected String getTestPath() {
|
||||
return "10";
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
package org.springframework.ws.soap.addressing.server;
|
||||
|
||||
import org.springframework.ws.soap.addressing.version.WsAddressing200408;
|
||||
import org.springframework.ws.soap.addressing.version.WsAddressingVersion;
|
||||
import org.springframework.ws.soap.addressing.version.Addressing200408;
|
||||
import org.springframework.ws.soap.addressing.version.AddressingVersion;
|
||||
|
||||
public class AddressingInterceptor200408Test extends AbstractAddressingInterceptorTestCase {
|
||||
|
||||
protected WsAddressingVersion getVersion() {
|
||||
return new WsAddressing200408();
|
||||
protected AddressingVersion getVersion() {
|
||||
return new Addressing200408();
|
||||
}
|
||||
|
||||
protected String getTestPath() {
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007, Your Corporation. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.soap.addressing.server;
|
||||
|
||||
import org.springframework.ws.soap.addressing.version.WsAddressing200605;
|
||||
import org.springframework.ws.soap.addressing.version.WsAddressingVersion;
|
||||
|
||||
public class AddressingInterceptor200605Test extends AbstractAddressingInterceptorTestCase {
|
||||
|
||||
protected WsAddressingVersion getVersion() {
|
||||
return new WsAddressing200605();
|
||||
}
|
||||
|
||||
protected String getTestPath() {
|
||||
return "200605";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user