Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Unable to represent complex type in the Request tag of WADL

$
0
0
Hi,
I saw in a post that a complex element can be represented in the request
tag , this way:

@POST
@Path("/index")
@ElementClass(response = ListResponse.class , request = ListRequest.class)
public Response getPreferenceTypeList(
ListRequest listRequest,
@PathParam("format") @DefaultValue("json") String format);

However, my WADL is not generating this complex type in the request section:

<request>
<representation mediaType="application/octet-stream"/>
</request>

Actually, it should be like this:

<request>
<representation mediaType="application/xml" element="prefix1:ListRequest"/>
</request>

The problem here is that, the WADL generator never considers the request
element in the @ElementClass annotation. However, the response looks good:

<response>
<representation mediaType="application/json"/>
<representation mediaType="application/xml" element="prefix1:
ListResponse"/>
</response>

I am using cxf V 2.7.10.. any help appreciated..

Viewing all articles
Browse latest Browse all 5648

Trending Articles