1
2
3
4
5
6
7
8
9
10
11 package org.mule.example.echo;
12
13 import org.mule.api.MuleMessage;
14 import org.mule.module.client.MuleClient;
15 import org.mule.transport.NullPayload;
16
17 import java.util.HashMap;
18 import java.util.Map;
19
20 import org.custommonkey.xmlunit.XMLAssert;
21
22
23
24
25 public class CxfEchoTestCase extends AbstractEchoTestCase
26 {
27 public void testGetEcho() throws Exception
28 {
29
30
31
32 MuleClient client = new MuleClient();
33 Map<String, String> props = new HashMap<String, String>();
34 props.put("http.method", "GET");
35 MuleMessage result = client.send("http://localhost:65082/services/EchoUMO/echo/text/hello", "", props);
36 assertNotNull(result);
37 assertFalse(result.getPayload() instanceof NullPayload);
38 XMLAssert.assertXMLEqual(expectedGetResponse, result.getPayloadAsString());
39 }
40
41 public void testPostEcho() throws Exception
42 {
43
44 }
45
46 protected String getConfigResources()
47 {
48 return "echo-cxf-config.xml";
49 }
50
51 protected String getExpectedGetResponseResource()
52 {
53 return "echo-cxf-response.xml";
54 }
55
56 protected String getExpectedPostResponseResource()
57 {
58 return "echo-cxf-response.xml";
59 }
60
61 protected String getProtocol()
62 {
63 return "cxf";
64 }
65
66 }