cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: [3.0.0-milestone1] WADL auto-generation
Date Wed, 27 Nov 2013 17:09:40 GMT
Hi
On 27/11/13 16:52, Francesco Chicchiriccò wrote:
> On 27/11/2013 17:40, Sergey Beryozkin wrote:
>> Hi Francesco
>> On 27/11/13 11:55, Francesco Chicchiriccò wrote:
>>> Hi all,
>>> in my migration from 2.7.8 to 3.0.0-milestone1, I've just found that it
>>> seems I am not able anymore to get the complete WADL for all services
>>> available.
>>>
>>> E.g., when calling
>>>
>>> http://localhost:9080/syncope/rest/?_wadl
>>>
>>> only
>>>
>>> <application>
>>>    <doc title="Apache Syncope 1.2.0-SNAPSHOT"/>
>>>    <grammars/>
>>>    <resources base="http://localhost:9080/syncope/rest/"/>
>>> </application>
>>>
>>> is returned, while calling (for example)
>>>
>> I have a similar test passing in CXF,
>> you have a trailing slash in
>>
>> "http://localhost:9080/syncope/rest/"
>>
>> and if we have two or more resources with only one of them having
>> @Path("/") then we can not list other resources having more specific
>> paths.
>>
>> "http://localhost:9080/syncope/rest"
>>
>> should work.
>>
>> Can you try it please ?
>
> Hi Sergey,
>
> http://localhost:9080/syncope/rest?_wadl
>
> gives the same result as
>
> http://localhost:9080/syncope/rest/?_wadl
>
Hmm... Something is brittle in the WadlGenerator check.
I can see you have CXF Servlet path "/rest/*" and 
jaxrs:server/@address="/", I think it basically thinks that a specific 
root WADL has been requested, takes "/" but then fails to match it with 
the the actual roots.

I'll need to play with this combination a bit, updating servlet pattern 
to "/*" and jaxrs:server/@address="/rest" will probably fix it but we'll 
get this fixed too

Thanks, Sergey

> Regards.
>
>>> http://localhost:9080/syncope/rest/users/?_wadl
>>>
>>> returns the full WADL (limited to /users, naturally).
>>>
>>> I have the WADLGenerator declared as follows
>>>
>>>    <bean id="wadlGenerator"
>>> class="org.apache.cxf.jaxrs.model.wadl.WadlGenerator">
>>>      <property name="applicationTitle" value="Apache Syncope
>>> ${project.version}"/>
>>>      <property name="namespacePrefix" value="syncope"/>
>>>      <property name="linkJsonToXmlSchema" value="true"/>
>>>      <property name="useJaxbContextForQnames" value="true"/>
>>>      <property name="ignoreMessageWriters" value="true"/>
>>>      <property name="addResourceAndMethodIds" value="true"/>
>>>    </bean>
>>>
>>> and enlisted in <jaxrs:providers/> of <jaxrs:server/>
>>>
>>> TIA
>>> Regards.
>>>
>>
>>
>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Mime
View raw message