Hi Andy

CXf does not ship CGLIB and I've updated the docs recently that a CGLIB lib
has to be added in such cases.
The IllegalArgumentException is coming directly out of CGLIB, but I've
updated the catch block to check for the actual IllegalArgumentException 
message and if it matches "'simple classname' is not an interface' then ';
make sure CGLIB is on classpath' will be added... I will update the trunk
later on as I'm a bit busy at the moment...

> After adding 'wc.accept("text/xml")' to webclient add used three-params
> version of 'fromClient()' with 'inherit param from client' set to true, I
> finally passed test

inherit headers parameter can indeed be handy when converting from web
clients to proxies (or vice versa). But you can also modify the proxy
headers if needed as follows :

WebClient client ...
Book proxy = JaxrsClientFactory.fromClient(webClient);
WebClient.client(proxy).accept("application/xml");

cheers, Sergey


amichalec wrote:
> 
> Hi Sergey,
> this test project is generated by maven using the only
> "cxf-rt-frontend-jaxrs" dependency which apparently does not imply use of
> cglib. Adding lib solved my issue... and just to make excuse ;) I neither
> noticed that I am missing CGLIB nor exception message suggested this
> (message like "X is not interface; for proxying classes make sure CGLIB is
> on classpath" would be perfect).
> 
> After that I was still experiencing WebApplicationException with "406 not
> acceptable" and log message like this: "No operation matching request path
> /foo is found, ContentType : */*, Accept : application/xml". After adding
> 'wc.accept("text/xml")' to webclient add used three-params version of
> 'fromClient()' with 'inherit param from client' set to true, I finally
> passed test... 
> 
> Good to know stuff is working fine ;) thanks for your support.
> 
> cheers,
> andy.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/WebClient-fails-to-unmarshall-tp25337879p25398243.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to