Search in sources :

Example 6 with NoSuchCustomer

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

the class SoapCxfServerTest method testFault.

@Test
public void testFault() {
    GetCustomersByName request = new GetCustomersByName();
    request.setName("none");
    try {
        customerServiceProxy.getCustomersByName(request);
        Assert.fail("NoSuchCustomerException expected");
    } catch (NoSuchCustomerException e) {
        NoSuchCustomer info = e.getFaultInfo();
        Assert.assertEquals("none", info.getCustomerId());
    }
}
Also used : GetCustomersByName(com.example.customerservice.GetCustomersByName) NoSuchCustomer(com.example.customerservice.NoSuchCustomer) NoSuchCustomerException(com.example.customerservice.NoSuchCustomerException) Test(org.junit.Test)

Aggregations

NoSuchCustomer (com.example.customerservice.NoSuchCustomer)6 NoSuchCustomerException (com.example.customerservice.NoSuchCustomerException)6 Test (org.junit.Test)4 Customer (com.example.customerservice.Customer)2 GetCustomersByName (com.example.customerservice.GetCustomersByName)2 GetCustomersByNameResponse (com.example.customerservice.GetCustomersByNameResponse)1 SaveCustomer (com.example.customerservice.SaveCustomer)1 InputStream (java.io.InputStream)1 BigDecimal (java.math.BigDecimal)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 GregorianCalendar (java.util.GregorianCalendar)1