Hi,
Right, I figured out why it was working in 2.7.x but not on the trunk;
in CXF 2.7.x PathSegment was used to check a path when handling the wadl
queries not matching any specific roots, and it returns "" for single
slash "/" path segments which is correct.
On the trunk the code is consolidated in WadlGenerator but no
PathSegment is used and the existing test was having a more unique
jaxrs:server address value, compared to "/" so it missed the regression.
Basically, to make the story shorter, I got it fixed :-), by the way,
that case, where we may multiple root resources, with one of them having
root Path("/"), and the user wishes to query only this root, was not
really worked in 2.7.x, will work now if requested.
Some more work might need to be done in UriInfo which might affect
WadlGenerator, by default, if we have jaxrs:server/@address="/", the
base address will have this "/" added, example, "http://bar/" as opposed
to "http://bar", I think we need to make it "http://bar" by default.
Thanks, Sergey
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
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