One additional note. It seems once I define a class level @Path(/) in
one service class no other services in other classes load regardless
if they have a class level annotation with @Path(/) or @Path(foo).
If I jam it all into one class things work fine. I agree that this is
very odd and assumed that this should be a basic use case especially
since it is all through the docs. Is this working fine for everyone
else?
-Anthony
On Jul 9, 2008, at 11:35 AM, Sergey Beryozkin wrote:
This is indeed odd. At the moment I've no idea why this problem
occurs for
this simple case - there're few tests which test similar class/
method path
combinations. I'm afraid I may not be able to investigate it this week
though, may be at weekends...And I reckon it's a different issue to
the one
Brad is referring to - that one has been fixed on the trunk -
selecting
between message body providers. There's an issue lurking there to do
with
selecting between multiple resource classes which share some common
path
segment but I believe this one is a separate one...
Cheers, Sergey
-----Original Message-----
From: Anthony Schexnaildre [mailto:[EMAIL PROTECTED]
Sent: 09 July 2008 08:50
To: [email protected]
Subject: JAX-RS annotation oddities
Can anyone offer up some ideas as to why the first example publishes
fine but the second does not? I have played around with trailing
slashes (/) in the @Path. I get the dreaded "No operation matching
request path is found" with anything other than the first example. I
am using trunk right now but this was happening when using 2.1.1 also.
This works
============================
@Path("/")
@ProduceMime("application/xml")
public class UserServiceWSImpl implements UserServiceWS {
@Autowired private UserService userService;
@GET
@Path("/user/template")
@ProduceMime("application/xml")
public Response template( ) {
return Response.ok( userService.createInitializedUser()
).build();
}
}
This does not work
============================
@Path("/user")
@ProduceMime("application/xml")
public class UserServiceWSImpl implements UserServiceWS {
@Autowired private UserService userService;
@GET
@Path("/template")
@ProduceMime("application/xml")
public Response template( ) {
return Response.ok( userService.createInitializedUser()
).build();
}
}
Thank you,
-Anthony
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland