Issue Details (XML | Word | Printable)

Key: JAX_RS_SPEC-414
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Ian Evans
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
jax-rs-spec

Incorrect code sample in section 5.4

Created: 20/Jun/13 11:14 PM   Updated: 12/Feb/14 01:46 PM
Component/s: spec
Affects Version/s: 2.0
Fix Version/s: ice box

Time Tracking:
Not Specified

Tags:
Participants: Ian Evans


 Description  « Hide

In Section 5.4 of the spec, the following code example is shown:

Customer c = client.target("http://examples.org/customers/123")
  .request("application/xml").get(Customer.class);
String newId = client.target("http://examples.org/gold-customers/")
  .request().post(xml(c), String.class);

This won't compile. The xml method within the post method is missing Entity.

Customer c = client.target("http://examples.org/customers/123")
  .request("application/xml").get(Customer.class);
String newId = client.target("http://examples.org/gold-customers/")
  .request().post(Entity.xml(c), String.class);


There are no comments yet on this issue.