On 26/10/11 10:34, Marcin Cylke wrote:
On 10/25/2011 05:01 PM, Sergey Beryozkin wrote:
This is the way services can be deployed in DOSGI CXF, in other cases
just use JAXRSServerFactoryBean or attach a context to OSGI HTTP Service
(see a patch at https://issues.apache.org/jira/browse/CXF-3859 how to
get hold of HTTPService correctly),
ServiceMix also has a demo showing how Spring can be used to deploy the
endpoint.
Okey, that's reasonable. I've looked into the example You've pointed me
to and its Activator class is quite a different thing :) Haven't tried
that but it looks much more reasonable.
As for Spring deployment, I have that in my project, the source for this
file is available here:
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 ?
What's more, despite the fact, that the service is deployable and is
working correctly my tests won't pass and I can't think of a reason for
this. Perhaps someone could have a quick look.
I've put all the code on github:
https://github.com/zygm0nt/cxf-playground in case anyone would be
interested to look into this issues.
I'm not sure why you decided to annotate both interface and
implementation, having them on the interface only should do - but the
annotations look fine to me
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...
And one other thing, could You look at my unit tests? they doesn't work,
and the problem seems to be configuration-based. The code for the test
is here:
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...
Cheers, Sergey
Regards
Marcin