Search in sources :

Example 1 with GetAllCustomersResponse

use of com.example.customerservice.GetAllCustomersResponse in project camel by apache.

the class CustomerServiceImpl method getAllCustomers.

/**
     * This method is to test a call without input parameter
     */
public GetAllCustomersResponse getAllCustomers() {
    GetAllCustomersResponse response = new GetAllCustomersResponse();
    Customer customer = new Customer();
    customer.setName("Smith");
    customer.setRevenue(100000);
    response.getReturn().add(customer);
    return response;
}
Also used : GetAllCustomersResponse(com.example.customerservice.GetAllCustomersResponse) Customer(com.example.customerservice.Customer) NoSuchCustomer(com.example.customerservice.NoSuchCustomer) SaveCustomer(com.example.customerservice.SaveCustomer)

Example 2 with GetAllCustomersResponse

use of com.example.customerservice.GetAllCustomersResponse in project camel by apache.

the class SoapCxfClientTest method testRoundTripGetAllCustomers.

@Test
public void testRoundTripGetAllCustomers() throws Exception {
    GetAllCustomersResponse response = customerService.getAllCustomers();
    Assert.assertEquals(1, response.getReturn().size());
    Customer firstCustomer = response.getReturn().get(0);
    Assert.assertEquals(100000.0, firstCustomer.getRevenue(), 0.00001);
}
Also used : GetAllCustomersResponse(com.example.customerservice.GetAllCustomersResponse) Customer(com.example.customerservice.Customer) NoSuchCustomer(com.example.customerservice.NoSuchCustomer) SaveCustomer(com.example.customerservice.SaveCustomer) Test(org.junit.Test)

Aggregations

Customer (com.example.customerservice.Customer)2 GetAllCustomersResponse (com.example.customerservice.GetAllCustomersResponse)2 NoSuchCustomer (com.example.customerservice.NoSuchCustomer)2 SaveCustomer (com.example.customerservice.SaveCustomer)2 Test (org.junit.Test)1