Here is my example. It's not all that different to your suggestion.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xbean.org/schemas/spring/1.0";
       xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0";>
    
    <jsr181:endpoint wsdlResource="classpath:service.wsdl" style="document">
        <jsr181:pojo>
            <bean class="test.PersonImpl">
                <property name="context" ref="context"/>
                <property name="anotherService" ref="anotherService"/>
            </bean>
        </jsr181:pojo>
    </jsr181:endpoint>

    <bean id="anotherService" class="another.AnotherServiceImpl"/>
</beans>




rabi wrote:
> 
> 
> Can you post your complete xbean.xml.
> 
> Btw, you can specify anotherService as a property in your jsr181
> implementation class and then inject it as usual.
> 
> Ex.
> 
> <jsr181:endpoint  pojo="#mypojo" wsdlResource="classpath:service.wsdl" 
>                      typeMapping="jaxb2"
>                      annotations="jsr181"
>                      style="document"/>
>    
>       <bean id="mypojo"
>       
> class="org.apache.servicemix.samples.Samplejsr181.MyPojoImpl">
>                       <property name="anotherService">
>                               <bean
> class="another.AnotherServiceImpl"/>
>                       </property>
>       </bean>
> 
> Regards,
> Rabi Mishra, 
> -----Original Message-----
> From: cjn [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 06, 2007 2:46 PM
> To: [email protected]
> Subject: Adding local (non-JBI) Spring dependencies
> 
> 
> I would like to invoke a Spring bean from a JSR 181 endpoint class,
> packaged in the same service unit .zip as a the endpoint, via standard
> Spring IOC (setter injection). Since I understand that XBean is an
> extention to Spring, I've added the spring definition to my xbean.xml
> (am I right in doing
> this?):
> 
> <bean id="anotherService" class="another.AnotherServiceImpl"/>
> 
> However the moment I do this the Maven build scripts fail with:
> 
> [INFO] Failed to generate jbi.xml
> 
> Embedded error: Unable to generate service unit descriptor!
> another.AnotherServiceImpl
> 
> 
> Note that I haven't declared that bean as a jsr181:endoint or
> jsr181:pojo!
> --
> View this message in context:
> http://www.nabble.com/Adding-local-%28non-JBI%29-Spring-dependencies-tf4
> 223012s12049.html#a12013152
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 
> 
> 
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you
> are not the intended recipient, you should not disseminate, distribute or
> copy this e-mail. Please notify the sender immediately and destroy all
> copies of this message and any attachments. 
> 
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses.
> The company accepts no liability for any damage caused by any virus
> transmitted by this email.
>  
> www.wipro.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Adding-local-%28non-JBI%29-Spring-dependencies-tf4223012s12049.html#a12014775
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to