1   /*
2    * $Id: CxfJaxWsTestCase.java 12198 2008-06-28 19:54:14Z dandiep $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.transport.cxf.jaxws;
12  
13  import org.mule.api.MuleMessage;
14  import org.mule.module.client.MuleClient;
15  import org.mule.tck.FunctionalTestCase;
16  import org.mule.transport.NullPayload;
17  
18  public class CxfJaxWsTestCase extends FunctionalTestCase
19  {
20      public void testEchoService() throws Exception
21      {
22          MuleClient client = new MuleClient();
23          MuleMessage result = client.send("cxf:http://localhost:63081/services/Echo?method=echo", "Hello!",
24              null);
25          assertEquals("Hello!", result.getPayload());
26      }
27  
28      public void testOneWay() throws Exception
29      {
30          MuleClient client = new MuleClient();
31          MuleMessage result = client.send("cxf:http://localhost:63081/services/async?method=send", "Hello!",
32              null);
33          assertEquals(NullPayload.getInstance(), result.getPayload());
34      }
35  
36      protected String getConfigResources()
37      {
38          return "jaxws-conf.xml";
39      }
40  
41  }