Permalink
Browse files

Improve sample

  • Loading branch information...
1 parent f0c0e81 commit 1140f36fcc1731734abc25c7f8af1da25210b227 @jfarcand jfarcand committed Jun 10, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 README.md
View
@@ -289,9 +289,11 @@ There is many ways to deploy a ServiceDefinition. First, you need to decide whic
Action action = new PetstoreAction();
ServiceDefinition serviceDefinition = injector.getInstance(ServiceDefinition.class) // Can also be created using new DefaultServiceDefinition();
serviceDefinition
- .withHandler(new GetServiceHandler("/getPet/{pet}", action).consumeWith(JSON, Pet.class).producing(JSON))
- .withHandler(new DeleteServiceHandler("/deletePet/{pet}", action).consumeWith(JSON, Pet.class).producing(JSON))
- .withHandler(new PostServiceHandler("/addPet/{pet}", action).consumeWith(JSON, Pet.class).producing(JSON));
+ .consuming(JSON)
+ .producing(JSON);
+ .get("/getPet/{pet}", action)
+ .delete("/deletePet/{pet}", action)
+ .post("/addPet/{pet}", action);
list.add(serviceDefinition);
return list;

0 comments on commit 1140f36

Please sign in to comment.