1   /*
2    * $Id: AxisConnectorHttpsTestCase.java 7976 2007-08-21 14:26:13Z dirk.olmes $
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.providers.soap.axis;
12  
13  import org.mule.extras.client.MuleClient;
14  import org.mule.impl.MuleMessage;
15  import org.mule.impl.RequestContext;
16  import org.mule.providers.http.HttpsConnector;
17  import org.mule.tck.FunctionalTestCase;
18  import org.mule.umo.UMOEvent;
19  import org.mule.umo.UMOMessage;
20  
21  public class AxisConnectorHttpsTestCase extends FunctionalTestCase
22  {
23      
24      public void testHttpsConnection() throws Exception{
25          MuleClient client = new MuleClient();
26          UMOMessage m = client.send("axis:https://localhost:8000/TestUMO?method=echo",new MuleMessage("hello"));
27          assertNotNull(m);
28          
29          // check that our https connector is being used
30          UMOEvent 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