Search in sources :

Example 1 with Customer

use of org.apache.cxf.customer.Customer in project cxf by apache.

the class CustomerService method getCustomer.

@WebMethod
@WebResult(name = "customer")
public Customer getCustomer(@WebParam(name = "getCustomer") GetCustomer getCustomer) throws CustomerNotFoundFault {
    Customer c = customers.get(getCustomer.getId());
    if (c == null) {
        CustomerNotFoundDetails details = new CustomerNotFoundDetails();
        details.setId(getCustomer.getId());
        throw new CustomerNotFoundFault(details);
    }
    return c;
}
Also used : Customer(org.apache.cxf.customer.Customer) CustomerNotFoundFault(org.apache.cxf.customer.CustomerNotFoundFault) CustomerNotFoundDetails(org.apache.cxf.customer.CustomerNotFoundDetails) WebMethod(javax.jws.WebMethod) WebResult(javax.jws.WebResult)

Example 2 with Customer

use of org.apache.cxf.customer.Customer in project cxf by apache.

the class CustomerService method createCustomer.

final Customer createCustomer() {
    Customer c = new Customer();
    c.setName("Dan Diephouse");
    c.setId(123);
    return c;
}
Also used : Customer(org.apache.cxf.customer.Customer)

Example 3 with Customer

use of org.apache.cxf.customer.Customer in project cxf by apache.

the class CustomerService method createCustomer.

final Customer createCustomer() {
    Customer c = new Customer();
    c.setName("Dan Diephouse");
    c.setId(123);
    return c;
}
Also used : Customer(org.apache.cxf.customer.Customer)

Aggregations

Customer (org.apache.cxf.customer.Customer)3 WebMethod (javax.jws.WebMethod)1 WebResult (javax.jws.WebResult)1 CustomerNotFoundDetails (org.apache.cxf.customer.CustomerNotFoundDetails)1 CustomerNotFoundFault (org.apache.cxf.customer.CustomerNotFoundFault)1