1
2
3
4
5
6
7
8
9
10
11 package org.mule.transport.cxf.client;
12
13 import org.mule.api.MuleMessage;
14 import org.mule.module.client.MuleClient;
15 import org.mule.tck.FunctionalTestCase;
16
17 public class GeneratedClientTestCase extends FunctionalTestCase
18 {
19 public void testEchoService() throws Exception
20 {
21
22
23
24
25
26 String msg = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
27 + "<soap:Body>" + "<test> foo </test>" + "</soap:Body>" + "</soap:Envelope>";
28
29 MuleClient client = new MuleClient();
30 MuleMessage result = client.send("http://localhost:63081/services/Echo", msg, null);
31 byte[] res = (byte[]) result.getPayload();
32 String resString = new String(res);
33
34 assertTrue(resString.indexOf("<test> foo </test>") != -1);
35 }
36
37 protected String getConfigResources()
38 {
39 return "proxy-conf.xml";
40 }
41
42 }