java - Receiving and processing 3rd party Posts in Tapestry app -


the goal of app create leaderboard competition. add one's score, have write in hipchat (i have listener in hipchat attempts make post tapestry app).

i running lots of trouble around accepting , handling 3rd party post tapestry app. documentation can find deals internal requests.

does have experience in setting way receive 3rd party post, handle , make actions information? great!

tapestry's native post handling intended handling html form submits , not match machine initiated rest requests. consequently, i'd handle rest resource request, jax-ws meant for. assume mean tapestry 5 , if so, it's pretty started tynamo's tapestry-resteasy module (for disclosure, i'm 1 of maintainers). if new jax-ws, may want read overview it (the link jersey, reference implementation annotations work same way regardless of implementation). in principle, you'd implement (pojo+annotations) resource class , operation this:

@post @produces({"application/json"}) public response scorepoints(user user, long score) {     leaderboardservice.add(user, score);     return response.ok().build(); } 

on client side, you'd pass in user id , tapestry's type coercion handle rest (assuming user known entity tapestry). of course, use primitive data types on both sides well.


Comments