Author: amilas
Date: Tue Mar 31 07:58:26 2009
New Revision: 760356
URL: http://svn.apache.org/viewvc?rev=760356&view=rev
Log:
removing transport headers if the transport is mail
Modified:
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java
Modified:
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java?rev=760356&r1=760355&r2=760356&view=diff
==============================================================================
---
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java
(original)
+++
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java
Tue Mar 31 07:58:26 2009
@@ -116,6 +116,17 @@
//says that the inbound msg of this was a LastMessage -
so the new msg will also be a LastMessage
outMessageContext.setProperty(Sandesha2Constants.MessageContextProperties.INBOUND_LAST_MESSAGE,
Boolean.TRUE);
outMessageContext.setProperty(RequestResponseTransport.TRANSPORT_CONTROL,
msgContext.getProperty(RequestResponseTransport.TRANSPORT_CONTROL));
+
+ // when sending mail messages mail transport first
check whether the "TO" header
+ // is present in the headers and if present use it.
+ // "TO" header of the incomming message actually
represents the server itself. this causes
+ // reply to send to the servers mail address again.
+ // but if there is not transport headers it get the
outtransport info target address.
+ if (msgContext.isServerSide()
+ && (msgContext.getTransportIn() != null)
+ &&
(msgContext.getTransportIn().getName().equals(Constants.TRANSPORT_MAIL))){
+
outMessageContext.setProperty(MessageContext.TRANSPORT_HEADERS, null);
+ }
AxisEngine.send(outMessageContext);
TransportUtils.setResponseWritten(msgContext, true);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]