You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Loïc ¨Paillotin <lo...@gmail.com> on 2011/01/31 22:45:32 UTC
CXF and spring
Hello,
I am fairly new to CXF and Spring, and have been tasked to port an existing
XFire Soap service to CXF.
Right now, my service seems to be correctly configured: I can access the
WSDL which seems correct (minor differences but I'll worry about that
later).
The problem I have is that some beans that were injected by spring in my
service under XFire are not injected in my CXF implementation.
My implementation class looks something like this:
@WebService(endpointInterface = "demo.cxf.ServiceCxf")
public class ServiceCxfImpl implements ServiceCxf {
private SearchService search;
private SearchSpec spec;
/**
* @inheritDoc
*/
public SearchResult[] searchSimple(SearchSpec spec) {
return search.searchSimple(spec);
}
The problem is that my SearchService bean is never instantiated.
My config:
searchService.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<bean id="aegisBean"
class="org.apache.cxf.aegis.databinding.AegisDatabinding"
scope="prototype"/>
<bean id="jaxws-and-aegis-service-factory"
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
scope="prototype">
<property name="dataBinding" ref="aegisBean"/>
<property name="serviceConfigurations">
<list>
<bean
class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration"/>
<bean
class="org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfiguration"/>
<bean
class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/>
</list>
</property>
</bean>
<bean id="searchService"
class="demo.cxf.SearchService"/>
<jaxws:endpoint id="ServiceCxf"
implementor=demo.cxf.ServiceCxfImpl"
address="/searchServiceCxf">
<jaxws:serviceFactory>
<ref bean='jaxws-and-aegis-service-factory'/>
<ref bean='searchService'/>
</jaxws:serviceFactory>
</jaxws:endpoint>
</beans>
In web.xml, my servlet is simply configured like so:
<servlet>
<servlet-name>CXFServlet</servlet-name>
<display-name>CXF Servlet</display-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/cxf/*</url-pattern>
</servlet-mapping>
I have no idea why I can't inject the bean using spring. I tried lots of
different things that probably make no sense, and I am a bit lost to be
honest.
Could somebody point me in the right direction?
Thanks a lot in advance for your help.
--
Loïc Paillotin
Re: CXF and spring
Posted by loic paillotin <lo...@gmail.com>.
Hello
Well I'm a bit embarassed.
As you said, I forgot to pass the searchService bean to my implemention
bean, so it couldn't work properly.
As somebody else pointed out, due to the way my appplication is coded, I had
to pass autowire="byType" to my implementor bean.
Thanks a lot for your pointers, as usual it was a tiny problem that was
hidden (to me at least) by the forest that is CXF.
--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-and-spring-no-injection-of-spring-managed-beans-in-CXF-servlet-tp3365305p3366794.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: CXF and spring
Posted by Nordine Boussedra <ex...@agora.msa.fr>.
KARR, DAVID (ATTSI) a écrit :
>> -----Original Message-----
>> From: Loïc ¨Paillotin [mailto:loic.paillotin@gmail.com]
>> Sent: Monday, January 31, 2011 1:46 PM
>> To: users@cxf.apache.org
>> Subject: CXF and spring
>>
>> Hello,
>>
>> I am fairly new to CXF and Spring, and have been tasked to port an
>> existing
>> XFire Soap service to CXF.
>>
>> Right now, my service seems to be correctly configured: I can access
>> the
>> WSDL which seems correct (minor differences but I'll worry about that
>> later).
>>
>> The problem I have is that some beans that were injected by spring in
>> my
>> service under XFire are not injected in my CXF implementation.
>>
>> My implementation class looks something like this:
>>
>> @WebService(endpointInterface = "demo.cxf.ServiceCxf")
>> public class ServiceCxfImpl implements ServiceCxf {
>> private SearchService search;
>> private SearchSpec spec;
>> /**
>> * @inheritDoc
>> */
>> public SearchResult[] searchSimple(SearchSpec spec) {
>> return search.searchSimple(spec);
>> }
>>
>> The problem is that my SearchService bean is never instantiated.
>>
>
> You've said two things here. You've said beans are not "injected", and then you said the bean is not "instantiated". Which do you mean? Those are two different things.
>
> I'm guessing you meant the first, that your SearchService bean is instantiated, but not injected into your ServiceCxfImpl instance.
>
> In that case, did you try adding an "@Autowired" annotation before the "search" instance variable?
>
>
Moreover, you have to define the bean SearchService or if it's an
interface the bean that implements the interface in the spring
application context (via component scan or use of "<bean class=" directly).
>> My config:
>> searchService.xml
>> <beans xmlns="http://www.springframework.org/schema/beans"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:jaxws="http://cxf.apache.org/jaxws"
>> xsi:schemaLocation="
>> http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans.xsd
>> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
>>
>> <import resource="classpath:META-INF/cxf/cxf.xml" />
>> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>> <bean id="aegisBean"
>> class="org.apache.cxf.aegis.databinding.AegisDatabinding"
>> scope="prototype"/>
>> <bean id="jaxws-and-aegis-service-factory"
>> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
>> scope="prototype">
>> <property name="dataBinding" ref="aegisBean"/>
>> <property name="serviceConfigurations">
>> <list>
>> <bean
>> class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration"/>
>> <bean
>> class="org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfig
>> uration"/>
>> <bean
>> class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/>
>> </list>
>> </property>
>> </bean>
>>
>>
>> <bean id="searchService"
>> class="demo.cxf.SearchService"/>
>>
>>
>> <jaxws:endpoint id="ServiceCxf"
>> implementor=demo.cxf.ServiceCxfImpl"
>> address="/searchServiceCxf">
>> <jaxws:serviceFactory>
>> <ref bean='jaxws-and-aegis-service-factory'/>
>> <ref bean='searchService'/>
>> </jaxws:serviceFactory>
>>
>>
>> </jaxws:endpoint>
>> </beans>
>>
>> In web.xml, my servlet is simply configured like so:
>>
>> <servlet>
>> <servlet-name>CXFServlet</servlet-name>
>> <display-name>CXF Servlet</display-name>
>> <servlet-class>
>> org.apache.cxf.transport.servlet.CXFServlet
>> </servlet-class>
>> </servlet>
>>
>> <servlet-mapping>
>> <servlet-name>CXFServlet</servlet-name>
>> <url-pattern>/cxf/*</url-pattern>
>> </servlet-mapping>
>>
>>
>> I have no idea why I can't inject the bean using spring. I tried lots
>> of
>> different things that probably make no sense, and I am a bit lost to be
>> honest.
>> Could somebody point me in the right direction?
>>
>> Thanks a lot in advance for your help.
>>
>> --
>> Loïc Paillotin
>>
Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe.
This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached.
RE: CXF and spring
Posted by "KARR, DAVID (ATTSI)" <dk...@att.com>.
> -----Original Message-----
> From: Loïc ¨Paillotin [mailto:loic.paillotin@gmail.com]
> Sent: Monday, January 31, 2011 1:46 PM
> To: users@cxf.apache.org
> Subject: CXF and spring
>
> Hello,
>
> I am fairly new to CXF and Spring, and have been tasked to port an
> existing
> XFire Soap service to CXF.
>
> Right now, my service seems to be correctly configured: I can access
> the
> WSDL which seems correct (minor differences but I'll worry about that
> later).
>
> The problem I have is that some beans that were injected by spring in
> my
> service under XFire are not injected in my CXF implementation.
>
> My implementation class looks something like this:
>
> @WebService(endpointInterface = "demo.cxf.ServiceCxf")
> public class ServiceCxfImpl implements ServiceCxf {
> private SearchService search;
> private SearchSpec spec;
> /**
> * @inheritDoc
> */
> public SearchResult[] searchSimple(SearchSpec spec) {
> return search.searchSimple(spec);
> }
>
> The problem is that my SearchService bean is never instantiated.
You've said two things here. You've said beans are not "injected", and then you said the bean is not "instantiated". Which do you mean? Those are two different things.
I'm guessing you meant the first, that your SearchService bean is instantiated, but not injected into your ServiceCxfImpl instance.
In that case, did you try adding an "@Autowired" annotation before the "search" instance variable?
> My config:
> searchService.xml
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:jaxws="http://cxf.apache.org/jaxws"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
>
> <import resource="classpath:META-INF/cxf/cxf.xml" />
> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> <bean id="aegisBean"
> class="org.apache.cxf.aegis.databinding.AegisDatabinding"
> scope="prototype"/>
> <bean id="jaxws-and-aegis-service-factory"
> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
> scope="prototype">
> <property name="dataBinding" ref="aegisBean"/>
> <property name="serviceConfigurations">
> <list>
> <bean
> class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration"/>
> <bean
> class="org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfig
> uration"/>
> <bean
> class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/>
> </list>
> </property>
> </bean>
>
>
> <bean id="searchService"
> class="demo.cxf.SearchService"/>
>
>
> <jaxws:endpoint id="ServiceCxf"
> implementor=demo.cxf.ServiceCxfImpl"
> address="/searchServiceCxf">
> <jaxws:serviceFactory>
> <ref bean='jaxws-and-aegis-service-factory'/>
> <ref bean='searchService'/>
> </jaxws:serviceFactory>
>
>
> </jaxws:endpoint>
> </beans>
>
> In web.xml, my servlet is simply configured like so:
>
> <servlet>
> <servlet-name>CXFServlet</servlet-name>
> <display-name>CXF Servlet</display-name>
> <servlet-class>
> org.apache.cxf.transport.servlet.CXFServlet
> </servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>CXFServlet</servlet-name>
> <url-pattern>/cxf/*</url-pattern>
> </servlet-mapping>
>
>
> I have no idea why I can't inject the bean using spring. I tried lots
> of
> different things that probably make no sense, and I am a bit lost to be
> honest.
> Could somebody point me in the right direction?
>
> Thanks a lot in advance for your help.
>
> --
> Loïc Paillotin
Re: CXF and spring
Posted by Willem Jiang <wi...@gmail.com>.
On 2/1/11 5:45 AM, Loïc ¨Paillotin wrote:
> Hello,
>
> I am fairly new to CXF and Spring, and have been tasked to port an existing
> XFire Soap service to CXF.
>
> Right now, my service seems to be correctly configured: I can access the
> WSDL which seems correct (minor differences but I'll worry about that
> later).
>
> The problem I have is that some beans that were injected by spring in my
> service under XFire are not injected in my CXF implementation.
What's the bean that is not injected into your CXF implementation?
>
> My implementation class looks something like this:
>
> @WebService(endpointInterface = "demo.cxf.ServiceCxf")
> public class ServiceCxfImpl implements ServiceCxf {
> private SearchService search;
> private SearchSpec spec;
> /**
> * @inheritDoc
> */
> public SearchResult[] searchSimple(SearchSpec spec) {
> return search.searchSimple(spec);
> }
>
> The problem is that my SearchService bean is never instantiated.
>
> My config:
> searchService.xml
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:jaxws="http://cxf.apache.org/jaxws"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
>
> <import resource="classpath:META-INF/cxf/cxf.xml" />
> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> <bean id="aegisBean"
> class="org.apache.cxf.aegis.databinding.AegisDatabinding"
> scope="prototype"/>
> <bean id="jaxws-and-aegis-service-factory"
> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
> scope="prototype">
> <property name="dataBinding" ref="aegisBean"/>
> <property name="serviceConfigurations">
> <list>
> <bean
> class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration"/>
> <bean
> class="org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfiguration"/>
> <bean
> class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/>
> </list>
> </property>
> </bean>
>
>
> <bean id="searchService"
> class="demo.cxf.SearchService"/>
>
>
> <jaxws:endpoint id="ServiceCxf"
> implementor=demo.cxf.ServiceCxfImpl"
CXF will create the service implementer for your in this case.
> address="/searchServiceCxf">
> <jaxws:serviceFactory>
> <ref bean='jaxws-and-aegis-service-factory'/>
> <ref bean='searchService'/>
> </jaxws:serviceFactory>
>
>
> </jaxws:endpoint>
> </beans>
>
> In web.xml, my servlet is simply configured like so:
>
> <servlet>
> <servlet-name>CXFServlet</servlet-name>
> <display-name>CXF Servlet</display-name>
> <servlet-class>
> org.apache.cxf.transport.servlet.CXFServlet
> </servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>CXFServlet</servlet-name>
> <url-pattern>/cxf/*</url-pattern>
> </servlet-mapping>
>
>
> I have no idea why I can't inject the bean using spring. I tried lots of
> different things that probably make no sense, and I am a bit lost to be
> honest.
> Could somebody point me in the right direction?
>
> Thanks a lot in advance for your help.
>
> --
> Loïc Paillotin
>
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Re: CXF and spring
Posted by Loïc ¨Paillotin <lo...@gmail.com>.
Hello,
I should have mentioned that I have that.
It is a bit different due to how my application is packaged but it
essentially does the same:
<web-app>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:searchService.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
I found a thread where Dan Kulp said the following:
Change to something like:
<bean id="MyImpl" class="minitest.service.impl.MiniServiceImpl"/>
<jaxws:endpoint id="miniservice"
implementor="#MyImpl"
address="/MiniService">
<jaxws:properties>
I think there are a couple examples similar to that in the docs someplace.
Basically, you want your impl to be created with a standard swing <bean>
tag.
Thus, Spring will inject things. Then just reference it from the endpoint
tag.
Dan
I tried this and it doesn't seem to work either. However I have polluted my
install with some of my attempts so I'll try again from a clean config.
--
Loïc Paillotin
On Mon, Jan 31, 2011 at 2:17 PM, Christian Schneider <
chris@die-schneider.net> wrote:
> What seems to be missing is a contextloaderlistener that boots up your
> spring context.
>
> <web-app>
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>WEB-INF/searchService.xml</param-value>
> </context-param>
>
> <listener>
>
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> </listener>
> ...
> </web-app>
>
> Best regards
>
> Christian
>
> Am 31.01.2011 22:45, schrieb Loďc ¨Paillotin:
>
>> Hello,
>>
>> I am fairly new to CXF and Spring, and have been tasked to port an
>> existing
>> XFire Soap service to CXF.
>>
>> Right now, my service seems to be correctly configured: I can access the
>> WSDL which seems correct (minor differences but I'll worry about that
>> later).
>>
>> The problem I have is that some beans that were injected by spring in my
>> service under XFire are not injected in my CXF implementation.
>>
>> My implementation class looks something like this:
>>
>> @WebService(endpointInterface = "demo.cxf.ServiceCxf")
>> public class ServiceCxfImpl implements ServiceCxf {
>> private SearchService search;
>> private SearchSpec spec;
>> /**
>> * @inheritDoc
>> */
>> public SearchResult[] searchSimple(SearchSpec spec) {
>> return search.searchSimple(spec);
>> }
>>
>> The problem is that my SearchService bean is never instantiated.
>>
>> My config:
>> searchService.xml
>> <beans xmlns="http://www.springframework.org/schema/beans"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:jaxws="http://cxf.apache.org/jaxws"
>> xsi:schemaLocation="
>> http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans.xsd
>> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
>>
>> <import resource="classpath:META-INF/cxf/cxf.xml" />
>> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>> <bean id="aegisBean"
>> class="org.apache.cxf.aegis.databinding.AegisDatabinding"
>> scope="prototype"/>
>> <bean id="jaxws-and-aegis-service-factory"
>> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
>> scope="prototype">
>> <property name="dataBinding" ref="aegisBean"/>
>> <property name="serviceConfigurations">
>> <list>
>> <bean
>> class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration"/>
>> <bean
>>
>> class="org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfiguration"/>
>> <bean
>> class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/>
>> </list>
>> </property>
>> </bean>
>>
>>
>> <bean id="searchService"
>> class="demo.cxf.SearchService"/>
>>
>>
>> <jaxws:endpoint id="ServiceCxf"
>> implementor=demo.cxf.ServiceCxfImpl"
>> address="/searchServiceCxf">
>> <jaxws:serviceFactory>
>> <ref bean='jaxws-and-aegis-service-factory'/>
>> <ref bean='searchService'/>
>> </jaxws:serviceFactory>
>>
>>
>> </jaxws:endpoint>
>> </beans>
>>
>> In web.xml, my servlet is simply configured like so:
>>
>> <servlet>
>> <servlet-name>CXFServlet</servlet-name>
>> <display-name>CXF Servlet</display-name>
>> <servlet-class>
>> org.apache.cxf.transport.servlet.CXFServlet
>> </servlet-class>
>> </servlet>
>>
>> <servlet-mapping>
>> <servlet-name>CXFServlet</servlet-name>
>> <url-pattern>/cxf/*</url-pattern>
>> </servlet-mapping>
>>
>>
>> I have no idea why I can't inject the bean using spring. I tried lots of
>> different things that probably make no sense, and I am a bit lost to be
>> honest.
>> Could somebody point me in the right direction?
>>
>> Thanks a lot in advance for your help.
>>
>> --
>> Loďc Paillotin
>>
>>
> --
> ----
> http://www.liquid-reality.de
>
>
Re: CXF and spring
Posted by Christian Schneider <ch...@die-schneider.net>.
What seems to be missing is a contextloaderlistener that boots up your
spring context.
<web-app>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/searchService.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
...
</web-app>
Best regards
Christian
Am 31.01.2011 22:45, schrieb Loïc ¨Paillotin:
> Hello,
>
> I am fairly new to CXF and Spring, and have been tasked to port an existing
> XFire Soap service to CXF.
>
> Right now, my service seems to be correctly configured: I can access the
> WSDL which seems correct (minor differences but I'll worry about that
> later).
>
> The problem I have is that some beans that were injected by spring in my
> service under XFire are not injected in my CXF implementation.
>
> My implementation class looks something like this:
>
> @WebService(endpointInterface = "demo.cxf.ServiceCxf")
> public class ServiceCxfImpl implements ServiceCxf {
> private SearchService search;
> private SearchSpec spec;
> /**
> * @inheritDoc
> */
> public SearchResult[] searchSimple(SearchSpec spec) {
> return search.searchSimple(spec);
> }
>
> The problem is that my SearchService bean is never instantiated.
>
> My config:
> searchService.xml
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:jaxws="http://cxf.apache.org/jaxws"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
>
> <import resource="classpath:META-INF/cxf/cxf.xml" />
> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> <bean id="aegisBean"
> class="org.apache.cxf.aegis.databinding.AegisDatabinding"
> scope="prototype"/>
> <bean id="jaxws-and-aegis-service-factory"
> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
> scope="prototype">
> <property name="dataBinding" ref="aegisBean"/>
> <property name="serviceConfigurations">
> <list>
> <bean
> class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration"/>
> <bean
> class="org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfiguration"/>
> <bean
> class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/>
> </list>
> </property>
> </bean>
>
>
> <bean id="searchService"
> class="demo.cxf.SearchService"/>
>
>
> <jaxws:endpoint id="ServiceCxf"
> implementor=demo.cxf.ServiceCxfImpl"
> address="/searchServiceCxf">
> <jaxws:serviceFactory>
> <ref bean='jaxws-and-aegis-service-factory'/>
> <ref bean='searchService'/>
> </jaxws:serviceFactory>
>
>
> </jaxws:endpoint>
> </beans>
>
> In web.xml, my servlet is simply configured like so:
>
> <servlet>
> <servlet-name>CXFServlet</servlet-name>
> <display-name>CXF Servlet</display-name>
> <servlet-class>
> org.apache.cxf.transport.servlet.CXFServlet
> </servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>CXFServlet</servlet-name>
> <url-pattern>/cxf/*</url-pattern>
> </servlet-mapping>
>
>
> I have no idea why I can't inject the bean using spring. I tried lots of
> different things that probably make no sense, and I am a bit lost to be
> honest.
> Could somebody point me in the right direction?
>
> Thanks a lot in advance for your help.
>
> --
> Loïc Paillotin
>
--
----
http://www.liquid-reality.de