Fair enough :)!

I sent you the test case to your email address.

Thanks!
Veit

Am 20. Januar 2015 14:38:15 MEZ, schrieb Sergey Beryozkin 
<[email protected]>:
>The following is used to create a proxy:
>
>Class<?>[] ifaces = new Class[]{Client.class, 
>InvocationHandlerAware.class, cri.getServiceClass()};
>
>you are seeing a cast exception where a Client instance is casted to 
>InvocationHandlerAware which is a bit strange, may be I can add another
>
>branch there and cast Client to AbstractClient, but I'd like to have a 
>test case...
>
>Sergey
>On 20/01/15 13:29, Sergey Beryozkin wrote:
>> Hi
>>
>> It works for me.
>> Can you please set up a simple test project ?
>>
>> Thanks, Sergey
>> On 20/01/15 11:10, Veit Guna wrote:
>>> Hi.
>>>
>>> I'm using CXF 3.0.3 together with the CXF client proxy API.
>>> For that, I'm using the interfaces (!) from the server side
>>> implementation on the client.
>>>
>>> I tried to convert the proxy into a WebClient like explained here:
>>>
>>>
>http://cxf.apache.org/docs/jax-rs-client-api.html#JAX-RSClientAPI-ConvertingproxiestoWebClientsandviceversa
>>>
>>>
>>> But that ends in:
>>>
>>> Exception in thread "main" java.lang.ClassCastException:
>>> com.sun.proxy.$Proxy37 cannot be cast to
>>> org.apache.cxf.jaxrs.client.InvocationHandlerAware
>>>                  at
>>>
>org.apache.cxf.jaxrs.client.WebClient.toAbstractClient(WebClient.java:1235)
>>>
>>>                  at
>>>
>org.apache.cxf.jaxrs.client.WebClient.copyProperties(WebClient.java:1227)
>>>                  at
>>> org.apache.cxf.jaxrs.client.WebClient.fromClient(WebClient.java:273)
>>>                  at
>>> org.apache.cxf.jaxrs.client.WebClient.fromClient(WebClient.java:251)
>>>
>>> My code:
>>>
>>> MyServiceInterface myServiceInterface =
>>> JAXRSClientFactory.create("http://somewhere";),
>MyServiceInterface.class,
>>> providers, username, password, null);
>>> Client client = WebClient.client(myServiceInterface);
>>> WebClient httpClient = WebClient.fromClient(client); // this fails
>>>
>>> Any idea where this comes from? Does this part rely on cglib?
>>>
>>> Thanks.
>>>
>>> Veit
>>>
>>
>
>
>-- 
>Sergey Beryozkin
>
>Talend Community Coders
>http://coders.talend.com/
>
>Blog: http://sberyozkin.blogspot.com

Reply via email to