You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
(16) |
Apr
(18) |
May
(13) |
Jun
(100) |
Jul
(165) |
Aug
(53) |
Sep
(41) |
Oct
(84) |
Nov
(113) |
Dec
(171) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(84) |
Feb
(30) |
Mar
(75) |
Apr
(113) |
May
(87) |
Jun
(96) |
Jul
(127) |
Aug
(106) |
Sep
(191) |
Oct
(142) |
Nov
(106) |
Dec
(83) |
| 2010 |
Jan
(62) |
Feb
(93) |
Mar
(92) |
Apr
(58) |
May
(52) |
Jun
(104) |
Jul
(109) |
Aug
(94) |
Sep
(75) |
Oct
(54) |
Nov
(65) |
Dec
(38) |
| 2011 |
Jan
(53) |
Feb
(84) |
Mar
(95) |
Apr
(24) |
May
(10) |
Jun
(49) |
Jul
(74) |
Aug
(23) |
Sep
(67) |
Oct
(21) |
Nov
(62) |
Dec
(50) |
| 2012 |
Jan
(26) |
Feb
(7) |
Mar
(9) |
Apr
(5) |
May
(13) |
Jun
(7) |
Jul
(18) |
Aug
(48) |
Sep
(58) |
Oct
(79) |
Nov
(19) |
Dec
(15) |
| 2013 |
Jan
(33) |
Feb
(21) |
Mar
(10) |
Apr
(22) |
May
(39) |
Jun
(31) |
Jul
(15) |
Aug
(6) |
Sep
(8) |
Oct
(1) |
Nov
(4) |
Dec
(3) |
| 2014 |
Jan
(17) |
Feb
(18) |
Mar
(15) |
Apr
(12) |
May
(11) |
Jun
(3) |
Jul
(10) |
Aug
(2) |
Sep
(3) |
Oct
(4) |
Nov
(4) |
Dec
(1) |
| 2015 |
Jan
|
Feb
(6) |
Mar
(5) |
Apr
(13) |
May
(2) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(6) |
Oct
(12) |
Nov
(12) |
Dec
(12) |
| 2016 |
Jan
(10) |
Feb
(3) |
Mar
(8) |
Apr
(4) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
| 2017 |
Jan
(6) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
|
From: Bill B. <bb...@re...> - 2008-06-05 16:03:01
|
I've created a JIRA issue for this: http://jira.jboss.com/jira/browse/RESTEASY-50 I'm doing a JUG presentation on JAX-RS next thursday and I want to get a new release out by then. There's a few minor bugs people have found, like this, that I want to fix. Thanks for your patience. I'll pop you an email if I commit something before the release so you can get code from SVN if you can't wait for this. Bill Bill Burke wrote: > I haven't put a lot of thought into this. I guess have two things: > > 1. Allow return of a Response object in the client framework. > 2. An method annotation that says that the return value is a status code > @StatusCode or something > 3. Allow returning a Response.Status enum > 4. Throw a WebApplicationExceptoin iif, the response falls into an error > code bucket. > > Thoughts? > > > > > > Christian Sadilek wrote: >> The HttpClientInvoker throws a RuntimeException when a status other >> then SC_OK is returned by the executed method. What if the method >> returns Response.created(uri).build()? Why should the >> HttpClientInvoker throw an exception in case of SC_CREATED (201)? >> >> In general how do I check if the request went well? Is there a way to >> retrieve the http status code on the client? >> >> Thanks, >> Christian >> >> >> >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Resteasy-developers mailing list >> Res...@li... >> https://lists.sourceforge.net/lists/listinfo/resteasy-developers > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Bill B. <bb...@re...> - 2008-06-05 16:00:32
|
I haven't put a lot of thought into this. I guess have two things: 1. Allow return of a Response object in the client framework. 2. An method annotation that says that the return value is a status code @StatusCode or something 3. Allow returning a Response.Status enum 4. Throw a WebApplicationExceptoin iif, the response falls into an error code bucket. Thoughts? Christian Sadilek wrote: > The HttpClientInvoker throws a RuntimeException when a status other then > SC_OK is returned by the executed method. What if the method returns > Response.created(uri).build()? Why should the HttpClientInvoker throw an > exception in case of SC_CREATED (201)? > > In general how do I check if the request went well? Is there a way to > retrieve the http status code on the client? > > Thanks, > Christian > > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > > > ------------------------------------------------------------------------ > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Christian S. <chr...@gm...> - 2008-06-05 15:38:59
|
The HttpClientInvoker throws a RuntimeException when a status other then SC_OK is returned by the executed method. What if the method returns Response.created(uri).build()? Why should the HttpClientInvoker throw an exception in case of SC_CREATED (201)? In general how do I check if the request went well? Is there a way to retrieve the http status code on the client? Thanks, Christian |
|
From: Appollonia g. <te...@en...> - 2008-06-05 06:29:45
|
Sie haben reichlich Zeit und moechten diese geldbringend fuer Ihre Finanzen verbringen schreiben Sie uns an elf...@me... und lassen Sie sich genauere Informationen zukommen. |
|
From: Bill B. <bb...@re...> - 2008-06-03 14:58:52
|
Nothing could we done with the default JAX-RS, standard model, to inject a Spring bean. You'd have to use the implementation's specific spring integration. If you look at Resteasy's Spring integration you'd see that it post-processes bean instances and registers them as singletons into the Resteasy Runtime. This means, you can configure your JAX-RS classes as Spring bean instances. You can configure them and reference other things however you want. For the default vanilla JAX-RS model, I do not support EE injection annotations and I'm not sure I will unless users really complain. You'd have to use JNDI lookups to pull in what you wanted if you were using that default model, OR, implement JAX-RS within an EJB. The WIKI talks about how we integrate with EJB. Hope this answers your questions. Ian Butcher wrote: > Bill, > > Thanks for the responses. I have managed to hook up an application > context fine. My question was, after I have an ApplicationContext how > do I hook those into my Resource Classes? From the spec it looks like > the authors are anticipating a JEE deployment. > > "JAX-RS root resource classes and providers are supplied with the same > resource injection capabilities 22 > as are provided for a Servlet instance running in a Java EE Web > container. In particular the follow- 23 > ing annotations may be used according to their individual semantics: > @Resource, @Resources, @EJB, 24 > @EJBs, @WebServiceRef, @WebServiceRefs, @PersistenceContext, > @PersistenceContexts, 25 > @PersistenceUnit and @PersistenceUnits. " > > So it looks like if I had a JEE 6 container I could wire in and EJB or > web service. Is there something I can do now to wire in a Spring Bean? > > Thanks, > > Ian. > > On Jun 2, 2008, at 10:22 PM, Bill Burke wrote: > >> Does this help shed some light? >> >> http://wiki.jboss.org/wiki/RESTeasySpringIntegration >> >> >> >> Ian Butcher wrote: >>> I am having some trouble connecting the dots. From the JAX-RS Spec >>> it's clear that normally a new Resource Class is created for each >>> request. I have convinced myself that the Resource Classes are >>> something like endpoints or Struts actions; they get their model >>> from the Provider and the scoping information from the injected >>> annotation arguments. >>> Coming from a Spring and web service background this is where I'd >>> normally wire in a domain repositories and services. This doesn't >>> seem to fit the model of having a new Resource Class per request. >>> Can someone explain the right mental model for this? >>> Thanks, >>> Ian. >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Microsoft >>> Defy all challenges. Microsoft(R) Visual Studio 2008. >>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>> _______________________________________________ >>> Resteasy-developers mailing list >>> Res...@li... >>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers >> >> -- >> Bill Burke >> JBoss, a division of Red Hat >> http://bill.burkecentral.com > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Ian B. <ibu...@re...> - 2008-06-03 14:41:25
|
Bill, Thanks for the responses. I have managed to hook up an application context fine. My question was, after I have an ApplicationContext how do I hook those into my Resource Classes? From the spec it looks like the authors are anticipating a JEE deployment. "JAX-RS root resource classes and providers are supplied with the same resource injection capabilities 22 as are provided for a Servlet instance running in a Java EE Web container. In particular the follow- 23 ing annotations may be used according to their individual semantics: @Resource, @Resources, @EJB, 24 @EJBs, @WebServiceRef, @WebServiceRefs, @PersistenceContext, @PersistenceContexts, 25 @PersistenceUnit and @PersistenceUnits. " So it looks like if I had a JEE 6 container I could wire in and EJB or web service. Is there something I can do now to wire in a Spring Bean? Thanks, Ian. On Jun 2, 2008, at 10:22 PM, Bill Burke wrote: > Does this help shed some light? > > http://wiki.jboss.org/wiki/RESTeasySpringIntegration > > > > Ian Butcher wrote: >> I am having some trouble connecting the dots. From the JAX-RS >> Spec it's clear that normally a new Resource Class is created for >> each request. I have convinced myself that the Resource Classes >> are something like endpoints or Struts actions; they get their >> model from the Provider and the scoping information from the >> injected annotation arguments. >> Coming from a Spring and web service background this is where I'd >> normally wire in a domain repositories and services. This >> doesn't seem to fit the model of having a new Resource Class per >> request. Can someone explain the right mental model for this? >> Thanks, >> Ian. >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Resteasy-developers mailing list >> Res...@li... >> https://lists.sourceforge.net/lists/listinfo/resteasy-developers > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com |
|
From: Stephan K. <Ste...@we...> - 2008-06-03 13:55:39
|
Hi,
IMO JAX-RS should support @FormParam.
best regards
Stephan
Bill Burke schrieb:
> Yeah, we had a significant discussion about this on the JSR mail list.
> The servlet specification makes no distinction between
> www-form-urlencoded parameters and URI parameters. This is not the
> case in JAX-RS. @QueryParam only works with URI parameters
> (/foo?param=value).
>
> The only way to get at form params is to use a MultivaluedMap as your
> request representation.
>
> @POST
> public void post(MultivaluedMap<String, String> form) {...}
>
> We had discussed introducing a @FormParam annotation, but I don't
> think an agreement had been reached. If you think things need to be
> changed, place voice your opinion on us...@js... (in copy).
>
> Michael Martinsen wrote:
>> Hello
>>
>> Reading the docs, it seems to me that the @QueryParam should also
>> pick up params submitted using POST method.
>> I have a simple example which works when using GET, but not using
>> POST...
>>
>> Any thoughts on that?
>>
>> Thanks
>>
>> /Michael
>
|
|
From: Bill B. <bb...@re...> - 2008-06-03 13:05:35
|
Yeah, we had a significant discussion about this on the JSR mail list.
The servlet specification makes no distinction between
www-form-urlencoded parameters and URI parameters. This is not the case
in JAX-RS. @QueryParam only works with URI parameters (/foo?param=value).
The only way to get at form params is to use a MultivaluedMap as your
request representation.
@POST
public void post(MultivaluedMap<String, String> form) {...}
We had discussed introducing a @FormParam annotation, but I don't think
an agreement had been reached. If you think things need to be changed,
place voice your opinion on us...@js... (in copy).
Michael Martinsen wrote:
> Hello
>
> Reading the docs, it seems to me that the @QueryParam should also pick
> up params submitted using POST method.
> I have a simple example which works when using GET, but not using POST...
>
> Any thoughts on that?
>
> Thanks
>
> /Michael
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Michael M. <mic...@gm...> - 2008-06-03 12:35:09
|
Hello Reading the docs, it seems to me that the @QueryParam should also pick up params submitted using POST method. I have a simple example which works when using GET, but not using POST... Any thoughts on that? Thanks /Michael |
|
From: Bill B. <bb...@re...> - 2008-06-03 05:23:32
|
And one more thing. JAX-RS only has a simple default component model, instance per request. It does not mandate this model, nor does it disallow integration with EJBs, singelton objects, or Spring created beans. Bill Burke wrote: > Does this help shed some light? > > http://wiki.jboss.org/wiki/RESTeasySpringIntegration > > > > Ian Butcher wrote: >> I am having some trouble connecting the dots. From the JAX-RS Spec >> it's clear that normally a new Resource Class is created for each >> request. I have convinced myself that the Resource Classes are >> something like endpoints or Struts actions; they get their model from >> the Provider and the scoping information from the injected annotation >> arguments. >> >> Coming from a Spring and web service background this is where I'd >> normally wire in a domain repositories and services. This doesn't >> seem to fit the model of having a new Resource Class per request. Can >> someone explain the right mental model for this? >> >> Thanks, >> >> Ian. >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Resteasy-developers mailing list >> Res...@li... >> https://lists.sourceforge.net/lists/listinfo/resteasy-developers > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Bill B. <bb...@re...> - 2008-06-03 05:20:23
|
Does this help shed some light? http://wiki.jboss.org/wiki/RESTeasySpringIntegration Ian Butcher wrote: > I am having some trouble connecting the dots. From the JAX-RS Spec > it's clear that normally a new Resource Class is created for each > request. I have convinced myself that the Resource Classes are > something like endpoints or Struts actions; they get their model from > the Provider and the scoping information from the injected annotation > arguments. > > Coming from a Spring and web service background this is where I'd > normally wire in a domain repositories and services. This doesn't > seem to fit the model of having a new Resource Class per request. Can > someone explain the right mental model for this? > > Thanks, > > Ian. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Bill B. <bb...@re...> - 2008-06-03 05:19:18
|
In your provider you can inject an HttpHeader field. From that you can
obtain UriInfo, from that a UriBuilder that allows you to build URIs.
@Provider
public class UserAttributeXmlSerializer {
@Context HttpHeaders headers;
...
}
Ian Butcher wrote:
> One of the features of RESTful web services described in the ORA book
> "RESTful Web Services" is that of hypermedia connections in resource
> representations. I can't find a way (although I'm very new to it) in
> JAX-RS or resteasy to put a link to another resource in my
> representation. /Is there a way to get the URL of another resource
> inside of resteasy?/
>
> Example:
>
> I have a system that is a glorified keystore. A user is referenced by
> GUID, the key part of the keystore has a name. The value can be either
> a simple scalar type (int, long, string, etc) or an array of them.
>
> My resources would look something like:
>
> @Path("/attributes/{key}/{definition}")
> public class KeyResource{}
>
>
> @Path("/attributes/{userguid}/{key}")
> public class UserKeyResource{}
>
> @Provider
> @ProduceMime("text/xml")
> public class UserAttributeXmlSerializer implements MessageBodyReader,
> MessageBodyWriter {
>
> public void writeTo(Object o, Class aClass, Type type, Annotation[]
> annotations, MediaType mediaType,
> MultivaluedMap multivaluedMap, OutputStream outputStream)
> throws IOException, WebApplicationException {
>
> // build representation of the 'values' part of the UserKey resource
> ...
>
> // now I want to add a link to the key resource. This allows the
> client to find out what scalar type or array this value represents
> // *there is where I'd really like to be able to get the actual
> URL for a given 'key' resource*
> ...
> }
>
> }
>
> So the representation that I want to send to the client looks like this:
>
> <keyvalue>
> <values>
> <value>123</value>
> </values>
> <key>http://somehost/somecontext/atributes/somekey</key>
> </keyvalue>
>
> Any ideas or answers greatly appreciated.
>
> Thanks,
>
> Ian.
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Ian B. <ibu...@re...> - 2008-06-03 01:36:01
|
I am having some trouble connecting the dots. From the JAX-RS Spec it's clear that normally a new Resource Class is created for each request. I have convinced myself that the Resource Classes are something like endpoints or Struts actions; they get their model from the Provider and the scoping information from the injected annotation arguments. Coming from a Spring and web service background this is where I'd normally wire in a domain repositories and services. This doesn't seem to fit the model of having a new Resource Class per request. Can someone explain the right mental model for this? Thanks, Ian. |
|
From: Ian B. <ibu...@re...> - 2008-06-02 23:27:30
|
One of the features of RESTful web services described in the ORA book
"RESTful Web Services" is that of hypermedia connections in resource
representations. I can't find a way (although I'm very new to it) in
JAX-RS or resteasy to put a link to another resource in my
representation. Is there a way to get the URL of another resource
inside of resteasy?
Example:
I have a system that is a glorified keystore. A user is referenced by
GUID, the key part of the keystore has a name. The value can be
either a simple scalar type (int, long, string, etc) or an array of
them.
My resources would look something like:
@Path("/attributes/{key}/{definition}")
public class KeyResource{}
@Path("/attributes/{userguid}/{key}")
public class UserKeyResource{}
@Provider
@ProduceMime("text/xml")
public class UserAttributeXmlSerializer implements MessageBodyReader,
MessageBodyWriter {
public void writeTo(Object o, Class aClass, Type type, Annotation[]
annotations, MediaType mediaType,
MultivaluedMap multivaluedMap, OutputStream outputStream)
throws IOException, WebApplicationException {
// build representation of the 'values' part of the UserKey
resource
...
// now I want to add a link to the key resource. This allows
the client to find out what scalar type or array this value represents
// there is where I'd really like to be able to get the actual
URL for a given 'key' resource
...
}
}
So the representation that I want to send to the client looks like this:
<keyvalue>
<values>
<value>123</value>
</values>
<key>http://somehost/somecontext/atributes/somekey</key>
</keyvalue>
Any ideas or answers greatly appreciated.
Thanks,
Ian. |
|
From: Bill B. <bb...@re...> - 2008-06-02 11:54:28
|
Looks like it should be 406. I'll get to it as soon as I can. http://jira.jboss.com/jira/browse/RESTEASY-48 JXrgen Zimmermann wrote: > A resource's method is annotated with @ProduceMime({"text/xml", > "text/plain"}). > The HTTP client has a header with "Accept" being set to > "application/json". > > Now there are differences in Resteasy and Jersey: > - Resteasy returns the status code 405 (METHOD NOT ALLOWED) > - Jersey returns 406 (NOT ACCEPTABLE) > > Which one is correct? > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Jürgen Z. <Jue...@HS...> - 2008-05-28 05:51:28
|
A resource's method is annotated with @ProduceMime({"text/xml",
"text/plain"}).
The HTTP client has a header with "Accept" being set to
"application/json".
Now there are differences in Resteasy and Jersey:
- Resteasy returns the status code 405 (METHOD NOT ALLOWED)
- Jersey returns 406 (NOT ACCEPTABLE)
Which one is correct?
|
|
From: Paul S. <Pau...@Su...> - 2008-05-19 13:18:56
|
Bill Burke wrote: > HTTP Spec says: > > "A successful response SHOULD be 200 (OK) if the response includes an > entity describing the status, 202 (Accepted) if the action has not yet > been enacted, or 204 (No Content) if the action has been enacted but the > response does not include an entity." > > IMO, you should be able to return anything you want as the spec says > "SHOULD" and not "MUST". Since you are building the response, IMO, > Jersey is in error. Correct. Coincidently someone logged an issue about the other week [1]. I just fixed it. > If you were not building the Response object > yourself, then it should be 204 if there is a void return type, 200 if > there is a non-void. I'll ping the expert group. > More specifically the status code set in built and returned Response should not be overridden by the JAX-RS runtime. Paul. [1] https://jersey.dev.java.net/issues/show_bug.cgi?id=61 -- | ? + ? = To question ----------------\ Paul Sandoz x38109 +33-4-76188109 |
|
From: Bill B. <bb...@re...> - 2008-05-19 12:23:00
|
JSR 311 users, see question inlined from our user base. JXrgen Zimmermann wrote: > Inside a Resource's method annotated with @DELETE I'm producing the > response this way: > return Response.ok().build(); > > Resteasy returns to the client: SC_OK (= 200) > Jersey returns to the client: SC_NO_CONTENT (= 204) > HTTP Spec says: "A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, 202 (Accepted) if the action has not yet been enacted, or 204 (No Content) if the action has been enacted but the response does not include an entity." IMO, you should be able to return anything you want as the spec says "SHOULD" and not "MUST". Since you are building the response, IMO, Jersey is in error. If you were not building the Response object yourself, then it should be 204 if there is a void return type, 200 if there is a non-void. I'll ping the expert group. I'll ask the spec (in copy). Bill -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Jürgen Z. <Jue...@HS...> - 2008-05-18 18:42:27
|
Inside a Resource's method annotated with @DELETE I'm producing the response this way: return Response.ok().build(); Resteasy returns to the client: SC_OK (= 200) Jersey returns to the client: SC_NO_CONTENT (= 204) Hmm, so which response is the right one? -- Juergen |
|
From: Bill B. <bb...@re...> - 2008-05-03 05:07:33
|
I'll check the Spring api difference between 2.0 and 2.5. Cecil New wrote: > Yup... spring 2.5 did the trick. I'll start on my database pilot app > now and use 2.5 there too. Here's hoping! > > Thanks! > > > 00:06:41,468 INFO [STDOUT] Inside setSpringTest() with OK > 00:06:41,468 INFO [ContextLoader] Root WebApplicationContext: > initialization co > mpleted in 250 ms > 00:07:19,577 INFO [STDOUT] LOCATING...(OK) > 00:07:19,593 INFO [STDOUT] getBasic() -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Cecil N. <cec...@gm...> - 2008-05-03 04:09:30
|
Yup... spring 2.5 did the trick. I'll start on my database pilot app now and use 2.5 there too. Here's hoping! Thanks! 00:06:41,468 INFO [STDOUT] Inside setSpringTest() with OK 00:06:41,468 INFO [ContextLoader] Root WebApplicationContext: initialization co mpleted in 250 ms 00:07:19,577 INFO [STDOUT] LOCATING...(OK) 00:07:19,593 INFO [STDOUT] getBasic() |
|
From: Cecil N. <cec...@gm...> - 2008-05-03 03:41:17
|
On Fri, May 2, 2008 at 5:20 PM, Bill Burke <bb...@re...> wrote: > I'm baffled. Here's a simple I used to test things: > > > http://resteasy.svn.sourceforge.net/viewvc/resteasy/trunk/jaxrs/jboss-integration-testing/spring-integration-test/ > Took your example and modified it a bit to do some bean wiring. The first thing I noticed is that you use spring 2.5... I'm still at 2.0. Do you know if that is a strict dependency? Assuming not... Not sure that the mail list can take attachments, but I'll try that first. - tweaked the LocatingResource.java code to add some get/set methods for spring to use when configuring the bean. - Added setup in applicationContext.xml and reverted to spring 2.0 - Set the scan to true (otherwise no jax-rs classes get registered - Tweaked my standard build.xml to handle the directories in this case Here is console output on deploy and a few lines after a test url. You will see that on startup the new variable in LocatingResouce is set to "OK" by spring. But on the GET url, it is null. {Hoping that maybe this is all due to need for spring 2.5 and that it isn't something more serious. I'll take a stab using 2.5 next with this revised example.} Thanks for your help. 23:27:31,665 INFO [TomcatDeployer] deploy, ctxPath=/spring-integration-test, wa rUrl=.../tmp/deploy/tmp61989spring-integration-test-exp.war/ 23:27:32,587 INFO [STDOUT] FOUND JAX-RS resource: org.jboss.resteasy.test.smoke .LocatingResource 23:27:32,618 INFO [STDOUT] FOUND JAX-RS resource: org.jboss.resteasy.test.smoke .SimpleResource 23:27:32,633 INFO [[/spring-integration-test]] Initializing Spring root WebAppl icationContext 23:27:32,633 INFO [ContextLoader] Root WebApplicationContext: initialization st arted 23:27:32,665 INFO [XmlWebApplicationContext] Refreshing org.springframework.web .context.support.XmlWebApplicationContext@abe449: display name [Root WebApplicat ionContext]; startup date [Fri May 02 23:27:32 EDT 2008]; root of context hierar chy 23:27:32,743 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from S ervletContext resource [/WEB-INF/applicationContext.xml] 23:27:32,805 INFO [XmlWebApplicationContext] Bean factory for application conte xt [org.springframework.web.context.support.XmlWebApplicationContext@abe449]: or g.springframework.beans.factory.support.DefaultListableBeanFactory@11f81b0 23:27:32,837 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@11f81b0: de fining beans [simple,locating]; root of factory hierarchy 23:27:32,868 INFO [STDOUT] Inside setSpringTest() with OK 23:27:32,868 INFO [ContextLoader] Root WebApplicationContext: initialization co mpleted in 235 ms http://localhost/spring-integration-test/locating/basic 23:28:10,712 INFO [STDOUT] LOCATING...(null) 23:28:10,712 INFO [STDOUT] getBasic() |
|
From: Bill B. <bb...@re...> - 2008-05-02 21:18:40
|
I'm baffled. Here's a simple I used to test things: http://resteasy.svn.sourceforge.net/viewvc/resteasy/trunk/jaxrs/jboss-integration-testing/spring-integration-test/ One thing I noted in your previous email. Are you sure you have the correct class name in your bean definition? <bean id="dbquery3_dao" class="dbquery3_dao" > <property name="jdbcTemplate"> <ref bean="gxoJdbcTemplate" /> </property> </bean> the id is the same as the "class" attribute. Is this a typo? cut/paste error? -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Cecil N. <cec...@gm...> - 2008-05-02 20:57:29
|
If I turn of scanning or remove context-param, I get a 404 > Are the beans being instantiated by Spring ok, but the request isn't being > dispatched to the beans created by Spring? > So I think the later is the case. Here is console output. Notice that no JAX-RX resources are registered. The STDOUT lines show the bean actions at work. The DAO var isn't null at that point. Both variations are below. Thanks for your help. *Console output without the scan (results in 404):* 16:45:04,544 INFO [[/restdb3]] Initializing Spring root WebApplicationContext 16:45:04,544 INFO [ContextLoader] Root WebApplicationContext: initialization st arted 16:45:04,575 INFO [XmlWebApplicationContext] Refreshing org.springframework.web .context.support.XmlWebApplicationContext@ab6a53: display name [Root WebApplicat ionContext]; startup date [Fri May 02 16:45:04 EDT 2008]; root of context hierar chy 16:45:04,638 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from S ervletContext resource [/WEB-INF/applicationContext.xml] 16:45:04,716 INFO [XmlWebApplicationContext] Bean factory for application conte xt [org.springframework.web.context.support.XmlWebApplicationContext@ab6a53]: or g.springframework.beans.factory.support.DefaultListableBeanFactory@11e4bcc 16:45:05,606 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@11e4bcc: de fining beans [plmwh,geJdbcTemplate,dbquery3_dao,getpart]; root of factory hierar chy 16:45:05,700 INFO [STDOUT] == JDBC Template is set == 16:45:05,700 INFO [STDOUT] is not null! 16:45:05,700 INFO [STDOUT] ==> DAO set; is null? false 16:45:05,700 INFO [ContextLoader] Root WebApplicationContext: initialization co mpleted in 1156 ms *Console output when scan is on: * 16:51:21,511 INFO [TomcatDeployer] deploy, ctxPath=/restdb3, warUrl=.../tmp/dep loy/tmp9697restdb3-exp.war/ 16:51:22,745 INFO [STDOUT] FOUND JAX-RS resource: dbquery3 16:51:22,792 INFO [[/restdb3]] Initializing Spring root WebApplicationContext 16:51:22,792 INFO [ContextLoader] Root WebApplicationContext: initialization st arted 16:51:22,823 INFO [XmlWebApplicationContext] Refreshing org.springframework.web .context.support.XmlWebApplicationContext@1e27ea6: display name [Root WebApplica tionContext]; startup date [Fri May 02 16:51:22 EDT 2008]; root of context hiera rchy 16:51:22,901 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from S ervletContext resource [/WEB-INF/applicationContext.xml] 16:51:22,964 INFO [XmlWebApplicationContext] Bean factory for application conte xt [org.springframework.web.context.support.XmlWebApplicationContext@1e27ea6]: o rg.springframework.beans.factory.support.DefaultListableBeanFactory@17455a9 16:51:22,995 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@17455a9: de fining beans [plmwh,geJdbcTemplate,dbquery3_dao,getpart]; root of factory hierar chy 16:51:23,073 INFO [STDOUT] == JDBC Template is set == 16:51:23,089 INFO [STDOUT] is not null! 16:51:23,089 INFO [STDOUT] ==> DAO set; is null? false 16:51:23,089 INFO [ContextLoader] Root WebApplicationContext: initialization co mpleted in 297 ms 16:51:53,166 INFO [STDOUT] DAO is null |
|
From: Bill B. <bb...@re...> - 2008-05-02 20:19:01
|
Cecil New wrote: > Hello- A question on resteasy and spring... Are the beans being instantiated by Spring ok, but the request isn't being dispatched to the beans created by Spring? I think you need turn off scanning, or just remove these lines > <!-- JSR 311 stuff --> > <display-name>Archetype Created Web Application</display-name> > <context-param> > <param-name>resteasy.scan</param-name> > <param-value>true</param-value> > </context-param> > Turn off scanning by setting resteasy.scan to false. I think removing that context-param declaration will work too. Let me know how it goes. Bill -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |