You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by Atul Kumar16 <at...@in.ibm.com> on 2013/02/28 06:00:02 UTC
Apache Wink query
Hi,
We are using Apache Wink in our product for exposing and consuming
services.
Here's the situation where I seek help from you:
The client instantiates the entity and sends it to a subresource via a
sub-locator. The entity is passed properly to the sub-resource if its
parameter is a direct entity (JAXB-annotated). When I try keeping the
parameter (at the sub-resource) as an instance of an Asset, it throws HTTP
error 415.
Please help me on this.
Following are the excepts of server-code:
Sub-resource locator
@Path("{reviewId}/members")
public Members getMembers_reviewIdmembers(@DefaultValue("0") @PathParam(
"reviewId") int reviewId) {
return new Members();
}
Sub-resource
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@PUT
public ReviewMemberListAsset doPutMembers(ReviewMemberListAsset
reviewMemberList, @DefaultValue("0") @PathParam("reviewId") int reviewId) {
//here the entity is received correctly if the parameter is of type
ReviewMemberList and it fails if its an object of type
ReviewMemberListAsset.
}
Regards,
Atul Kumar
India Software Labs, IBM Software Group
DLF Silokhera, Sector 30, Gurgaon, India.
Phone: +91.124.66.65716
Lotus Notes : Atul Kumar16/India/IBM
Email: atulkumar@in.ibm.com