Yes I've made a typo :) I will try to set the property you mentioned to be
true..



On Mon, Jan 23, 2017 at 2:00 PM, Sergey Beryozkin <[email protected]>
wrote:

> Hi
>
> The format of the response is not FullCampaign but List of FullCampaign,
> which is, as far as XML is concerned is a problem.
> If you depend on a JAXB-to-JSON conversion then try setting a
>
> 'linkAnyMediaTypeToXmlSchema' property to true.
>
> Cheers, Sergey
>
>
> On 23/01/17 11:29, nino martinez wael wrote:
>
>> Hi I've just run cxf-java2wadl-plugin on my project the resulting wadl
>> looks like this:
>>
>> <application xmlns="http://wadl.dev.java.net/2009/02"; xmlns:xs="
>> http://www.w3.org/2001/XMLSchema";>
>> <grammars/>
>> <resources base="/">
>> <resource path="/"
>> id="dk.netdesign.osgidialer.osgi.dialer.webservice.spec.SimpleEndPoints">
>> <resource path="campaigns">
>> <method name="GET" id="GetAllCampaignsStatus">
>> <response>
>> <representation mediaType="application/json"/>
>> </response>
>> </method>
>> </resource>
>> .... (snip stop)
>> JAVA Rest endpoint:
>> public interface SimpleEndPoints {
>>
>>     @Path("/campaigns")
>>     @GET
>>     @Produces(value = MediaType.APPLICATION_JSON)
>>     public List<FullCampaign> GetAllCampaignsStatus();
>>
>>
>> Now I would have expected that the WADL would look something like this:
>>
>> <application xmlns="http://wadl.dev.java.net/2009/02";
>> xmlns:xs="http://www.w3.org/2001/XMLSchema";>
>>         <grammars>
>>   ...JAXB representation of FullCampaign..
>> </grammars>
>>         <resources base="/">
>>                 <resource path="/"
>> id="dk.netdesign.osgidialer.osgi.dialer.webservice.spec.SimpleEndPoints">
>>                         <resource path="campaigns">
>>                                 <method name="GET"
>> id="GetAllCampaignsStatus">
>>                                         <response>
>>                                                 <representation
>> type="xc:FullCampaign" mediaType="application/json"/>
>>                                         </response>
>>                                 </method>
>>                         </resource>
>> .... (snip stop)
>>
>> Just like the example on w3c: https://www.w3.org/Submission/
>> wadl/#x3-34000A
>>
>> If there are no links between resource methods and parameters when how
>> usefull can a wadl be then?
>>
>>
>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>



-- 
Best regards / Med venlig hilsen
Nino Martinez

Reply via email to