@Path(value="/customerservice") public class CustomerService extends Object
| Constructor and Description |
|---|
CustomerService() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
addCustomer(Customer customer)
Using HTTP POST, we can add a new customer to the system by uploading the XML representation for the customer.
|
javax.ws.rs.core.Response |
deleteCustomer(String id)
This method is mapped to an HTTP DELETE of 'http://localhost:8181/cxf/crm/customerservice/customers/{id}'.
|
Customer |
getCustomer(String id)
This method is mapped to an HTTP GET of 'http://localhost:8181/cxf/crm/customerservice/customers/{id}'.
|
Order |
getOrder(String orderId)
This method is mapped to an HTTP GET of 'http://localhost:8181/cxf/crm/customerservice/orders/{id}'.
|
javax.ws.rs.core.Response |
updateCustomer(Customer customer)
Using HTTP PUT, we can can upload the XML representation of a customer object.
|
@GET
@Path(value="/customers/{id}/")
@Produces(value="application/xml")
public Customer getCustomer(@PathParam(value="id")
String id)
@PUT @Path(value="/customers/") public javax.ws.rs.core.Response updateCustomer(Customer customer)
@POST @Path(value="/customers/") public javax.ws.rs.core.Response addCustomer(Customer customer)
@DELETE
@Path(value="/customers/{id}/")
public javax.ws.rs.core.Response deleteCustomer(@PathParam(value="id")
String id)
@Path(value="/orders/{orderId}/")
public Order getOrder(@PathParam(value="orderId")
String orderId)
Copyright © 2005–2016 The Apache Software Foundation. All rights reserved.