1   /*
2    * $Id: CxfConnectorVMFunctionalTestCase.java 11868 2008-05-29 01:10:55Z 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;
12  
13  import org.mule.api.MuleMessage;
14  import org.mule.module.client.MuleClient;
15  import org.mule.tck.providers.soap.AbstractSoapResourceEndpointFunctionalTestCase;
16  
17  import java.util.HashMap;
18  import java.util.Map;
19  
20  public class CxfConnectorVMFunctionalTestCase extends AbstractSoapResourceEndpointFunctionalTestCase
21  {
22  
23      public void testWSDL() throws Throwable
24      {
25          MuleClient client = new MuleClient();
26          
27          Map<String,Object> props = new HashMap<String, Object>();
28          props.put("http.method", "GET");
29          
30          MuleMessage response = client.send("http://localhost:63081/test?wsdl", "", props);
31          
32          assertTrue(response.getPayloadAsString().indexOf("http://localhost:63081/test") != -1);
33          
34          // this doesn't work as now the endpoint is registered on a different url...
35          testRequestResponse();
36      }
37  
38      public String getConfigResources()
39      {
40          return getTransportProtocol() + "-mule-config.xml";
41      }
42  
43      protected String getTransportProtocol()
44      {
45          return "vm";
46      }
47  
48      protected String getSoapProvider()
49      {
50          return "cxf";
51      }
52  
53  }