Re: [Resteasy-users] How to setup RESTEasy with CDI and Netty?

2013-11-26 Thread Christian Helmbold
Thank you. After adding one more dependency (javax.servlet-api), I get the following error, when I try to start my RESTEasy/Weld configuration: Exception in thread "main" java.lang.RuntimeException: Unable to instantiate InjectorFactory implementation.     at org.jboss.resteasy.spi.ResteasyDepl

Re: [Resteasy-users] How to setup RESTEasy with CDI and Netty?

2013-11-26 Thread John D. Ament
I assumed this would happen, based on Bill's email. you'll probably need to extend the CdiInjectorFactory to use your own BeanManager. On Tue, Nov 26, 2013 at 1:58 PM, Christian Helmbold wrote: > Thank you. After adding one more dependency (javax.servlet-api), I get the > following error, when

[Resteasy-users] Replacing ProxyFactory with RestEasyWebTarget does not work

2013-11-26 Thread Gabriella Turek
After upgrading from Resteasy 2.4 to 3.0.5, none of my client calls work anymore. The entity which I am expecting (as simple as a String) is always null. In debug mode I can see it being set in the Response object on the server side, but on the client side the entity in the Response is null. Her

Re: [Resteasy-users] Replacing ProxyFactory with RestEasyWebTarget does not work

2013-11-26 Thread Bill Burke
This is a Resteasy Client -> JAX-RS 2.0 mismatch migration problem. Replace: response.getEntity() with: response.readEntity(String.class); replace String.class to whatever class you want to marshal to. getEntity() returns null if you haven't unmarshalled anything with readEntity(). On 11/

Re: [Resteasy-users] Replacing ProxyFactory with RestEasyWebTarget does not work

2013-11-26 Thread Gabriella Turek
No, I've tried that, it does not work. I get the following error: java.lang.ClassCastException: javax.xml.bind.JAXBElement cannot be cast to nz.org.riskscape.license.rest.domain.LicenseList at nz.org.riskscape.license.rest.RiskScapeLicenseServiceTest.testGetExpiredLic enses(RiskScapeLicens

Re: [Resteasy-users] Replacing ProxyFactory with RestEasyWebTarget does not work

2013-11-26 Thread Bill Burke
This does not work? LicenseList list = response.readEntity(LicenseList.class); You could also try this: LicenseList list = response.readEntity(new GenericType>() {}).getValue(); javax.ws.rs.core.GenericType On 11/26/2013 4:00 PM, Gabriella Turek wrote: > No, I've tried that, it does not work.

Re: [Resteasy-users] How to setup RESTEasy with CDI and Netty?

2013-11-26 Thread Christian Helmbold
> John D. Ament schrieb am 20:23 Dienstag, 26.November > 2013: > > I assumed this would happen, based on Bill's email. You're right. This happend after adding the following line to my startup code: deployment.setInjectorFactoryClass(org.jboss.resteasy.cdi.CdiInjectorFactory.class.getName()

Re: [Resteasy-users] Replacing ProxyFactory with RestEasyWebTarget does not work

2013-11-26 Thread Gabriella Turek
So, I've resolved my issue by updating my schema with jaxb:version="2.0" and regenerating the jaxb classes. The tip off was Bill's mention of there being a Resteasy Client -> JAX-RS 2.0 mismatch migration problem Cheers! Gaby >On 27/11/13 10:00 AM, "Gabriella Turek" >wrote: > >>No, I've tried th

Re: [Resteasy-users] How to setup RESTEasy with CDI and Netty?

2013-11-26 Thread Bill Burke
On 11/26/2013 4:17 PM, Christian Helmbold wrote: > > > > > >> John D. Ament schrieb am 20:23 Dienstag, >> 26.November 2013: >>> I assumed this would happen, based on Bill's email. > > You're right. This happend after adding the following line to my startup code: > > deployment.setInjectorFactor

Re: [Resteasy-users] How to setup RESTEasy with CDI and Netty?

2013-11-26 Thread John D. Ament
Bill, Actually from looking at the current impl, I have a fairly small trivial change. It would only work in CDI 1.1 though. I could probably implement it using reflection to avoid the compilation change, if you're interested in taking the contribution. This would use standard CDI look up in an

Re: [Resteasy-users] How to setup RESTEasy with CDI and Netty?

2013-11-26 Thread Bill Burke
Submit a pull request, i'll take a look On 11/26/2013 7:05 PM, John D. Ament wrote: > Bill, > > Actually from looking at the current impl, I have a fairly small > trivial change. It would only work in CDI 1.1 though. I could > probably implement it using reflection to avoid the compilation > cha

[Resteasy-users] How to set up RestEasyClient to follow redirects?

2013-11-26 Thread Gabriella Turek
So I've managed to expend my client code to support proxy and SSL. Now I need to make them work with a redirect. My queries are all failing with a status 301 (both POST and GET) What do I need to do to make sure the redirect is followed? Here's an example of my call ResteasyClientBuilder rsb