...
A RESTful customer service is provided on URL http://localhost:9763/jaxrs_content_negotiation/services/. Users access this URL to operate on a customer. The REST server provides the following services:
A An HTTP GET request to URL http://localhost:9763/jaxrs_content_negotiation/services/customers/customerservice/customers/123 with "accept header" set to "application/xml" returns a customer instance in XML format. The XML document returns:
Code Block language html/xml <Customer> <id>123</id> <name>John</name> </Customer>
A An HTTP GET request to URL http://localhost:9763/jaxrs_content_negotiation/services/customers/customerservice/customers/123 with "accept header" set to "application/json" returns a customer instance in JSON format. The JSON document returns:
Code Block {"Customer":{"id":"123","name":"John"}}
A An HTTP GET request to URL http://localhost:9763/jaxrs_content_negotiation/services/customers/customerservice/customers/123 without setting "accept header" explicitly, returns a customer instance in XML format. This is because the accept header will be absent from the request when using HTTP Client. In that case, the CXF will treat the "Accept" content type as "*/*". The XML document returns:
Code Block <Customer> <id>123</id> <name>John</name> </Customer>
...