File tree Expand file tree Collapse file tree
main/java/org/apache/synapse/util
test/java/org/apache/synapse/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,6 +238,7 @@ public static org.apache.axis2.context.MessageContext clonePartially(
238238 // do not copy options from the original
239239 newMC .setConfigurationContext (ori .getConfigurationContext ());
240240 newMC .setMessageID (UIDGenerator .generateURNString ());
241+ newMC .setFrom (ori .getFrom ());
241242 newMC .setTo (ori .getTo ());
242243 newMC .setSoapAction (ori .getSoapAction ());
243244
Original file line number Diff line number Diff line change @@ -47,4 +47,15 @@ public void testClonePartiallyWithAttachments() throws Exception {
4747 assertNotNull (dh );
4848 assertEquals ("test" , dh .getContent ());
4949 }
50+
51+ // Test for SYNAPSE-1109
52+ public void testClonePartiallyWithFrom () throws Exception {
53+ String fromValue = "uri://some-from-value" ;
54+ MessageContext origMc = new MessageContext ();
55+ origMc .setFrom (fromValue );
56+ MessageContext newMc = MessageHelper .clonePartially (origMc );
57+ Object result = newMc .getFrom ();
58+ assertEquals (fromValue , result );
59+ }
60+
5061}
You can’t perform that action at this time.
0 commit comments