Should your ref value not be 
mailSender rather than
mailSenderFacade
to match up with your bean's id?

> Date: Wed, 4 Nov 2009 10:54:42 +0200
> Subject: Spring Bean Injection for Endpoint
> From: [email protected]
> To: [email protected]
> 
> Hi All,
> I'm using CXF with JBoss app. server and it's necessary to inject a few
> spring beans into endpoint object.
> I tried the following solution, but it wasn't working for me:
> <beans
>  xmlns="http://www.springframework.org/schema/beans";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>  xmlns:beans="http://www.springframework.org/schema/beans";
>  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";>
> 
>  <bean id="mailSenderPortType"
> class="pl.com.agora.mailsender.ws.MailSenderPortTypeImpl">
>   <property name="mailSenderFacade" ref="mailSenderFacade"/>
>  </bean>
> 
>  <jaxws:endpoint
>   id="mailSender"
>   address="http://localhost:8080/mailSender";
> implementor="#mailSenderPortType">
>   <jaxws:invoker>
>   <bean class="org.jboss.wsf.stack.cxf.InvokerJSE"/>
>   </jaxws:invoker>
>  </jaxws:endpoint>
> 
> </beans>
> 
> mailSenderFacade property is always null at runtime.
> Thanks in advance for any advise!
                                          
_________________________________________________________________
New Windows 7: Find the right PC for you. Learn more.
http://windows.microsoft.com/shop

Reply via email to