Author: asankha
Date: Tue Nov 20 04:07:40 2007
New Revision: 596639

URL: http://svn.apache.org/viewvc?rev=596639&view=rev
Log:
Add a simple callout mediator
initialize anonymous sequences within iterate mediator
keep direction when cloning messages

Added:
    
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorFactory.java
    
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorSerializer.java
    
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CalloutMediator.java
Modified:
    
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/AbstractMediatorFactory.java
    
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorFactoryFinder.java
    
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorSerializerFinder.java
    
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/eip/splitter/IterateMediator.java
    
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/util/MessageHelper.java

Modified: 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/AbstractMediatorFactory.java
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/AbstractMediatorFactory.java?rev=596639&r1=596638&r2=596639&view=diff
==============================================================================
--- 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/AbstractMediatorFactory.java
 (original)
+++ 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/AbstractMediatorFactory.java
 Tue Nov 20 04:07:40 2007
@@ -38,7 +38,8 @@
     protected static final QName ATT_REGEX   = new QName("regex");
     protected static final QName ATT_EXPRN   = new QName("expression");
     protected static final QName ATT_KEY     = new QName("key");
-    protected static final QName ATT_SOURCE  = new QName("source");    
+    protected static final QName ATT_SOURCE  = new QName("source");
+    protected static final QName ATT_TARGET  = new QName("target");
     protected static final QName ATT_ONERROR = new QName("onError");
     protected static final QName ATT_STATS
         = new QName(XMLConfigConstants.STATISTICS_ATTRIB_NAME);

Added: 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorFactory.java
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorFactory.java?rev=596639&view=auto
==============================================================================
--- 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorFactory.java
 (added)
+++ 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorFactory.java
 Tue Nov 20 04:07:40 2007
@@ -0,0 +1,103 @@
+/*
+ *  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.synapse.config.xml;
+
+import org.apache.synapse.Mediator;
+import org.apache.synapse.mediators.builtin.CalloutMediator;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMAttribute;
+import org.jaxen.JaxenException;
+
+import javax.xml.namespace.QName;
+
+/**
+ * <callout serviceURL="string" [action="string"]>
+ *      <source xpath="expression" | key="string">
+ *      <target xpath="expression" | key="string"/>
+ * </callout>
+ */
+public class CalloutMediatorFactory extends AbstractMediatorFactory {
+
+    private static final QName TAG_NAME = new 
QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "callout");
+    private static final QName ATT_URL = new QName("serviceURL");
+    private static final QName ATT_ACTION = new QName("action");
+    private static final QName Q_SOURCE = new 
QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "source");
+    private static final QName Q_TARGET = new 
QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "target");
+
+    public Mediator createMediator(OMElement elem) {
+
+        CalloutMediator callout = new CalloutMediator();
+
+        OMAttribute attServiceURL = elem.getAttribute(ATT_URL);
+        OMAttribute attAction     = elem.getAttribute(ATT_ACTION);
+        OMElement   sourceElt     = elem.getFirstChildWithName(Q_SOURCE);
+        OMElement   targetElt     = elem.getFirstChildWithName(Q_TARGET);
+
+        if (attServiceURL != null) {
+            callout.setServiceURL(attServiceURL.getAttributeValue());
+        } else {
+            handleException("The 'serviceURL' attribute is required for the 
Callout mediator");
+        }
+
+        if (attAction != null) {
+            callout.setAction(attAction.getAttributeValue());
+        }
+
+        if (sourceElt != null) {
+            if (sourceElt.getAttribute(ATT_XPATH) != null) {
+                try {
+                    
callout.setRequestXPathString(sourceElt.getAttributeValue(ATT_XPATH));
+                    OMElementUtils.addNameSpaces(callout.getRequestXPath(), 
sourceElt, log);
+                } catch (JaxenException e) {
+                    handleException("Invalid source XPath : " + 
sourceElt.getAttributeValue(ATT_XPATH));
+                }
+            } else if (sourceElt.getAttribute(ATT_KEY) != null) {
+                callout.setRequestKey(sourceElt.getAttributeValue(ATT_KEY));
+            } else {
+                handleException("A 'xpath' or 'key' attribute is required for 
the Callout 'source'");
+            }
+        } else {
+            handleException("The message 'source' must be specified for a 
Callout mediator");
+        }
+
+        if (targetElt != null) {
+            if (targetElt.getAttribute(ATT_XPATH) != null) {
+                try {
+                    
callout.setTargetXPathString(targetElt.getAttributeValue(ATT_XPATH));
+                    OMElementUtils.addNameSpaces(callout.getTargetXPath(), 
targetElt, log);
+                } catch (JaxenException e) {
+                    handleException("Invalid target XPath : " + 
targetElt.getAttributeValue(ATT_XPATH));
+                }
+            } else if (targetElt.getAttribute(ATT_KEY) != null) {
+                callout.setTargetKey(targetElt.getAttributeValue(ATT_KEY));
+            } else {
+                handleException("A 'xpath' or 'key' attribute is required for 
the Callout 'target'");
+            }
+        } else {
+            handleException("The message 'target' must be specified for a 
Callout mediator");
+        }
+
+        return callout;
+    }
+
+    public QName getTagQName() {
+        return TAG_NAME;
+    }
+}

Added: 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorSerializer.java
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorSerializer.java?rev=596639&view=auto
==============================================================================
--- 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorSerializer.java
 (added)
+++ 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorSerializer.java
 Tue Nov 20 04:07:40 2007
@@ -0,0 +1,76 @@
+/*
+ *  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.synapse.config.xml;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.synapse.Mediator;
+import org.apache.synapse.mediators.builtin.CalloutMediator;
+
+/**
+ * <callout serviceURL="string" [action="string"]>
+ *      <source xpath="expression" | key="string">
+ *      <target xpath="expression" | key="string"/>
+ * </callout>
+ */
+public class CalloutMediatorSerializer extends AbstractMediatorSerializer {
+
+    public OMElement serializeMediator(OMElement parent, Mediator m) {
+
+        if (!(m instanceof CalloutMediator)) {
+            handleException("Unsupported mediator passed in for serialization 
: " + m.getType());
+        }
+
+        CalloutMediator mediator = (CalloutMediator) m;
+        OMElement callout = fac.createOMElement("callout", synNS);
+        saveTracingState(callout, mediator);
+
+        callout.addAttribute(fac.createOMAttribute("serviceURL", nullNS, 
mediator.getServiceURL()));
+        if (mediator.getAction() != null) {
+            callout.addAttribute(fac.createOMAttribute("action", nullNS, 
mediator.getAction()));
+        }
+
+        OMElement source = fac.createOMElement("source", synNS, callout);
+        if (mediator.getRequestXPathString() != null) {
+            source.addAttribute(fac.createOMAttribute(
+                "xpath", nullNS, mediator.getRequestXPathString()));
+        } else if (mediator.getRequestKey() != null) {
+            source.addAttribute(fac.createOMAttribute(
+                "key", nullNS, mediator.getRequestKey()));
+        }
+
+        OMElement target = fac.createOMElement("target", synNS, callout);
+        if (mediator.getRequestXPathString() != null) {
+            target.addAttribute(fac.createOMAttribute(
+                "xpath", nullNS, mediator.getTargetXPathString()));
+        } else if (mediator.getRequestKey() != null) {
+            target.addAttribute(fac.createOMAttribute(
+                "key", nullNS, mediator.getTargetKey()));
+        }
+
+        if (parent != null) {
+            parent.addChild(callout);
+        }
+        return callout;
+    }
+
+    public String getMediatorClassName() {
+        return CalloutMediator.class.getName();
+    }
+}

Modified: 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorFactoryFinder.java
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorFactoryFinder.java?rev=596639&r1=596638&r2=596639&view=diff
==============================================================================
--- 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorFactoryFinder.java
 (original)
+++ 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorFactoryFinder.java
 Tue Nov 20 04:07:40 2007
@@ -68,7 +68,8 @@
         AggregateMediatorFactory.class,
         DBReportMediatorFactory.class,
         DBLookupMediatorFactory.class,
-        CacheMediatorFactory.class
+        CacheMediatorFactory.class,
+        CalloutMediatorFactory.class
     };
 
     private static MediatorFactoryFinder instance = null;

Modified: 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorSerializerFinder.java
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorSerializerFinder.java?rev=596639&r1=596638&r2=596639&view=diff
==============================================================================
--- 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorSerializerFinder.java
 (original)
+++ 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorSerializerFinder.java
 Tue Nov 20 04:07:40 2007
@@ -56,7 +56,8 @@
         AggregateMediatorSerializer.class,
         DBLookupMediatorSerializer.class,
         DBReportMediatorSerializer.class,
-        CacheMediatorSerializer.class
+        CacheMediatorSerializer.class,
+        CalloutMediatorSerializer.class
     };
 
     private static MediatorSerializerFinder instance = null;

Added: 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CalloutMediator.java
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CalloutMediator.java?rev=596639&view=auto
==============================================================================
--- 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CalloutMediator.java
 (added)
+++ 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CalloutMediator.java
 Tue Nov 20 04:07:40 2007
@@ -0,0 +1,241 @@
+/*
+ *  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.synapse.mediators.builtin;
+
+import org.apache.synapse.mediators.AbstractMediator;
+import org.apache.synapse.MessageContext;
+import org.apache.synapse.ManagedLifecycle;
+import org.apache.synapse.SynapseException;
+import org.apache.synapse.util.MessageHelper;
+import org.apache.synapse.core.SynapseEnvironment;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.AxisFault;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMNode;
+import org.apache.axiom.om.xpath.AXIOMXPath;
+import org.jaxen.JaxenException;
+
+import java.util.List;
+
+/**
+ * <callout serviceURL="string" [action="string"]>
+ *      <source xpath="expression" | key="string"> <!-- key can be a MC 
property or entry key -->
+ *      <target xpath="expression" | key="string"/>
+ * </callout>
+ */
+public class CalloutMediator extends AbstractMediator implements 
ManagedLifecycle {
+
+    private ServiceClient sc = null;
+    private String serviceURL = null;
+    private String action = null;
+    private String requestKey = null;
+    private String requestXPathString = null;
+    private AXIOMXPath requestXPath = null;
+    private String targetXPathString = null;
+    private AXIOMXPath targetXPath = null;
+    private String targetKey = null;
+
+    public boolean mediate(MessageContext synCtx) {
+
+        boolean traceOn = isTraceOn(synCtx);
+        boolean traceOrDebugOn = isTraceOrDebugOn(traceOn);
+
+        if (traceOrDebugOn) {
+            traceOrDebug(traceOn, "Start : Callout mediator");
+
+            if (traceOn && trace.isTraceEnabled()) {
+                trace.trace("Message : " + synCtx.getEnvelope());
+            }
+        }
+
+        try {
+            Options options = new Options();
+            options.setTo(new EndpointReference(serviceURL));
+            options.setAction(action);
+            
options.setProperty(AddressingConstants.DISABLE_ADDRESSING_FOR_OUT_MESSAGES, 
Boolean.TRUE);
+            sc.setOptions(options);
+
+            OMElement request = getRequestPayload(synCtx);
+            if (traceOrDebugOn) {
+                traceOrDebug(traceOn, "About to invoke service : " + 
serviceURL +
+                    " with action : " + action);
+                if (traceOn && trace.isTraceEnabled()) {
+                    trace.trace("Request message payload : " + request);
+                }
+            }
+
+            OMElement result = sc.sendReceive(request);
+
+            if (traceOrDebugOn) {
+                if (traceOn && trace.isTraceEnabled()) {
+                    trace.trace("Response payload received : " + result);
+                }
+            }
+
+            if (result != null) {
+                if (targetXPath != null) {
+                    Object o = targetXPath.evaluate(synCtx.getEnvelope());
+
+                    if (o != null && o instanceof OMElement) {
+                        OMNode tgtNode = (OMElement) o;
+                        tgtNode.insertSiblingAfter(result);
+                        tgtNode.detach();
+                    } else if (o != null && o instanceof List && !((List) 
o).isEmpty()) {
+                        OMNode tgtNode = (OMElement) ((List) o).get(0);  // 
Always fetches *only* the first
+                        tgtNode.insertSiblingAfter(result);
+                        tgtNode.detach();
+                    } else {
+                        handleException("Evaluation of target XPath expression 
: " +
+                            targetXPathString + " did not yeild an OMNode", 
synCtx);
+                    }
+                } if (targetKey != null) {
+                    synCtx.setProperty(targetKey, result);
+                }
+            } else {
+                if (traceOrDebugOn) {
+                    traceOrDebug(traceOn, "Service returned a null response");
+                }
+            }
+
+        } catch (Exception e) {
+            handleException("Error invoking service : " + serviceURL + " with 
action : " + action, e, synCtx);
+        }
+
+        if (traceOrDebugOn) {
+            traceOrDebug(traceOn, "End : Callout mediator");
+        }
+        return true;
+    }
+
+    private OMElement getRequestPayload(MessageContext synCtx) throws 
AxisFault {
+
+        if (requestKey != null) {
+            Object request = synCtx.getProperty(requestKey);
+            if (request == null) {
+                request = synCtx.getEntry(requestKey);
+            }
+            if (request != null && request instanceof OMElement) {
+                return (OMElement) request;
+            } else {
+                handleException("The property : " + requestKey + " is not an 
OMElement", synCtx);
+            }
+        } else if (requestXPath != null) {
+            try {
+                Object o = null;
+                o = requestXPath.evaluate(
+                    MessageHelper.cloneMessageContext(synCtx).getEnvelope());
+
+                if (o instanceof OMElement) {
+                    return (OMElement) o;
+                } else if (o instanceof List && !((List) o).isEmpty()) {
+                    return (OMElement) ((List) o).get(0);  // Always fetches 
*only* the first
+                } else {
+                    handleException("The evaluation of the XPath expression : "
+                        + requestXPathString + " did not result in an 
OMElement", synCtx);
+                }
+            } catch (JaxenException e) {
+                handleException("Error evaluating XPath expression : " + 
requestXPathString, e, synCtx);
+            }
+        }
+        return null;
+    }
+
+    public void init(SynapseEnvironment synEnv) {
+        try {
+            ConfigurationContext cfgCtx =
+                
ConfigurationContextFactory.createConfigurationContextFromFileSystem(
+                    "./samples/axis2Client/client_repo", 
"./samples/axis2Client/client_repo/conf/axis2.xml");
+            sc = new ServiceClient(cfgCtx, null);
+        } catch (AxisFault e) {
+            String msg = "Error initializing callout mediator : " + 
e.getMessage();
+            log.error(msg, e);
+            throw new SynapseException(msg, e);
+        }
+    }
+
+    public void destroy() {
+        try {
+            sc.cleanup();
+        } catch (AxisFault ignore) {}
+    }
+
+    public String getServiceURL() {
+        return serviceURL;
+    }
+
+    public void setServiceURL(String serviceURL) {
+        this.serviceURL = serviceURL;
+    }
+
+    public String getAction() {
+        return action;
+    }
+
+    public void setAction(String action) {
+        this.action = action;
+    }
+
+    public String getRequestKey() {
+        return requestKey;
+    }
+
+    public void setRequestKey(String requestKey) {
+        this.requestKey = requestKey;
+    }
+
+    public String getRequestXPathString() {
+        return requestXPathString;
+    }
+
+    public void setRequestXPathString(String requestXPathString) throws 
JaxenException {
+        this.requestXPathString = requestXPathString;
+        this.requestXPath = new AXIOMXPath(requestXPathString);
+    }
+
+    public String getTargetXPathString() {
+        return targetXPathString;
+    }
+
+    public void setTargetXPathString(String targetXPathString) throws 
JaxenException {
+        this.targetXPathString = targetXPathString;
+        this.targetXPath = new AXIOMXPath(targetXPathString);
+    }
+
+    public String getTargetKey() {
+        return targetKey;
+    }
+
+    public void setTargetKey(String targetKey) {
+        this.targetKey = targetKey;
+    }
+
+    public AXIOMXPath getRequestXPath() {
+        return requestXPath;
+    }
+
+    public AXIOMXPath getTargetXPath() {
+        return targetXPath;
+    }
+}

Modified: 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/eip/splitter/IterateMediator.java
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/eip/splitter/IterateMediator.java?rev=596639&r1=596638&r2=596639&view=diff
==============================================================================
--- 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/eip/splitter/IterateMediator.java
 (original)
+++ 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/eip/splitter/IterateMediator.java
 Tue Nov 20 04:07:40 2007
@@ -24,7 +24,9 @@
 import org.apache.synapse.mediators.eip.Target;
 import org.apache.synapse.mediators.eip.EIPConstants;
 import org.apache.synapse.MessageContext;
+import org.apache.synapse.ManagedLifecycle;
 import org.apache.synapse.core.axis2.Axis2MessageContext;
+import org.apache.synapse.core.SynapseEnvironment;
 import org.apache.synapse.util.MessageHelper;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.om.xpath.AXIOMXPath;
@@ -41,7 +43,7 @@
 /**
  * This mediator will split the message in the criterian specified to it and 
inject in to Synapse
  */
-public class IterateMediator extends AbstractMediator {
+public class IterateMediator extends AbstractMediator implements 
ManagedLifecycle {
 
     /**
      * This holds whether to continue mediation on the parent message or not
@@ -235,4 +237,15 @@
         this.target = target;
     }
 
+    public void init(SynapseEnvironment se) {
+        if (target.getSequence() != null) {
+            target.getSequence().init(se);
+        }
+    }
+
+    public void destroy() {
+        if (target.getSequence() != null) {
+            target.getSequence().destroy();
+        }
+    }
 }

Modified: 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/util/MessageHelper.java
URL: 
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/util/MessageHelper.java?rev=596639&r1=596638&r2=596639&view=diff
==============================================================================
--- 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/util/MessageHelper.java
 (original)
+++ 
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/util/MessageHelper.java
 Tue Nov 20 04:07:40 2007
@@ -62,6 +62,7 @@
         newCtx.setReplyTo(synCtx.getReplyTo());
         newCtx.setSoapAction(synCtx.getSoapAction());
         newCtx.setWSAAction(synCtx.getWSAAction());
+        newCtx.setResponse(synCtx.isResponse());
 
         // copy all the synapse level properties to the newCtx
         for (Object o : synCtx.getPropertyKeySet()) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to