diff --git a/core-tiger/src/main/java/org/springframework/ws/soap/addressing/server/AnnotationActionEndpointMapping.java b/core-tiger/src/main/java/org/springframework/ws/soap/addressing/server/AnnotationActionEndpointMapping.java index 0da0e93b..410cf34d 100644 --- a/core-tiger/src/main/java/org/springframework/ws/soap/addressing/server/AnnotationActionEndpointMapping.java +++ b/core-tiger/src/main/java/org/springframework/ws/soap/addressing/server/AnnotationActionEndpointMapping.java @@ -24,12 +24,11 @@ import java.net.URISyntaxException; import org.springframework.aop.support.AopUtils; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.core.JdkVersion; import org.springframework.core.annotation.AnnotationUtils; -import org.springframework.util.Assert; import org.springframework.util.StringUtils; import org.springframework.ws.server.endpoint.MethodEndpoint; import org.springframework.ws.server.endpoint.annotation.Endpoint; +import org.springframework.ws.soap.addressing.core.MessageAddressingProperties; import org.springframework.ws.soap.addressing.server.annotation.Action; import org.springframework.ws.soap.addressing.server.annotation.Address; @@ -58,46 +57,13 @@ import org.springframework.ws.soap.addressing.server.annotation.Address; * @see Address * @since 1.5.0 */ -public class AnnotationActionEndpointMapping extends AbstractActionEndpointMapping implements BeanPostProcessor { +public class AnnotationActionEndpointMapping extends AbstractActionMethodEndpointMapping implements BeanPostProcessor { /** Returns the 'endpoint' annotation type. Default is {@link Endpoint}. */ protected Class getEndpointAnnotationType() { return Endpoint.class; } - public final Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { - return bean; - } - - public final Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { - if (AopUtils.getTargetClass(bean).getAnnotation(getEndpointAnnotationType()) != null) { - registerMethods(bean); - } - return bean; - } - - /** - * Helper method that registers the methods of the given bean. This method iterates over the methods of the bean, - * and calls {@link #getActionForMethod(java.lang.reflect.Method)} for each. If this returns a URI, the method is - * registered using {@link #registerEndpoint(java.net.URI, Object)}. - * - * @see #getActionForMethod (java.lang.reflect.Method) - */ - protected void registerMethods(Object endpoint) { - Assert.notNull(endpoint, "'endpoint' must not be null"); - Method[] methods = AopUtils.getTargetClass(endpoint).getMethods(); - for (int i = 0; i < methods.length; i++) { - if (JdkVersion.isAtLeastJava15() && methods[i].isSynthetic() || - methods[i].getDeclaringClass().equals(Object.class)) { - continue; - } - URI action = getActionForMethod(methods[i]); - if (action != null) { - registerEndpoint(action, new MethodEndpoint(endpoint, methods[i])); - } - } - } - /** * Returns the action value for the specified method. Default implementation looks for the {@link Action} annotation * value. @@ -109,7 +75,8 @@ public class AnnotationActionEndpointMapping extends AbstractActionEndpointMappi return new URI(action.value()); } catch (URISyntaxException e) { - // ignore + throw new IllegalArgumentException( + "Invalid Action annotation [" + action.value() + "] on [" + method + "]"); } } return null; @@ -139,4 +106,32 @@ public class AnnotationActionEndpointMapping extends AbstractActionEndpointMappi } return null; } + + protected URI getResponseAction(Object endpoint, MessageAddressingProperties map) { + MethodEndpoint methodEndpoint = (MethodEndpoint) endpoint; + Action action = methodEndpoint.getMethod().getAnnotation(Action.class); + if (action != null && StringUtils.hasText(action.output())) { + try { + return new URI(action.output()); + } + catch (URISyntaxException e) { + throw new IllegalArgumentException( + "Invalid Action annotation [" + action.value() + "] on [" + methodEndpoint + "]"); + } + } + else { + return super.getResponseAction(endpoint, map); + } + } + + public final Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { + return bean; + } + + public final Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { + if (AopUtils.getTargetClass(bean).getAnnotation(getEndpointAnnotationType()) != null) { + registerMethods(bean); + } + return bean; + } } diff --git a/core-tiger/src/main/java/org/springframework/ws/soap/addressing/server/annotation/Action.java b/core-tiger/src/main/java/org/springframework/ws/soap/addressing/server/annotation/Action.java index 410f5a46..ef39e18f 100644 --- a/core-tiger/src/main/java/org/springframework/ws/soap/addressing/server/annotation/Action.java +++ b/core-tiger/src/main/java/org/springframework/ws/soap/addressing/server/annotation/Action.java @@ -37,4 +37,7 @@ public @interface Action { /** Signifies the value for the request WS-Addressing Action header that is handled by the method. */ String value(); + /** Signifies the value for the response WS-Addressing Action header that is provided by the method. */ + String output() default ""; + } diff --git a/core/src/main/java/org/springframework/ws/soap/addressing/WsAddressingException.java b/core/src/main/java/org/springframework/ws/soap/addressing/AddressingException.java similarity index 83% rename from core/src/main/java/org/springframework/ws/soap/addressing/WsAddressingException.java rename to core/src/main/java/org/springframework/ws/soap/addressing/AddressingException.java index 03c8dd8e..686eb4ce 100644 --- a/core/src/main/java/org/springframework/ws/soap/addressing/WsAddressingException.java +++ b/core/src/main/java/org/springframework/ws/soap/addressing/AddressingException.java @@ -24,13 +24,13 @@ import org.springframework.ws.WebServiceException; * @author Arjen Poutsma * @since 1.5.0 */ -public class WsAddressingException extends WebServiceException { +public class AddressingException extends WebServiceException { - public WsAddressingException(String msg) { + public AddressingException(String msg) { super(msg); } - public WsAddressingException(String msg, Throwable ex) { + public AddressingException(String msg, Throwable ex) { super(msg, ex); } } diff --git a/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractActionEndpointMapping.java b/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractActionEndpointMapping.java index a7d25973..91ba23ae 100644 --- a/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractActionEndpointMapping.java +++ b/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractActionEndpointMapping.java @@ -29,6 +29,9 @@ import org.springframework.ws.soap.addressing.core.MessageAddressingProperties; /** * Abstract base class for WS-Addressing Action-mapped {@link org.springframework.ws.server.EndpointMapping} * implementations. Provides infrastructure for mapping endpoints to actions. + *

+ * By default, this mapping creates a Action for reply messages based on the request message, plus the + * extra {@link #setOutputActionSuffix(String) suffix}. * * @author Arjen Poutsma * @since 1.5.0 @@ -36,11 +39,26 @@ import org.springframework.ws.soap.addressing.core.MessageAddressingProperties; public abstract class AbstractActionEndpointMapping extends AbstractAddressingEndpointMapping implements ApplicationContextAware { + /** The defaults suffix to add to request Action for reply messages. */ + public static final String DEFAULT_OUTPUT_ACTION_SUFFIX = "Response"; + // keys are action URIs, values are endpoints private final Map endpointMap = new HashMap(); + private String outputActionSuffix = DEFAULT_OUTPUT_ACTION_SUFFIX; + private ApplicationContext applicationContext; + /** + * Sets the suffix to add to request Actions for reply messages. + * + * @see #DEFAULT_OUTPUT_ACTION_SUFFIX + */ + public void setOutputActionSuffix(String outputActionSuffix) { + Assert.hasText(outputActionSuffix, "'replyActionSuffix' must not be empty"); + this.outputActionSuffix = outputActionSuffix; + } + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; } @@ -116,5 +134,13 @@ public abstract class AbstractActionEndpointMapping extends AbstractAddressingEn } } - + protected URI getResponseAction(Object endpoint, MessageAddressingProperties requestMap) { + URI requestAction = requestMap.getAction(); + if (requestAction != null) { + return URI.create(requestAction.toString() + outputActionSuffix); + } + else { + return null; + } + } } diff --git a/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractActionMethodEndpointMapping.java b/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractActionMethodEndpointMapping.java new file mode 100644 index 00000000..fd068277 --- /dev/null +++ b/core/src/main/java/org/springframework/ws/soap/addressing/server/AbstractActionMethodEndpointMapping.java @@ -0,0 +1,74 @@ +/* + * Copyright 2008 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.ws.soap.addressing.server; + +import java.lang.reflect.Method; +import java.net.URI; + +import org.springframework.aop.support.AopUtils; +import org.springframework.core.JdkVersion; +import org.springframework.util.Assert; +import org.springframework.ws.server.endpoint.MethodEndpoint; + +/** + * Abstract base class for WS-Addressing Action-mapped {@link org.springframework.ws.server.EndpointMapping} + * implementations that map to {@link MethodEndpoint}s. Provides infrastructure for mapping endpoint methods to + * actions. + * + * @author Arjen Poutsma + * @since 1.5.0 + */ +public abstract class AbstractActionMethodEndpointMapping extends AbstractActionEndpointMapping { + + /** + * Helper method that registers the methods of the given bean. This method iterates over the methods of the bean, + * and calls {@link #getActionForMethod(java.lang.reflect.Method)} for each. If this returns a URI, the method is + * registered using {@link #registerEndpoint(java.net.URI, Object)}. + * + * @see #getActionForMethod (java.lang.reflect.Method) + */ + protected void registerMethods(Object endpoint) { + Assert.notNull(endpoint, "'endpoint' must not be null"); + Method[] methods = AopUtils.getTargetClass(endpoint).getMethods(); + for (int i = 0; i < methods.length; i++) { + if (JdkVersion.isAtLeastJava15() && methods[i].isSynthetic() || + methods[i].getDeclaringClass().equals(Object.class)) { + continue; + } + URI action = getActionForMethod(methods[i]); + if (action != null) { + registerEndpoint(action, new MethodEndpoint(endpoint, methods[i])); + } + } + } + + /** Returns the action value for the specified method. */ + protected abstract URI getActionForMethod(Method method); + + /** + * Return the class or interface to use for method reflection. + *

+ * Default implementation delegates to {@link AopUtils#getTargetClass(Object)}. + * + * @param endpoint the bean instance (might be an AOP proxy) + * @return the bean class to expose + */ + protected Class getEndpointClass(Object endpoint) { + return AopUtils.getTargetClass(endpoint); + } + +} 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 8a212dd2..b299f654 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 @@ -184,7 +184,7 @@ public abstract class AbstractAddressingEndpointMapping extends TransformerObjec if (endpoint == null) { return null; } - return getEndpointInvocationChain(endpoint, versions[i]); + return getEndpointInvocationChain(endpoint, versions[i], requestMap); } } return null; @@ -194,14 +194,15 @@ public abstract class AbstractAddressingEndpointMapping extends TransformerObjec * 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); + private EndpointInvocationChain getEndpointInvocationChain(Object endpoint, + AddressingVersion version, + MessageAddressingProperties requestMap) { + URI responseAction = getResponseAction(endpoint, requestMap); EndpointInterceptor[] interceptors = new EndpointInterceptor[preInterceptors.length + postInterceptors.length + 1]; System.arraycopy(preInterceptors, 0, interceptors, 0, preInterceptors.length); - AddressingEndpointInterceptor interceptor = new AddressingEndpointInterceptor(version, messageIdStrategy, - messageSenders, responseAction, faultAction); + AddressingEndpointInterceptor interceptor = + new AddressingEndpointInterceptor(version, messageIdStrategy, messageSenders, responseAction, null); interceptors[preInterceptors.length] = interceptor; System.arraycopy(postInterceptors, 0, interceptors, preInterceptors.length + 1, postInterceptors.length); return new SoapEndpointInvocationChain(endpoint, interceptors, actorsOrRoles, isUltimateReceiver); @@ -229,12 +230,6 @@ public abstract class AbstractAddressingEndpointMapping extends TransformerObjec */ protected abstract Object getEndpointInternal(MessageAddressingProperties map); - protected URI getResponseAction(Object endpoint) { - return null; - } - - protected URI getFaultAction(Object endpoint) { - return null; - } + protected abstract URI getResponseAction(Object endpoint, MessageAddressingProperties requestMap); } diff --git a/core/src/main/java/org/springframework/ws/soap/addressing/version/AbstractAddressingVersion.java b/core/src/main/java/org/springframework/ws/soap/addressing/version/AbstractAddressingVersion.java index a2b51e1d..b93f8149 100644 --- a/core/src/main/java/org/springframework/ws/soap/addressing/version/AbstractAddressingVersion.java +++ b/core/src/main/java/org/springframework/ws/soap/addressing/version/AbstractAddressingVersion.java @@ -24,7 +24,10 @@ import java.util.List; import java.util.Locale; import java.util.Properties; import javax.xml.namespace.QName; -import javax.xml.transform.Transformer; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.Result; import javax.xml.transform.TransformerException; import javax.xml.transform.dom.DOMResult; import javax.xml.transform.dom.DOMSource; @@ -38,7 +41,7 @@ import org.springframework.ws.soap.SoapFault; import org.springframework.ws.soap.SoapHeader; import org.springframework.ws.soap.SoapHeaderElement; import org.springframework.ws.soap.SoapMessage; -import org.springframework.ws.soap.addressing.WsAddressingException; +import org.springframework.ws.soap.addressing.AddressingException; import org.springframework.ws.soap.addressing.core.EndpointReference; import org.springframework.ws.soap.addressing.core.MessageAddressingProperties; import org.springframework.ws.soap.soap11.Soap11Body; @@ -58,6 +61,8 @@ import org.springframework.xml.xpath.XPathExpressionFactory; */ public abstract class AbstractAddressingVersion extends TransformerObjectSupport implements AddressingVersion { + private static DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); + private final XPathExpression toExpression; private final XPathExpression actionExpression; @@ -120,7 +125,7 @@ public abstract class AbstractAddressingVersion extends TransformerObjectSupport URI to = getUri(headerElement, toExpression); EndpointReference from = getEndpointReference(fromExpression.evaluateAsNode(headerElement)); EndpointReference replyTo = getEndpointReference(replyToExpression.evaluateAsNode(headerElement)); - if (replyTo == null && getAnonymous() != null) { + if (replyTo == null) { replyTo = getDefaultReplyTo(from); } EndpointReference faultTo = getEndpointReference(faultToExpression.evaluateAsNode(headerElement)); @@ -160,7 +165,7 @@ public abstract class AbstractAddressingVersion extends TransformerObjectSupport return document.getDocumentElement(); } catch (TransformerException ex) { - throw new WsAddressingException("Could not transform SoapHeader to Document", ex); + throw new AddressingException("Could not transform SoapHeader to Document", ex); } } @@ -180,38 +185,92 @@ public abstract class AbstractAddressingVersion extends TransformerObjectSupport return new EndpointReference(address, referenceProperties, referenceParameters); } + public void addAddressingHeaders(SoapMessage message, MessageAddressingProperties map) { + SoapHeader header = message.getSoapHeader(); + // To + if (map.getTo() != null) { + SoapHeaderElement to = header.addHeaderElement(getToName()); + to.setText(map.getTo().toString()); + to.setMustUnderstand(true); + } + // From + if (map.getFrom() != null) { + SoapHeaderElement from = header.addHeaderElement(getFromName()); + addEndpointReference(from, map.getFrom()); + } + //ReplyTo + if (map.getReplyTo() != null) { + SoapHeaderElement replyTo = header.addHeaderElement(getReplyToName()); + addEndpointReference(replyTo, map.getReplyTo()); + } + // FaultTo + if (map.getFaultTo() != null) { + SoapHeaderElement faultTo = header.addHeaderElement(getFaultToName()); + addEndpointReference(faultTo, map.getFaultTo()); + } + // Action + SoapHeaderElement action = header.addHeaderElement(getActionName()); + action.setText(map.getAction().toString()); + // MessageID + if (map.getMessageId() != null) { + SoapHeaderElement messageId = header.addHeaderElement(getMessageIdName()); + messageId.setText(map.getMessageId().toString()); + } + // RelatesTo + if (map.getRelatesTo() != null) { + SoapHeaderElement relatesTo = header.addHeaderElement(getRelatesToName()); + relatesTo.setText(map.getRelatesTo().toString()); + } + addReferenceNodes(header.getResult(), map.getReferenceParameters()); + addReferenceNodes(header.getResult(), map.getReferenceProperties()); + } + public final boolean understands(SoapHeaderElement headerElement) { return getNamespaceUri().equals(headerElement.getName().getNamespaceURI()); } - public final void addAddressingHeaders(SoapMessage message, MessageAddressingProperties map) { - SoapHeader header = message.getSoapHeader(); - SoapHeaderElement messageId = header.addHeaderElement(getMessageIdName()); - messageId.setText(map.getMessageId().toString()); - SoapHeaderElement relatesTo = header.addHeaderElement(getRelatesToName()); - relatesTo.setText(map.getRelatesTo().toString()); - SoapHeaderElement to = header.addHeaderElement(getToName()); - to.setText(map.getTo().toString()); - to.setMustUnderstand(true); - if (map.getAction() != null) { - SoapHeaderElement action = header.addHeaderElement(getActionName()); - action.setText(map.getAction().toString()); + /** Adds ReplyTo, FaultTo, or From EPR to the given header Element. */ + protected void addEndpointReference(SoapHeaderElement headerElement, EndpointReference epr) { + if (epr == null || epr.getAddress() == null) { + return; } try { - Transformer transformer = createTransformer(); - for (Iterator iterator = map.getReferenceParameters().iterator(); iterator.hasNext();) { - Node node = (Node) iterator.next(); - DOMSource source = new DOMSource(node); - transformer.transform(source, header.getResult()); + DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); + Document document = documentBuilder.newDocument(); + Element address = document.createElementNS(getNamespaceUri(), QNameUtils.toQualifiedName(getAddressName())); + address.setTextContent(epr.getAddress().toString()); + transform(new DOMSource(address), headerElement.getResult()); + if (getReferenceParametersName() != null && !epr.getReferenceParameters().isEmpty()) { + Element referenceParams = document.createElementNS(getNamespaceUri(), + QNameUtils.toQualifiedName(getReferenceParametersName())); + addReferenceNodes(new DOMResult(referenceParams), epr.getReferenceParameters()); + transform(new DOMSource(referenceParams), headerElement.getResult()); } - for (Iterator iterator = map.getReferenceProperties().iterator(); iterator.hasNext();) { + if (getReferencePropertiesName() != null && !epr.getReferenceProperties().isEmpty()) { + Element referenceProps = document.createElementNS(getNamespaceUri(), + QNameUtils.toQualifiedName(getReferencePropertiesName())); + addReferenceNodes(new DOMResult(referenceProps), epr.getReferenceProperties()); + transform(new DOMSource(referenceProps), headerElement.getResult()); + } + } + catch (ParserConfigurationException ex) { + throw new AddressingException("Could not add Endpoint Reference [" + epr + "] to header element", ex); + } + catch (TransformerException ex) { + throw new AddressingException("Could not add reference properties/parameters to message", ex); + } + } + + protected void addReferenceNodes(Result result, List nodes) { + try { + for (Iterator iterator = nodes.iterator(); iterator.hasNext();) { Node node = (Node) iterator.next(); DOMSource source = new DOMSource(node); - transformer.transform(source, header.getResult()); + transform(source, result); } } catch (TransformerException ex) { - throw new WsAddressingException("Could not add reference properties/parameters to message", ex); + throw new AddressingException("Could not add reference properties/parameters to message", ex); } } @@ -300,6 +359,11 @@ public abstract class AbstractAddressingVersion extends TransformerObjectSupport return QNameUtils.createQName(getNamespaceUri(), "RelatesTo", getNamespacePrefix()); } + /** Returns the qualified name of the RelatesTo addressing header. */ + protected QName getRelationshipTypeName() { + return new QName("RelationshipType"); + } + /** * Returns the qualified name of the ReferenceProperties in the endpoint reference. Returns * null when reference properties are not supported by this version of the spec. diff --git a/core/src/main/java/org/springframework/ws/soap/addressing/version/Addressing10.java b/core/src/main/java/org/springframework/ws/soap/addressing/version/Addressing10.java index 4002532b..20052ecf 100644 --- a/core/src/main/java/org/springframework/ws/soap/addressing/version/Addressing10.java +++ b/core/src/main/java/org/springframework/ws/soap/addressing/version/Addressing10.java @@ -19,7 +19,10 @@ package org.springframework.ws.soap.addressing.version; import java.net.URI; import javax.xml.namespace.QName; +import org.springframework.util.Assert; +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.xml.namespace.QNameUtils; /** @@ -35,6 +38,11 @@ public class Addressing10 extends AbstractAddressingVersion { private static final String NAMESPACE_URI = "http://www.w3.org/2005/08/addressing"; + public void addAddressingHeaders(SoapMessage message, MessageAddressingProperties map) { + Assert.notNull(map.getAction(), "'Action' is required"); + super.addAddressingHeaders(message, map); + } + protected String getNamespaceUri() { return NAMESPACE_URI; } diff --git a/core/src/main/java/org/springframework/ws/soap/addressing/version/Addressing200408.java b/core/src/main/java/org/springframework/ws/soap/addressing/version/Addressing200408.java index 55c7627b..b8f7a75f 100644 --- a/core/src/main/java/org/springframework/ws/soap/addressing/version/Addressing200408.java +++ b/core/src/main/java/org/springframework/ws/soap/addressing/version/Addressing200408.java @@ -19,7 +19,10 @@ package org.springframework.ws.soap.addressing.version; import java.net.URI; import javax.xml.namespace.QName; +import org.springframework.util.Assert; +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.xml.namespace.QNameUtils; /** @@ -34,6 +37,12 @@ public class Addressing200408 extends AbstractAddressingVersion { private static final String NAMESPACE_URI = "http://schemas.xmlsoap.org/ws/2004/08/addressing"; + public void addAddressingHeaders(SoapMessage message, MessageAddressingProperties map) { + Assert.notNull(map.getAction(), "'Action' must not be null"); + Assert.notNull(map.getTo(), "'Action' must not be null"); + super.addAddressingHeaders(message, map); + } + protected final URI getAnonymous() { return URI.create(NAMESPACE_URI + "/role/anonymous"); } diff --git a/core/src/test/java/org/springframework/ws/soap/addressing/server/SimpleActionEndpointMappingTest.java b/core/src/test/java/org/springframework/ws/soap/addressing/server/SimpleActionEndpointMappingTest.java index b44cf7ee..124ccbef 100644 --- a/core/src/test/java/org/springframework/ws/soap/addressing/server/SimpleActionEndpointMappingTest.java +++ b/core/src/test/java/org/springframework/ws/soap/addressing/server/SimpleActionEndpointMappingTest.java @@ -41,11 +41,11 @@ public class SimpleActionEndpointMappingTest extends AbstractWsAddressingTestCas Map map = new HashMap(); endpoint1 = new Endpoint1(); Endpoint2 endpoint2 = new Endpoint2(); - map.put("http://fabrikam123.example/mail/Delete", endpoint1); - map.put("http://fabrikam123.example/mail/Add", endpoint2); + map.put("http://example.com/fabrikam/mail/Delete", endpoint1); + map.put("http://example.com/fabrikam/mail/Add", endpoint2); mapping.setPreInterceptors(new EndpointInterceptor[]{new PayloadLoggingInterceptor()}); mapping.setPostInterceptors(new EndpointInterceptor[]{new PayloadValidatingInterceptor()}); - mapping.setAddress(new URI("mailto:joe@fabrikam123.example")); + mapping.setAddress(new URI("mailto:fabrikam@example.com")); mapping.setActionMap(map); mapping.afterPropertiesSet(); } diff --git a/core/src/test/resources/org/springframework/ws/soap/addressing/10/valid.xml b/core/src/test/resources/org/springframework/ws/soap/addressing/10/valid.xml index d25307b6..e44c1df8 100644 --- a/core/src/test/resources/org/springframework/ws/soap/addressing/10/valid.xml +++ b/core/src/test/resources/org/springframework/ws/soap/addressing/10/valid.xml @@ -4,12 +4,12 @@ http://example.com/business/client1 - mailto:fabrikam@example.com + mailto:fabrikam@example.com http://example.com/fabrikam/mail/Delete - 42 + 42 diff --git a/core/src/test/resources/org/springframework/ws/soap/addressing/200408/valid.xml b/core/src/test/resources/org/springframework/ws/soap/addressing/200408/valid.xml index 405b87ef..fb813b6e 100644 --- a/core/src/test/resources/org/springframework/ws/soap/addressing/200408/valid.xml +++ b/core/src/test/resources/org/springframework/ws/soap/addressing/200408/valid.xml @@ -1,17 +1,16 @@ + xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"> - uuid:aaaabbbb-cccc-dddd-eeee-ffffffffffff + http://example.com/someuniquestring http://example.com/business/client1 - mailto:joe@fabrikam123.example - http://fabrikam123.example/mail/Delete + mailto:fabrikam@example.com + http://example.com/fabrikam/mail/Delete - - 42 - + + 42 +