The next code is an explanation of how you lot tin shipping away telephone weep upward a residue spider web service inward java. Below you lot tin shipping away honour the actual coffee code in addition to soapUI configuration. We enumerate three type of methods namely: POST, PUT in addition to DELETE.
How to telephone weep upward residue spider web service using soapUI world aeroplane Person { individual int id; individual String firstName; individual String lastName; } @POST @Path("/") world ActionStatus create(Person postData) { } In soapUI Method=POST MediaType=application/json Json String= { "firstName" : "edward", "lastName" : "legaspi" } @PUT @Path("/") world ActionStatus update(Person postData) { } In soapUI Method=PUT MediaType=application/json { "id" : 1, "firstName" : "edward", "lastName" : "legaspi" } @DELETE @Path("/{personId}") world ActionStatus delete(@PathParam("personId") Long reservationId) { } In soapUI Method=DELETE Request Parameters= name=personId value=1 style=template level=resource Your resources should await like: /xxx/{personId}
0 komentar:
Please comment if there are any that need to be asked.