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 Kumar (JIRA)" <ji...@apache.org> on 2013/03/06 10:34:12 UTC

[jira] [Created] (WINK-384) Unable to use Asset classes via a Sub-resource-locator

Atul Kumar created WINK-384:
-------------------------------

             Summary: Unable to use Asset classes via a Sub-resource-locator
                 Key: WINK-384
                 URL: https://issues.apache.org/jira/browse/WINK-384
             Project: Wink
          Issue Type: Bug
          Components: Common, Server
    Affects Versions: 1.2
         Environment: Windows 7, WAS 8.5, RSA 8.5.1
            Reporter: Atul Kumar


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.
}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira