1
2
3
4
5
6
7
8
9
10
11 package org.mule.test.integration.message;
12
13 import org.mule.api.MuleMessage;
14 import org.mule.module.client.MuleClient;
15 import org.mule.tck.junit4.FunctionalTestCase;
16
17 import org.junit.Test;
18
19 import static org.junit.Assert.assertEquals;
20
21
22
23
24
25 public class MessagePropertyInResponseTransformersTestCase extends FunctionalTestCase
26 {
27
28 @Override
29 protected String getConfigResources()
30 {
31 return "org/mule/test/integration/messaging/message-property-in-response-transformers.xml";
32 }
33
34 @Test
35 public void testSend() throws Exception
36 {
37 MuleClient client = new MuleClient(muleContext);
38 MuleMessage result = client.send("http://localhost:63081/ser",
39 "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sim=\"http://simple.component.mule.org/\"><soapenv:Header/><soapenv:Body><sim:echo><sim:echo>aaa</sim:echo></sim:echo></soapenv:Body></soapenv:Envelope>", null);
40 assertEquals(
41 "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root xmlns=\"http://simple.component.mule.org/\"><testval>bar</testval></root>",
42 result.getPayloadAsString());
43 }
44 }