Please see comments inline :
> Hi,
>
> Consider this JAXRS resource :
>
> @Path("/")
> public class Resource {
> @GET
> @Produces("text/plain")
> public String getValue() {return "plain value";}
> }
>
> How to have such a plain representation described in WADL ?
>
> Perhaps
>
> <representation>
> <param style="plain"/>
> </representation>
>
> ?
There's no real structure in the response so I'd expect something like:
<response status="200">
<representation mediaType="text/plain"/>
</response>
S.B : what if we have
@Path("/")
public class Resource {
@PUT
@Consumes("text/plain")
@Path("id")
public void setValue(@PathParam("id") long id, @QueryParam("somequery") int queryValue, Long value) {}
}
PathParam and QueryParam will be seen as method parameters with 'type' attribute such as "xs:long", etc. It does seem like
plain text representations could have had some optional type information captured too, thus I was thinking about :
<representation mediaType="text/plain">
<param style="plain" type="xs:long"/>
</representation>
or may be even better :
<resource>
<param type="xs:long" style="path" name="id"/>
<method name="PUT">
<request>
<param type="xs:int" style="query">
<param type="xs:long" style="plain">
<!--
no representation element
-->
</request>
</method>
</resource>
Not sure if it makes sense though
cheers, Sergey
Marc.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_wadl.dev.java.net
For additional commands, e-mail: users-help_at_wadl.dev.java.net