Hi Gabo
It is an 'Object' so a WSDL generator has no idea what else to say, apart
from <representation/>. If you add "Consumes' with some values then you'll
get a bit more specific tag...
However, there appears to be a bug :
<response><!-- Primitive type : xs:long
--><representation mediaType="text/xml"/></response></method></resource>
or do you have Produces('text/xml') on the class itself ? Can you please
send me a class sample so that I can fix it ?
cheers, Sergey
Gabo Manuel wrote:
>
> Hi Sergey,
>
> By looking at the generated WADL, how does one tell if there is an
> expected payload with the method involved. If I have the following
> annotated method:
>
> @PUT
> @Path("/somepath/")
> @WebMethod
> @WebResult(name="result")
> public long insert(
> Object ap,
> @QueryParam("transactionDescription")
> String transactionDescription
> )
>
> The wadl generated is as follows:
> <resource path="/somepath/"><method
> name="PUT"><request><representation/></request><response><!-- Primitive
> type : xs:long
> --><representation mediaType="text/xml"/></response></method></resource>
>
> I am assuming the "<representation/>" is what should hint at it, but by
> just looking at the wadl, I am not able to tell which of the complexType
> described above in the wadl is to be used. Maybe replacing/modifying it
> to contain the name of the complexType would help.
>
> I could be missing something from the user's guide. Please advise.
>
> Thanks in advance.
>
> Gabo
>
>
> Sergey Beryozkin wrote:
>> Hi,
>>
>> I'm not seeing an immediate need in it as I don't see what we actually
>> can do with this tool (I would actually prefer not to add 'wadl' in
>> the name of such would-be tool, rather I would have a single tool
>> capable of supporting multiple document types if needed).
>>
>> As I said before, the only thing we can do with WADL is to generate
>> client-side HTTP-centric code. But no typed server Java code.
>> It may also may not be obvious what sort of http-centric code we can
>> generate given that at the WebClient level the notion of 'subresource'
>> is really non-existent, for ex :
>>
>> WebClient client = WebClient.create(http://bar);
>>
>> client.path("/foo/baz").get();
>> client.path("/foo").path("baz").get();
>>
>> are two identical lines really. It's a server-side issue if /baz
>> should be handled by a subresource object or not.
>>
>> At the moment I can see how UI tool, possibly a web-based one would
>> utilize WADLs for testing/visualizing, but I'm not sure yet what we
>> would do with WADL at the code gen level, unless we introduce some
>> CXF-specifc wadl extensions....
>>
>> cheers, Sergey
>>
>
>
--
View this message in context:
http://www.nabble.com/JAX-RS-%3A-initial-WADL-support-tp24394736p24970669.html
Sent from the cxf-user mailing list archive at Nabble.com.