1   /*
2    * $Id: AxisConnectorHttpsTestCase.java 10789 2008-02-12 20:04:43Z dfeist $
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.soap.axis;
12  
13  import org.mule.DefaultMuleMessage;
14  import org.mule.RequestContext;
15  import org.mule.api.MuleEvent;
16  import org.mule.api.MuleMessage;
17  import org.mule.module.client.MuleClient;
18  import org.mule.tck.FunctionalTestCase;
19  import org.mule.transport.http.HttpsConnector;
20  
21  public class AxisConnectorHttpsTestCase extends FunctionalTestCase
22  {
23      
24      public void testHttpsConnection() throws Exception{
25          MuleClient client = new MuleClient();
26          MuleMessage m = client.send("axis:https://localhost:62000/TestUMO?method=echo",new DefaultMuleMessage("hello"));
27          assertNotNull(m);
28          
29          // check that our https connector is being used
30          MuleEvent event = RequestContext.getEvent();
31          assertTrue (event.getEndpoint().getConnector() instanceof HttpsConnector);
32          assertTrue(event.getEndpoint().getConnector().getName().equals("myHttpsConnector"));
33      }
34      
35      protected String getConfigResources()
36      {
37          return "axis-https-connector-config.xml";
38      }
39      
40  }
41  
42