Search in sources :

Example 1 with CustomerServiceService

use of com.example.customerservice.CustomerServiceService in project cxf by apache.

the class CustomerServiceClient method main.

public static void main(String[] args) throws Exception {
    CustomerServiceService customerServiceService;
    if (args.length != 0 && args[0].length() != 0) {
        File wsdlFile = new File(args[0]);
        URL wsdlURL;
        if (wsdlFile.exists()) {
            wsdlURL = wsdlFile.toURI().toURL();
        } else {
            wsdlURL = new URL(args[0]);
        }
        // Create the service client with specified wsdlurl
        customerServiceService = new CustomerServiceService(wsdlURL);
    } else {
        // Create the service client with its default wsdlurl
        customerServiceService = new CustomerServiceService();
    }
    CustomerService customerService = customerServiceService.getCustomerServicePort();
    // Initialize the test class and call the tests
    CustomerServiceTester client = new CustomerServiceTester();
    client.setCustomerService(customerService);
    client.testCustomerService();
    System.exit(0);
}
Also used : CustomerServiceService(com.example.customerservice.CustomerServiceService) CustomerService(com.example.customerservice.CustomerService) File(java.io.File) URL(java.net.URL)

Aggregations

CustomerService (com.example.customerservice.CustomerService)1 CustomerServiceService (com.example.customerservice.CustomerServiceService)1 File (java.io.File)1 URL (java.net.URL)1