You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bv...@apache.org on 2013/06/06 15:02:38 UTC

git commit: Removed the javadoc @author tags inside the code base.

Updated Branches:
  refs/heads/master 65ac71b06 -> 02763a539


Removed the javadoc @author tags inside the code base.

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/02763a53
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/02763a53
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/02763a53

Branch: refs/heads/master
Commit: 02763a539553013938491b0030fc0e8b6274d322
Parents: 65ac71b
Author: Babak Vahdat <bv...@apache.org>
Authored: Thu Jun 6 15:02:32 2013 +0200
Committer: Babak Vahdat <bv...@apache.org>
Committed: Thu Jun 6 15:02:32 2013 +0200

----------------------------------------------------------------------
 .../camel/guice/jsr250/PreDestroyCloser.java       |    1 -
 .../org/apache/camel/guice/testing/TestScoped.java |    2 -
 .../salesforce/internal/SalesforceSession.java     |    2 -
 .../internal/SessionIntegrationTest.java           |    2 +-
 .../camel/component/springldap/LdapOperation.java  |    7 +-
 .../component/springldap/SpringLdapComponent.java  |    2 -
 .../ws/bean/CamelSpringWSEndpointMapping.java      |    2 -
 .../AbstractAddressingEndpointMappingHacked.java   |  618 +++++++-------
 .../ws/addressing/AbstractConsumerTests.java       |    4 +-
 .../spring/ws/addressing/AbstractWSATests.java     |  406 +++++-----
 .../ws/addressing/CamelDirectSenderTest.java       |  288 ++++----
 11 files changed, 658 insertions(+), 676 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/02763a53/components/camel-guice/src/main/java/org/apache/camel/guice/jsr250/PreDestroyCloser.java
----------------------------------------------------------------------
diff --git a/components/camel-guice/src/main/java/org/apache/camel/guice/jsr250/PreDestroyCloser.java b/components/camel-guice/src/main/java/org/apache/camel/guice/jsr250/PreDestroyCloser.java
index 8cdb17d..9488ada 100644
--- a/components/camel-guice/src/main/java/org/apache/camel/guice/jsr250/PreDestroyCloser.java
+++ b/components/camel-guice/src/main/java/org/apache/camel/guice/jsr250/PreDestroyCloser.java
@@ -30,7 +30,6 @@ import org.apache.camel.guice.support.Closer;
  * To install this closer you need to register the {@link Jsr250Module} in your
  * injector.
  * 
- * @author james.strachan@gmail.com (James Strachan)
  * @version
  */
 public class PreDestroyCloser implements Closer {

http://git-wip-us.apache.org/repos/asf/camel/blob/02763a53/components/camel-guice/src/test/java/org/apache/camel/guice/testing/TestScoped.java
----------------------------------------------------------------------
diff --git a/components/camel-guice/src/test/java/org/apache/camel/guice/testing/TestScoped.java b/components/camel-guice/src/test/java/org/apache/camel/guice/testing/TestScoped.java
index abac2e8..2f5df27 100644
--- a/components/camel-guice/src/test/java/org/apache/camel/guice/testing/TestScoped.java
+++ b/components/camel-guice/src/test/java/org/apache/camel/guice/testing/TestScoped.java
@@ -33,8 +33,6 @@ import com.google.inject.ScopeAnnotation;
  * {@link junit.framework.TestCase#setUp()} and
  * {@link junit.framework.TestCase#tearDown()}).
  * 
- * @author Luiz-Otavio Zorzella
- * @author Danka Karwanska
  * @see org.apache.camel.guice.util.CloseableScope for an implementation of this
  *      scope
  */

http://git-wip-us.apache.org/repos/asf/camel/blob/02763a53/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java
index d60c1a0..ac0e8a8 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java
@@ -289,8 +289,6 @@ public class SalesforceSession implements Service {
 
     /**
      * Records status line, and exception from exchange.
-     *
-     * @author dbokde
      */
     private static class StatusExceptionExchange extends ContentExchange {
 

http://git-wip-us.apache.org/repos/asf/camel/blob/02763a53/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java
index c8159b8..ce55033 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java
@@ -25,7 +25,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * @author dbokde
+ *
  */
 public class SessionIntegrationTest extends Assert implements SalesforceSession.SalesforceSessionListener {
 

http://git-wip-us.apache.org/repos/asf/camel/blob/02763a53/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/LdapOperation.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/LdapOperation.java b/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/LdapOperation.java
index a68a73f..dd0acc5 100644
--- a/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/LdapOperation.java
+++ b/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/LdapOperation.java
@@ -17,11 +17,8 @@
 package org.apache.camel.component.springldap;
 
 /**
- *  @author Leonid Kof, Leonid.Kof@tngtech.com
- *  The list of supported LDAP operations.
- *  Currently supported operations are search, bind, and unbind.
- *  Modify is currently not supported.
- *
+ * The list of supported LDAP operations. Currently supported operations are
+ * search, bind, and unbind. Modify is currently not supported.
  */
 
 public enum LdapOperation {

http://git-wip-us.apache.org/repos/asf/camel/blob/02763a53/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapComponent.java b/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapComponent.java
index b612ffb..6447c4c 100644
--- a/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapComponent.java
+++ b/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapComponent.java
@@ -25,9 +25,7 @@ import org.apache.camel.spi.Registry;
 import org.springframework.ldap.core.LdapTemplate;
 
 /**
- * @author Leonid Kof, Leonid.Kof@tngtech.com
  * Creates endpoints for the Spring LDAP component.
- *
  */
 public class SpringLdapComponent extends DefaultComponent {
 

http://git-wip-us.apache.org/repos/asf/camel/blob/02763a53/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelSpringWSEndpointMapping.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelSpringWSEndpointMapping.java b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelSpringWSEndpointMapping.java
index b415d80..3c29fe0 100644
--- a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelSpringWSEndpointMapping.java
+++ b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelSpringWSEndpointMapping.java
@@ -22,8 +22,6 @@ import org.springframework.ws.server.endpoint.MessageEndpoint;
 
 /**
  * Allows to register different spring-ws endpoints for camel.
- * 
- * @author azachar
  */
 public interface CamelSpringWSEndpointMapping extends EndpointMapping {
 

http://git-wip-us.apache.org/repos/asf/camel/blob/02763a53/components/camel-spring-ws/src/main/java/org/springframework/ws/soap/addressing/server/AbstractAddressingEndpointMappingHacked.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-ws/src/main/java/org/springframework/ws/soap/addressing/server/AbstractAddressingEndpointMappingHacked.java b/components/camel-spring-ws/src/main/java/org/springframework/ws/soap/addressing/server/AbstractAddressingEndpointMappingHacked.java
index ead9fa8..5f22842 100644
--- a/components/camel-spring-ws/src/main/java/org/springframework/ws/soap/addressing/server/AbstractAddressingEndpointMappingHacked.java
+++ b/components/camel-spring-ws/src/main/java/org/springframework/ws/soap/addressing/server/AbstractAddressingEndpointMappingHacked.java
@@ -1,309 +1,309 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.net.URI;
-import java.util.Arrays;
-import java.util.Iterator;
-import javax.xml.transform.TransformerException;
-
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.core.Ordered;
-import org.springframework.util.Assert;
-import org.springframework.ws.context.MessageContext;
-import org.springframework.ws.server.EndpointInterceptor;
-import org.springframework.ws.server.EndpointInvocationChain;
-import org.springframework.ws.server.EndpointMapping;
-import org.springframework.ws.soap.SoapHeader;
-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.UuidMessageIdStrategy;
-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;
-import org.springframework.xml.transform.TransformerObjectSupport;
-
-/**
- * THIS CLASS WILL BE REMOVED, WHEN THE FOLLOWING ISSUE WILL BE SOLVED: 
- * https://jira.springsource.org/browse/SWS-817
- * 
- * Abstract base class for {@link EndpointMapping} implementations that handle WS-Addressing. Besides the normal {@link
- * 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}.
- * <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.
- * <p/>
- * This mapping (and all subclasses) uses an implicit WS-Addressing {@link EndpointInterceptor}, which is added in every
- * {@link EndpointInvocationChain} produced. As such, this mapping does not have the standard <code>interceptors</code>
- * property, but rather a {@link #setPreInterceptors(EndpointInterceptor[]) preInterceptors} and {@link
- * #setPostInterceptors(EndpointInterceptor[]) postInterceptors} property, which are added before and after the implicit
- * WS-Addressing interceptor, respectively.
- *
- * @author Arjen Poutsma, Andrej Zachar
- * @since 1.5.0
- */
-public abstract class AbstractAddressingEndpointMappingHacked extends TransformerObjectSupport
-        implements SoapEndpointMapping, InitializingBean, Ordered {
-
-    private String[] actorsOrRoles;
-
-    private boolean isUltimateReceiver = true;
-
-    private MessageIdStrategy messageIdStrategy;
-
-    private WebServiceMessageSender[] messageSenders = new WebServiceMessageSender[0];
-
-    private AddressingVersion[] versions;
-
-    private EndpointInterceptor[] preInterceptors = new EndpointInterceptor[0];
-
-    private EndpointInterceptor[] postInterceptors = new EndpointInterceptor[0];
-
-    private int order = Integer.MAX_VALUE;  // default: same as non-Ordered
-
-
-    /** Protected constructor. Initializes the default settings. */
-    protected AbstractAddressingEndpointMappingHacked() {
-        initDefaultStrategies();
-    }
-
-    /**
-     * 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 final void setActorOrRole(String actorOrRole) {
-        Assert.notNull(actorOrRole, "actorOrRole must not be null");
-        actorsOrRoles = new String[]{actorOrRole};
-    }
-
-    public final void setActorsOrRoles(String[] actorsOrRoles) {
-        Assert.notEmpty(actorsOrRoles, "actorsOrRoles must not be empty");
-        this.actorsOrRoles = actorsOrRoles;
-    }
-
-    public final void setUltimateReceiver(boolean ultimateReceiver) {
-        this.isUltimateReceiver = ultimateReceiver;
-    }
-
-    public final int getOrder() {
-        return order;
-    }
-
-    /**
-     * Specify the order value for this mapping.
-     * <p/>
-     * Default value is {@link Integer#MAX_VALUE}, meaning that it's non-ordered.
-     *
-     * @see org.springframework.core.Ordered#getOrder()
-     */
-    public final void setOrder(int order) {
-        this.order = order;
-    }
-    
-
-    /**
-     * Set additional interceptors to be applied before the implicit WS-Addressing interceptor, e.g.
-     * <code>XwsSecurityInterceptor</code>.
-     */
-    public final void setPreInterceptors(EndpointInterceptor[] preInterceptors) {
-        Assert.notNull(preInterceptors, "'preInterceptors' must not be null");
-        this.preInterceptors = preInterceptors;
-    }
-
-    /**
-     * Set additional interceptors to be applied after the implicit WS-Addressing interceptor, e.g.
-     * <code>PayloadLoggingInterceptor</code>.
-     */
-    public final void setPostInterceptors(EndpointInterceptor[] postInterceptors) {
-        Assert.notNull(postInterceptors, "'postInterceptors' must not be null");
-        this.postInterceptors = postInterceptors;
-    }
-
-    /**
-     * Sets the message id strategy used for creating WS-Addressing MessageIds.
-     * <p/>
-     * By default, the {@link UuidMessageIdStrategy} is used.
-     */
-    public final void setMessageIdStrategy(MessageIdStrategy messageIdStrategy) {
-        Assert.notNull(messageIdStrategy, "'messageIdStrategy' must not be null");
-        this.messageIdStrategy = messageIdStrategy;
-    }
-
-    /**
-     * Sets the single message sender used for sending messages.
-     * <p/>
-     * This message sender will be used to resolve an URI to a
-     * {@link WebServiceConnection}.
-     * 
-     * @see #createConnection(URI)
-     */
-    public void setMessageSender(WebServiceMessageSender messageSender) {
-        Assert.notNull(messageSender, "'messageSender' must not be null");
-        setMessageSenders(new WebServiceMessageSender[] {messageSender});
-    }
-
-    public final void setMessageSenders(WebServiceMessageSender[] messageSenders) {
-        Assert.notNull(messageSenders, "'messageSenders' must not be null");
-        this.messageSenders = messageSenders;
-    }
-
-    public final WebServiceMessageSender[] getMessageSenders() {
-        return this.messageSenders;
-    }
-    /**
-     * Sets the WS-Addressing versions to be supported by this mapping.
-     * <p/>
-     * 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(AddressingVersion[] versions) {
-        this.versions = versions;
-    }
-
-    public void afterPropertiesSet() throws Exception {
-        if (logger.isInfoEnabled()) {
-            logger.info("Supporting " + Arrays.asList(versions));
-        }
-    }
-
-    public final EndpointInvocationChain getEndpoint(MessageContext messageContext) throws TransformerException {
-        Assert.isInstanceOf(SoapMessage.class, messageContext.getRequest());
-        SoapMessage request = (SoapMessage) messageContext.getRequest();
-        for (AddressingVersion version : versions) {
-            if (supports(version, request)) {
-                if (logger.isDebugEnabled()) {
-                    logger.debug("Request [" + request + "] uses [" + version + "]");
-                }
-                MessageAddressingProperties requestMap = version.getMessageAddressingProperties(request);
-                if (requestMap == null) {
-                    return null;
-                }
-                Object endpoint = getEndpointInternal(requestMap);
-                if (endpoint == null) {
-                    return null;
-                }
-                return getEndpointInvocationChain(endpoint, version, requestMap);
-            }
-        }
-        return null;
-    }
-
-    /**
-     * 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,
-                                                               MessageAddressingProperties requestMap) {
-        URI responseAction = getResponseAction(endpoint, requestMap);
-        URI faultAction = getFaultAction(endpoint, requestMap);
-        
-        WebServiceMessageSender[] messageSenders = getMessageSenders(endpoint);
-        MessageIdStrategy messageIdStrategy = getMessageStrategy(endpoint);
- 
-        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);
-        interceptors[preInterceptors.length] = interceptor;
-        System.arraycopy(postInterceptors, 0, interceptors, preInterceptors.length + 1, postInterceptors.length);
-        return new SoapEndpointInvocationChain(endpoint, interceptors, actorsOrRoles, isUltimateReceiver);
-    }
-
-    private boolean supports(AddressingVersion version, SoapMessage request) {
-        SoapHeader header = request.getSoapHeader();
-        if (header != null) {
-            for (Iterator<SoapHeaderElement> iterator = header.examineAllHeaderElements(); iterator.hasNext();) {
-                SoapHeaderElement headerElement = iterator.next();
-                if (version.understands(headerElement)) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-    
-    
-    /**
-     * Default implementation
-     * 
-     * @param endpoint specific message strategy
-     * @return
-     */
-    protected MessageIdStrategy getMessageStrategy(Object endpoint) {
-        return this.messageIdStrategy;
-    }
-
-    /**
-     * Default implementation
-     * 
-     * @param endpoint
-     * @return endpoint specific message senders
-     */
-    protected WebServiceMessageSender[] getMessageSenders(Object endpoint) {
-        return this.messageSenders;
-    }
-
-    /**
-     * Lookup an endpoint for the given  {@link MessageAddressingProperties}, returning <code>null</code> if no specific
-     * one is found. This template method is called by {@link #getEndpoint(MessageContext)}.
-     *
-     * @param map the message addressing properties
-     * @return the endpoint, or <code>null</code>
-     */
-    protected abstract Object getEndpointInternal(MessageAddressingProperties map);
-
-    /**
-     * Provides the WS-Addressing Action for response messages, given the endpoint, and request Message Addressing
-     * Properties.
-     *
-     * @param endpoint   the mapped endpoint
-     * @param requestMap the MAP for the request
-     * @return the response Action
-     */
-    protected abstract URI getResponseAction(Object endpoint, MessageAddressingProperties requestMap);
-
-    /**
-     * Provides the WS-Addressing Action for response fault messages, given the endpoint, and request Message Addressing
-     * Properties.
-     *
-     * @param endpoint   the mapped endpoint
-     * @param requestMap the MAP for the request
-     * @return the response Action
-     */
-    protected abstract URI getFaultAction(Object endpoint, MessageAddressingProperties requestMap);
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.net.URI;
+import java.util.Arrays;
+import java.util.Iterator;
+import javax.xml.transform.TransformerException;
+
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.core.Ordered;
+import org.springframework.util.Assert;
+import org.springframework.ws.context.MessageContext;
+import org.springframework.ws.server.EndpointInterceptor;
+import org.springframework.ws.server.EndpointInvocationChain;
+import org.springframework.ws.server.EndpointMapping;
+import org.springframework.ws.soap.SoapHeader;
+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.UuidMessageIdStrategy;
+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;
+import org.springframework.xml.transform.TransformerObjectSupport;
+
+/**
+ * THIS CLASS WILL BE REMOVED, WHEN THE FOLLOWING ISSUE WILL BE SOLVED: 
+ * https://jira.springsource.org/browse/SWS-817
+ * 
+ * Abstract base class for {@link EndpointMapping} implementations that handle WS-Addressing. Besides the normal {@link
+ * 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}.
+ * <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.
+ * <p/>
+ * This mapping (and all subclasses) uses an implicit WS-Addressing {@link EndpointInterceptor}, which is added in every
+ * {@link EndpointInvocationChain} produced. As such, this mapping does not have the standard <code>interceptors</code>
+ * property, but rather a {@link #setPreInterceptors(EndpointInterceptor[]) preInterceptors} and {@link
+ * #setPostInterceptors(EndpointInterceptor[]) postInterceptors} property, which are added before and after the implicit
+ * WS-Addressing interceptor, respectively.
+ *
+ * @author Arjen Poutsma, Andrej Zachar
+ * @since 1.5.0
+ */
+public abstract class AbstractAddressingEndpointMappingHacked extends TransformerObjectSupport
+        implements SoapEndpointMapping, InitializingBean, Ordered {
+
+    private String[] actorsOrRoles;
+
+    private boolean isUltimateReceiver = true;
+
+    private MessageIdStrategy messageIdStrategy;
+
+    private WebServiceMessageSender[] messageSenders = new WebServiceMessageSender[0];
+
+    private AddressingVersion[] versions;
+
+    private EndpointInterceptor[] preInterceptors = new EndpointInterceptor[0];
+
+    private EndpointInterceptor[] postInterceptors = new EndpointInterceptor[0];
+
+    private int order = Integer.MAX_VALUE;  // default: same as non-Ordered
+
+
+    /** Protected constructor. Initializes the default settings. */
+    protected AbstractAddressingEndpointMappingHacked() {
+        initDefaultStrategies();
+    }
+
+    /**
+     * 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 final void setActorOrRole(String actorOrRole) {
+        Assert.notNull(actorOrRole, "actorOrRole must not be null");
+        actorsOrRoles = new String[]{actorOrRole};
+    }
+
+    public final void setActorsOrRoles(String[] actorsOrRoles) {
+        Assert.notEmpty(actorsOrRoles, "actorsOrRoles must not be empty");
+        this.actorsOrRoles = actorsOrRoles;
+    }
+
+    public final void setUltimateReceiver(boolean ultimateReceiver) {
+        this.isUltimateReceiver = ultimateReceiver;
+    }
+
+    public final int getOrder() {
+        return order;
+    }
+
+    /**
+     * Specify the order value for this mapping.
+     * <p/>
+     * Default value is {@link Integer#MAX_VALUE}, meaning that it's non-ordered.
+     *
+     * @see org.springframework.core.Ordered#getOrder()
+     */
+    public final void setOrder(int order) {
+        this.order = order;
+    }
+    
+
+    /**
+     * Set additional interceptors to be applied before the implicit WS-Addressing interceptor, e.g.
+     * <code>XwsSecurityInterceptor</code>.
+     */
+    public final void setPreInterceptors(EndpointInterceptor[] preInterceptors) {
+        Assert.notNull(preInterceptors, "'preInterceptors' must not be null");
+        this.preInterceptors = preInterceptors;
+    }
+
+    /**
+     * Set additional interceptors to be applied after the implicit WS-Addressing interceptor, e.g.
+     * <code>PayloadLoggingInterceptor</code>.
+     */
+    public final void setPostInterceptors(EndpointInterceptor[] postInterceptors) {
+        Assert.notNull(postInterceptors, "'postInterceptors' must not be null");
+        this.postInterceptors = postInterceptors;
+    }
+
+    /**
+     * Sets the message id strategy used for creating WS-Addressing MessageIds.
+     * <p/>
+     * By default, the {@link UuidMessageIdStrategy} is used.
+     */
+    public final void setMessageIdStrategy(MessageIdStrategy messageIdStrategy) {
+        Assert.notNull(messageIdStrategy, "'messageIdStrategy' must not be null");
+        this.messageIdStrategy = messageIdStrategy;
+    }
+
+    /**
+     * Sets the single message sender used for sending messages.
+     * <p/>
+     * This message sender will be used to resolve an URI to a
+     * {@link WebServiceConnection}.
+     * 
+     * @see #createConnection(URI)
+     */
+    public void setMessageSender(WebServiceMessageSender messageSender) {
+        Assert.notNull(messageSender, "'messageSender' must not be null");
+        setMessageSenders(new WebServiceMessageSender[] {messageSender});
+    }
+
+    public final void setMessageSenders(WebServiceMessageSender[] messageSenders) {
+        Assert.notNull(messageSenders, "'messageSenders' must not be null");
+        this.messageSenders = messageSenders;
+    }
+
+    public final WebServiceMessageSender[] getMessageSenders() {
+        return this.messageSenders;
+    }
+    /**
+     * Sets the WS-Addressing versions to be supported by this mapping.
+     * <p/>
+     * 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(AddressingVersion[] versions) {
+        this.versions = versions;
+    }
+
+    public void afterPropertiesSet() throws Exception {
+        if (logger.isInfoEnabled()) {
+            logger.info("Supporting " + Arrays.asList(versions));
+        }
+    }
+
+    public final EndpointInvocationChain getEndpoint(MessageContext messageContext) throws TransformerException {
+        Assert.isInstanceOf(SoapMessage.class, messageContext.getRequest());
+        SoapMessage request = (SoapMessage) messageContext.getRequest();
+        for (AddressingVersion version : versions) {
+            if (supports(version, request)) {
+                if (logger.isDebugEnabled()) {
+                    logger.debug("Request [" + request + "] uses [" + version + "]");
+                }
+                MessageAddressingProperties requestMap = version.getMessageAddressingProperties(request);
+                if (requestMap == null) {
+                    return null;
+                }
+                Object endpoint = getEndpointInternal(requestMap);
+                if (endpoint == null) {
+                    return null;
+                }
+                return getEndpointInvocationChain(endpoint, version, requestMap);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * 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,
+                                                               MessageAddressingProperties requestMap) {
+        URI responseAction = getResponseAction(endpoint, requestMap);
+        URI faultAction = getFaultAction(endpoint, requestMap);
+        
+        WebServiceMessageSender[] messageSenders = getMessageSenders(endpoint);
+        MessageIdStrategy messageIdStrategy = getMessageStrategy(endpoint);
+ 
+        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);
+        interceptors[preInterceptors.length] = interceptor;
+        System.arraycopy(postInterceptors, 0, interceptors, preInterceptors.length + 1, postInterceptors.length);
+        return new SoapEndpointInvocationChain(endpoint, interceptors, actorsOrRoles, isUltimateReceiver);
+    }
+
+    private boolean supports(AddressingVersion version, SoapMessage request) {
+        SoapHeader header = request.getSoapHeader();
+        if (header != null) {
+            for (Iterator<SoapHeaderElement> iterator = header.examineAllHeaderElements(); iterator.hasNext();) {
+                SoapHeaderElement headerElement = iterator.next();
+                if (version.understands(headerElement)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+    
+    
+    /**
+     * Default implementation
+     * 
+     * @param endpoint specific message strategy
+     * @return
+     */
+    protected MessageIdStrategy getMessageStrategy(Object endpoint) {
+        return this.messageIdStrategy;
+    }
+
+    /**
+     * Default implementation
+     * 
+     * @param endpoint
+     * @return endpoint specific message senders
+     */
+    protected WebServiceMessageSender[] getMessageSenders(Object endpoint) {
+        return this.messageSenders;
+    }
+
+    /**
+     * Lookup an endpoint for the given  {@link MessageAddressingProperties}, returning <code>null</code> if no specific
+     * one is found. This template method is called by {@link #getEndpoint(MessageContext)}.
+     *
+     * @param map the message addressing properties
+     * @return the endpoint, or <code>null</code>
+     */
+    protected abstract Object getEndpointInternal(MessageAddressingProperties map);
+
+    /**
+     * Provides the WS-Addressing Action for response messages, given the endpoint, and request Message Addressing
+     * Properties.
+     *
+     * @param endpoint   the mapped endpoint
+     * @param requestMap the MAP for the request
+     * @return the response Action
+     */
+    protected abstract URI getResponseAction(Object endpoint, MessageAddressingProperties requestMap);
+
+    /**
+     * Provides the WS-Addressing Action for response fault messages, given the endpoint, and request Message Addressing
+     * Properties.
+     *
+     * @param endpoint   the mapped endpoint
+     * @param requestMap the MAP for the request
+     * @return the response Action
+     */
+    protected abstract URI getFaultAction(Object endpoint, MessageAddressingProperties requestMap);
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/02763a53/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractConsumerTests.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractConsumerTests.java b/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractConsumerTests.java
index eee9697..a011303 100644
--- a/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractConsumerTests.java
+++ b/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractConsumerTests.java
@@ -27,10 +27,8 @@ import org.springframework.ws.soap.client.SoapFaultClientException;
 /**
  * Provides abstract test for fault and output params for spring-ws:to: and
  * spring-ws:action: endpoints
- * 
- * @author a.zachar
  */
-public abstract class AbstractConsumerTests extends AbstractWSATests {
+public abstract class AbstractConsumerTests extends AbstractWSATests {
 
     @Test
     public void defaultAction4ouput() throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/02763a53/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractWSATests.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractWSATests.java b/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractWSATests.java
index ee3d983..705d382 100644
--- a/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractWSATests.java
+++ b/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractWSATests.java
@@ -1,204 +1,202 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.apache.camel.component.spring.ws.addressing;
-
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.apache.camel.component.spring.ws.utils.OutputChannelReceiver;
-import org.apache.camel.component.spring.ws.utils.TestUtil;
-import org.apache.camel.test.spring.CamelSpringTestSupport;
-import org.junit.After;
-import org.junit.Before;
-import org.springframework.ws.client.core.WebServiceTemplate;
-import org.springframework.ws.soap.SoapMessage;
-import org.springframework.ws.soap.addressing.client.ActionCallback;
-import org.springframework.ws.soap.addressing.core.EndpointReference;
-import org.springframework.ws.soap.addressing.core.MessageAddressingProperties;
-import org.springframework.ws.soap.addressing.version.Addressing10;
-
-/**
- * Provides abstract test for WS-Addressing
- * 
- * @author a.zachar
- */
-public abstract class AbstractWSATests extends CamelSpringTestSupport {
-
-    protected WebServiceTemplate webServiceTemplate;
-    protected OutputChannelReceiver response;
-    protected OutputChannelReceiver newReply;
-    protected StreamSource source;
-    protected StreamResult result;
-
-    private final String xmlBody = "<GetQuote xmlns=\"http://www.webserviceX.NET/\"><symbol>GOOG</symbol></GetQuote>";
-    private String requestInputAction;
-    
-    @Before
-    public void setUp() throws Exception {
-        super.setUp();
-        // initialize beans for catching results
-        webServiceTemplate = applicationContext.getBean("webServiceTemplate", WebServiceTemplate.class);
-        newReply = getMandatoryBean(OutputChannelReceiver.class, "replyReceiver");
-        response = getMandatoryBean(OutputChannelReceiver.class, "responseReceiver");
-
-        // sample data
-        source = new StreamSource(new StringReader(xmlBody));
-        result = new StreamResult(new StringWriter());
-
-        // reset from previous test
-        response.clear();
-        newReply.clear();
-        requestInputAction = null;
-    }
-
-    @After
-    public void after() throws Exception {
-        assertNotNull(result);
-    }
-
-    /**
-     * Creates WS-Addressing Action and ReplyTo param for request
-     * 
-     * @param action
-     * @param replyTo
-     * @return
-     * @throws URISyntaxException
-     */
-    protected final ActionCallback actionAndReplyTo(String action, String replyTo) throws URISyntaxException {
-        requestInputAction = action;
-        ActionCallback requestCallback = new ActionCallback(action);
-        if (replyTo != null) {
-            requestCallback.setReplyTo(new EndpointReference(new URI(replyTo)));
-        }
-        return requestCallback;
-    }
-
-    /**
-     * Creates WS-Addressing Action param for request
-     * 
-     * @param action
-     * @param replyTo
-     * @return
-     * @throws URISyntaxException
-     */
-    protected final ActionCallback action(String action) throws URISyntaxException {
-        return actionAndReplyTo(action, null);
-    }
-
-    /**
-     * Creates WS-Addressing To and ReplyTo param for request
-     * 
-     * @param action
-     * @param replyTo
-     * @return
-     * @throws URISyntaxException
-     */
-    protected final ActionCallback toAndReplyTo(String to, String replyTo) throws URISyntaxException {
-        requestInputAction = "http://doesn-not-matter.com";
-        ActionCallback requestCallback = new ActionCallback(new URI(requestInputAction), new Addressing10(), new URI(to));
-        if (replyTo != null) {
-            requestCallback.setReplyTo(new EndpointReference(new URI(replyTo)));
-        }
-        return requestCallback;
-    }
-
-    /**
-     * Creates WS-Addressing To param for request
-     * 
-     * @param action
-     * @param replyTo
-     * @return
-     * @throws URISyntaxException
-     */
-    protected final ActionCallback to(String to) throws URISyntaxException {
-        return toAndReplyTo(to, null);
-    }
-
-    /**
-     * Construct a default action for the response message from the input
-     * message using the default response action suffix.
-     * 
-     * @return
-     * @throws URISyntaxException
-     */
-    protected URI getDefaultResponseAction() throws URISyntaxException {
-        return new URI(requestInputAction + "Response");
-    }
-
-    /**
-     * Only response is allow using a brand new channel
-     * 
-     * @return
-     */
-
-    protected final MessageAddressingProperties newChannelParams() {
-        assertNotNull(newReply);
-        assertNotNull(newReply.getMessageContext());
-        SoapMessage request = (SoapMessage)newReply.getMessageContext().getRequest();
-        assertNotNull(request);
-
-        MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties(request);
-        assertNotNull(wsaProperties);
-        assertNotNull(wsaProperties.getTo());
-        return wsaProperties;
-    }
-
-    /**
-     * Only response is allow using same channel
-     * 
-     * @return
-     */
-    protected final MessageAddressingProperties sameChannelParams() {
-        // we expect the same channel reply
-        assertNull(newReply.getMessageContext());
-
-        assertNotNull(response);
-        assertNotNull(response.getMessageContext());
-
-        SoapMessage soapResponse = (SoapMessage)response.getMessageContext().getResponse();
-        assertNotNull(soapResponse);
-
-        MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties(soapResponse);
-        assertNotNull(wsaProperties);
-        return wsaProperties;
-    }
-
-    /**
-     * Provides such an ActionCallback that sets the WS-Addressing param replyTo
-     * or doesn't set WS-Addressing param replyTo. In other words it cause
-     * response to be return using new or same channel as the request.
-     * 
-     * @param action
-     * @return
-     * @throws URISyntaxException
-     */
-    abstract ActionCallback channelIn(String action) throws URISyntaxException;
-
-    /**
-     * Provide corresponding results based on channel input. These two abstract
-     * methods (channelIn and channelOut)are bind together tighly.
-     * 
-     * @return
-     */
-    abstract MessageAddressingProperties channelOut();
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.spring.ws.addressing;
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.camel.component.spring.ws.utils.OutputChannelReceiver;
+import org.apache.camel.component.spring.ws.utils.TestUtil;
+import org.apache.camel.test.spring.CamelSpringTestSupport;
+import org.junit.After;
+import org.junit.Before;
+import org.springframework.ws.client.core.WebServiceTemplate;
+import org.springframework.ws.soap.SoapMessage;
+import org.springframework.ws.soap.addressing.client.ActionCallback;
+import org.springframework.ws.soap.addressing.core.EndpointReference;
+import org.springframework.ws.soap.addressing.core.MessageAddressingProperties;
+import org.springframework.ws.soap.addressing.version.Addressing10;
+
+/**
+ * Provides abstract test for WS-Addressing
+ */
+public abstract class AbstractWSATests extends CamelSpringTestSupport {
+
+    protected WebServiceTemplate webServiceTemplate;
+    protected OutputChannelReceiver response;
+    protected OutputChannelReceiver newReply;
+    protected StreamSource source;
+    protected StreamResult result;
+
+    private final String xmlBody = "<GetQuote xmlns=\"http://www.webserviceX.NET/\"><symbol>GOOG</symbol></GetQuote>";
+    private String requestInputAction;
+    
+    @Before
+    public void setUp() throws Exception {
+        super.setUp();
+        // initialize beans for catching results
+        webServiceTemplate = applicationContext.getBean("webServiceTemplate", WebServiceTemplate.class);
+        newReply = getMandatoryBean(OutputChannelReceiver.class, "replyReceiver");
+        response = getMandatoryBean(OutputChannelReceiver.class, "responseReceiver");
+
+        // sample data
+        source = new StreamSource(new StringReader(xmlBody));
+        result = new StreamResult(new StringWriter());
+
+        // reset from previous test
+        response.clear();
+        newReply.clear();
+        requestInputAction = null;
+    }
+
+    @After
+    public void after() throws Exception {
+        assertNotNull(result);
+    }
+
+    /**
+     * Creates WS-Addressing Action and ReplyTo param for request
+     * 
+     * @param action
+     * @param replyTo
+     * @return
+     * @throws URISyntaxException
+     */
+    protected final ActionCallback actionAndReplyTo(String action, String replyTo) throws URISyntaxException {
+        requestInputAction = action;
+        ActionCallback requestCallback = new ActionCallback(action);
+        if (replyTo != null) {
+            requestCallback.setReplyTo(new EndpointReference(new URI(replyTo)));
+        }
+        return requestCallback;
+    }
+
+    /**
+     * Creates WS-Addressing Action param for request
+     * 
+     * @param action
+     * @param replyTo
+     * @return
+     * @throws URISyntaxException
+     */
+    protected final ActionCallback action(String action) throws URISyntaxException {
+        return actionAndReplyTo(action, null);
+    }
+
+    /**
+     * Creates WS-Addressing To and ReplyTo param for request
+     * 
+     * @param action
+     * @param replyTo
+     * @return
+     * @throws URISyntaxException
+     */
+    protected final ActionCallback toAndReplyTo(String to, String replyTo) throws URISyntaxException {
+        requestInputAction = "http://doesn-not-matter.com";
+        ActionCallback requestCallback = new ActionCallback(new URI(requestInputAction), new Addressing10(), new URI(to));
+        if (replyTo != null) {
+            requestCallback.setReplyTo(new EndpointReference(new URI(replyTo)));
+        }
+        return requestCallback;
+    }
+
+    /**
+     * Creates WS-Addressing To param for request
+     * 
+     * @param action
+     * @param replyTo
+     * @return
+     * @throws URISyntaxException
+     */
+    protected final ActionCallback to(String to) throws URISyntaxException {
+        return toAndReplyTo(to, null);
+    }
+
+    /**
+     * Construct a default action for the response message from the input
+     * message using the default response action suffix.
+     * 
+     * @return
+     * @throws URISyntaxException
+     */
+    protected URI getDefaultResponseAction() throws URISyntaxException {
+        return new URI(requestInputAction + "Response");
+    }
+
+    /**
+     * Only response is allow using a brand new channel
+     * 
+     * @return
+     */
+
+    protected final MessageAddressingProperties newChannelParams() {
+        assertNotNull(newReply);
+        assertNotNull(newReply.getMessageContext());
+        SoapMessage request = (SoapMessage)newReply.getMessageContext().getRequest();
+        assertNotNull(request);
+
+        MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties(request);
+        assertNotNull(wsaProperties);
+        assertNotNull(wsaProperties.getTo());
+        return wsaProperties;
+    }
+
+    /**
+     * Only response is allow using same channel
+     * 
+     * @return
+     */
+    protected final MessageAddressingProperties sameChannelParams() {
+        // we expect the same channel reply
+        assertNull(newReply.getMessageContext());
+
+        assertNotNull(response);
+        assertNotNull(response.getMessageContext());
+
+        SoapMessage soapResponse = (SoapMessage)response.getMessageContext().getResponse();
+        assertNotNull(soapResponse);
+
+        MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties(soapResponse);
+        assertNotNull(wsaProperties);
+        return wsaProperties;
+    }
+
+    /**
+     * Provides such an ActionCallback that sets the WS-Addressing param replyTo
+     * or doesn't set WS-Addressing param replyTo. In other words it cause
+     * response to be return using new or same channel as the request.
+     * 
+     * @param action
+     * @return
+     * @throws URISyntaxException
+     */
+    abstract ActionCallback channelIn(String action) throws URISyntaxException;
+
+    /**
+     * Provide corresponding results based on channel input. These two abstract
+     * methods (channelIn and channelOut)are bind together tighly.
+     * 
+     * @return
+     */
+    abstract MessageAddressingProperties channelOut();
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/02763a53/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/CamelDirectSenderTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/CamelDirectSenderTest.java b/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/CamelDirectSenderTest.java
index 7298022..264984e 100644
--- a/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/CamelDirectSenderTest.java
+++ b/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/CamelDirectSenderTest.java
@@ -1,145 +1,143 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.apache.camel.component.spring.ws.addressing;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.component.spring.ws.utils.OutputChannelReceiver;
-import org.apache.camel.component.spring.ws.utils.TestUtil;
-import org.fest.assertions.Assertions;
-import org.junit.Before;
-import org.junit.Test;
-import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.ws.soap.SoapMessage;
-import org.springframework.ws.soap.addressing.client.ActionCallback;
-import org.springframework.ws.soap.addressing.core.MessageAddressingProperties;
-
-/**
- * Provides abstract test for fault and output params for spring-ws:to: and
- * spring-ws:action: endpoints
- * 
- * @author a.zachar
- */
-public class CamelDirectSenderTest extends AbstractWSATests {
-
-    private OutputChannelReceiver customChannel;
-
-    @EndpointInject(uri = "mock:camelDirect")
-    private MockEndpoint endpointCamelDirect;
-
-    @Before
-    public void setUp() throws Exception {
-        super.setUp();
-        // initialize beans for catching results
-        customChannel = getMandatoryBean(OutputChannelReceiver.class, "customReceiver");
-        customChannel.clear();
-    }
-
-    /**
-     * Only response is allow using a brand custom channel
-     * 
-     * @return
-     */
-
-    private MessageAddressingProperties customChannelParams() {
-        assertNotNull(customChannel);
-        assertNotNull(customChannel.getMessageContext());
-        SoapMessage request = (SoapMessage)customChannel.getMessageContext().getRequest();
-        assertNotNull(request);
-
-        MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties(request);
-        assertNotNull(wsaProperties);
-        assertNotNull(wsaProperties.getTo());
-        return wsaProperties;
-    }
-
-    @Override
-    public ActionCallback channelIn(String actionUri) throws URISyntaxException {
-        // new channel
-        return toAndReplyTo(actionUri, "mailto:andrej@chocolatejar.eu");
-    }
-
-    @Override
-    public MessageAddressingProperties channelOut() {
-        return newChannelParams();
-    }
-
-    @Test
-    public void endpointSender() throws Exception {
-        ActionCallback requestCallback = channelIn("http://sender-default.com");
-
-        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
-
-        Assertions.assertThat(channelOut().getTo()).isEqualTo(new URI("mailto:andrej@chocolatejar.eu"));
-        Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
-    }
-
-    @Test
-    public void customSender() throws Exception {
-        ActionCallback requestCallback = channelIn("http://sender-custom.com");
-
-        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
-
-        Assertions.assertThat(customChannelParams().getTo()).isEqualTo(new URI("mailto:andrej@chocolatejar.eu"));
-        Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
-    }
-
-    @Test
-    public void camelInvalid() throws Exception {
-        ActionCallback requestCallback = toAndReplyTo("http://sender-camel.com", "mailto:not-mappped-address@chocolatejar.eu");
-
-        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
-        Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
-    }
-
-    @Test
-    public void camelReceivedReplyTo() throws Exception {
-        ActionCallback requestCallback = channelIn("http://sender-camel.com");
-
-        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
-        endpointCamelDirect.assertExchangeReceived(0);
-        endpointCamelDirect.assertIsSatisfied();
-    }
-    
-    @Test
-    public void customMessageIdGenerator() throws Exception {
-        ActionCallback requestCallback = channelIn("http://messageIdStrategy-custom.com");
-        
-        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
-        
-        Assertions.assertThat(channelOut().getMessageId()).isEqualTo(new URI("staticTestId"));
-    }
-    
-    @Test
-    public void defaultMessageIdGenerator() throws Exception {
-        ActionCallback requestCallback = channelIn("http://messageIdStrategy-default.com");
-        
-        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
-        
-        Assertions.assertThat(channelOut().getMessageId()).isNotEqualTo(new URI("staticTestId"));
-    }
-
-    @Override
-    protected AbstractXmlApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext(new String[] {"org/apache/camel/component/spring/ws/addresing/CamelDirectSenderTest-context.xml"});
-    }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.component.spring.ws.addressing;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.component.spring.ws.utils.OutputChannelReceiver;
+import org.apache.camel.component.spring.ws.utils.TestUtil;
+import org.fest.assertions.Assertions;
+import org.junit.Before;
+import org.junit.Test;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.ws.soap.SoapMessage;
+import org.springframework.ws.soap.addressing.client.ActionCallback;
+import org.springframework.ws.soap.addressing.core.MessageAddressingProperties;
+
+/**
+ * Provides abstract test for fault and output params for spring-ws:to: and
+ * spring-ws:action: endpoints
+ */
+public class CamelDirectSenderTest extends AbstractWSATests {
+
+    private OutputChannelReceiver customChannel;
+
+    @EndpointInject(uri = "mock:camelDirect")
+    private MockEndpoint endpointCamelDirect;
+
+    @Before
+    public void setUp() throws Exception {
+        super.setUp();
+        // initialize beans for catching results
+        customChannel = getMandatoryBean(OutputChannelReceiver.class, "customReceiver");
+        customChannel.clear();
+    }
+
+    /**
+     * Only response is allow using a brand custom channel
+     * 
+     * @return
+     */
+
+    private MessageAddressingProperties customChannelParams() {
+        assertNotNull(customChannel);
+        assertNotNull(customChannel.getMessageContext());
+        SoapMessage request = (SoapMessage)customChannel.getMessageContext().getRequest();
+        assertNotNull(request);
+
+        MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties(request);
+        assertNotNull(wsaProperties);
+        assertNotNull(wsaProperties.getTo());
+        return wsaProperties;
+    }
+
+    @Override
+    public ActionCallback channelIn(String actionUri) throws URISyntaxException {
+        // new channel
+        return toAndReplyTo(actionUri, "mailto:andrej@chocolatejar.eu");
+    }
+
+    @Override
+    public MessageAddressingProperties channelOut() {
+        return newChannelParams();
+    }
+
+    @Test
+    public void endpointSender() throws Exception {
+        ActionCallback requestCallback = channelIn("http://sender-default.com");
+
+        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
+
+        Assertions.assertThat(channelOut().getTo()).isEqualTo(new URI("mailto:andrej@chocolatejar.eu"));
+        Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
+    }
+
+    @Test
+    public void customSender() throws Exception {
+        ActionCallback requestCallback = channelIn("http://sender-custom.com");
+
+        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
+
+        Assertions.assertThat(customChannelParams().getTo()).isEqualTo(new URI("mailto:andrej@chocolatejar.eu"));
+        Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
+    }
+
+    @Test
+    public void camelInvalid() throws Exception {
+        ActionCallback requestCallback = toAndReplyTo("http://sender-camel.com", "mailto:not-mappped-address@chocolatejar.eu");
+
+        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
+        Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
+    }
+
+    @Test
+    public void camelReceivedReplyTo() throws Exception {
+        ActionCallback requestCallback = channelIn("http://sender-camel.com");
+
+        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
+        endpointCamelDirect.assertExchangeReceived(0);
+        endpointCamelDirect.assertIsSatisfied();
+    }
+    
+    @Test
+    public void customMessageIdGenerator() throws Exception {
+        ActionCallback requestCallback = channelIn("http://messageIdStrategy-custom.com");
+        
+        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
+        
+        Assertions.assertThat(channelOut().getMessageId()).isEqualTo(new URI("staticTestId"));
+    }
+    
+    @Test
+    public void defaultMessageIdGenerator() throws Exception {
+        ActionCallback requestCallback = channelIn("http://messageIdStrategy-default.com");
+        
+        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
+        
+        Assertions.assertThat(channelOut().getMessageId()).isNotEqualTo(new URI("staticTestId"));
+    }
+
+    @Override
+    protected AbstractXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext(new String[] {"org/apache/camel/component/spring/ws/addresing/CamelDirectSenderTest-context.xml"});
+    }
+
+}