You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Marcin Cylke <mc...@touk.pl> on 2011/11/02 11:15:27 UTC

Re: Apache CXF-based REST server in OSGI container

On 10/31/2011 11:10 PM, Sergey Beryozkin wrote:

>> https://github.com/zygm0nt/cxf-playground/blob/master/rest-example/src/main/resources/META-INF/spring/beans.xml
>>
>
> JAXRSDataBinding provider is a fairly specific provider - do you need to
> use it in your project ?

No, I don't need that. It is commented out and should not be used by CXF.

>> Well, that's strange for me. I'd also like to annotate just interface
>> class, but bear in mind the problem I'm having when deploying on
>> Servicemix - only the first operation is available, others aren't.
>> Perhaps resolving this would allow me to remove annotations from
>> implementing class?
>>
> Sorry - I don't understand...Annotating the interface only has to work...

I thought the same, but as I wrote earlier, it doesn't work. It might be 
caused by Servicemix, but I just can't figure it out.

I've just performed a test with annotations on the interface only. It 
gave me this kind of errors (with url 
http://localhost:20808/myService/sayHello/xyz):

.No operation matching request path /sayHello/xyz is found, HTTP Method 
: GET, ContentType : */*, Accept : 
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,.

If is use annotations in implementation class this log is not present, 
and the result is as expected.

>> https://github.com/zygm0nt/cxf-playground/blob/master/rest-example/src/test/java/pl/touk/cxf/rest/example/MyServiceTest.java
>>
>
> I don't have time right now to run these tests, etc. Please try to
> simplify the configuration - avoid any custom providers, have a basic
> endpoint set up only,
> by the way, the jaxrs binding import is not needed anymore - will update
> the docs...

I've removed jaxrs binding import.
All those custom providers are commented out. Despite this fact, the 
tests don't work. It gives the same errors as shown above ("No operation 
matching request path"). Status code is 406.

Marcin

Re: Apache CXF-based REST server in OSGI container

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 02/11/11 13:08, Marcin Cylke wrote:
> On 11/02/2011 12:45 PM, Sergey Beryozkin wrote:
>> Which version of CXF is used in your ServiceMix download ?
>
> It's version 2.3.2.
>

We have quite a few demos with the annotations being inherited running 
in Karaf. Unfortunately I can't afford now to get the older version of 
ServiceMix which still uses 2.3.2 and start investigating.
Please try CXF 2.3.2 in Tomcat, replace 2.3.2 with 2.3.7 in the existing 
ServiceMix download or get the newer ServiceMix. Try the newer CXF in 
Tomcat - the annotations inheritance has to work - I need your help at 
this stage to see if it is a real problem or not.

Cheers, Sergey

> Marcin
>


Re: Apache CXF-based REST server in OSGI container

Posted by Marcin Cylke <mc...@touk.pl>.
On 11/02/2011 12:45 PM, Sergey Beryozkin wrote:
> Which version of CXF is used in your ServiceMix download ?

It's version 2.3.2.

Marcin


Re: Apache CXF-based REST server in OSGI container

Posted by Sergey Beryozkin <sb...@gmail.com>.
Which version of CXF is used in your ServiceMix download ?

Cheers, Sergey

On 02/11/11 10:15, Marcin Cylke wrote:
> On 10/31/2011 11:10 PM, Sergey Beryozkin wrote:
>
>>> https://github.com/zygm0nt/cxf-playground/blob/master/rest-example/src/main/resources/META-INF/spring/beans.xml
>>>
>>>
>>
>> JAXRSDataBinding provider is a fairly specific provider - do you need to
>> use it in your project ?
>
> No, I don't need that. It is commented out and should not be used by CXF.
>
>>> Well, that's strange for me. I'd also like to annotate just interface
>>> class, but bear in mind the problem I'm having when deploying on
>>> Servicemix - only the first operation is available, others aren't.
>>> Perhaps resolving this would allow me to remove annotations from
>>> implementing class?
>>>
>> Sorry - I don't understand...Annotating the interface only has to work...
>
> I thought the same, but as I wrote earlier, it doesn't work. It might be
> caused by Servicemix, but I just can't figure it out.
>
> I've just performed a test with annotations on the interface only. It
> gave me this kind of errors (with url
> http://localhost:20808/myService/sayHello/xyz):
>
> .No operation matching request path /sayHello/xyz is found, HTTP Method
> : GET, ContentType : */*, Accept :
> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,.
>
> If is use annotations in implementation class this log is not present,
> and the result is as expected.
>
>>> https://github.com/zygm0nt/cxf-playground/blob/master/rest-example/src/test/java/pl/touk/cxf/rest/example/MyServiceTest.java
>>>
>>>
>>
>> I don't have time right now to run these tests, etc. Please try to
>> simplify the configuration - avoid any custom providers, have a basic
>> endpoint set up only,
>> by the way, the jaxrs binding import is not needed anymore - will update
>> the docs...
>
> I've removed jaxrs binding import.
> All those custom providers are commented out. Despite this fact, the
> tests don't work. It gives the same errors as shown above ("No operation
> matching request path"). Status code is 406.
>
> Marcin