View Javadoc

1   /*
2    * $Id: WSATest.java 20320 2010-11-24 15:03:31Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.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.module.cxf.wsa;
12  
13  import org.mule.example.employee.EmployeeDirectory;
14  import org.mule.example.employee.EmployeeDirectory_Service;
15  import org.mule.tck.FunctionalTestCase;
16  
17  import javax.xml.ws.BindingProvider;
18  import javax.xml.ws.soap.AddressingFeature;
19  
20  public class WSATest extends FunctionalTestCase
21  {
22      public void testWSA() throws Exception
23      {
24          EmployeeDirectory_Service svc = new EmployeeDirectory_Service();
25          
26          EmployeeDirectory port = svc.getEmployeeDirectoryPort(new AddressingFeature());
27          BindingProvider bp = (BindingProvider) port;
28          bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
29              "http://localhost:63081/services/employee");
30          
31          System.out.println(port.getEmployees());
32          
33      }
34      
35      @Override
36      protected String getConfigResources()
37      {
38          return "wsa-conf.xml";
39      }
40  
41  }
42  
43