I have this in my applicationContext.xml (I am using http://cxf.apache.org/jaxrs)
<context:annotation-config />
<context:component-scan base-package="br.com.test" />
<bean id="jsonProvider" class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider" />
<jaxrs:client id="testClient"
serviceClass="br.com.test.ws.InterfaceServiceTest"
address="http://localhost:8080/ocs-teste-ws-web/services/myservice">
<jaxrs:providers>
<ref bean="jsonProvider" />
</jaxrs:providers>
</jaxrs:client>
I am including the jar with interface in this project but I am getting the following exception:
1318 [localhost-startStop-2] ERROR org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'someBeanImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: br.com.test.ws.InterfaceServiceTest br.com.test.impl.SomeBeanImpl.interfaceServiceTest; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [br.com.test.ws.InterfaceServiceTest] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
What am I doing wrong?
Thanks.