You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Pydipati, Karuna" <kp...@stubhub.com> on 2010/07/20 20:32:22 UTC

How to integrate CXF's ApplicationContext with mine

Hi

I have trouble integrating CXF's Spring ApplicationContext with my own (my application's) ApplicationContext. How to integrate my Spring ApplicationContext and CXF Spring ApplicationContext? Any clue?

Regards
Karuna Pydipati



Re: How to integrate CXF's ApplicationContext with mine

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 20 July 2010 2:32:22 pm Pydipati, Karuna wrote:
> Hi
> 
> I have trouble integrating CXF's Spring ApplicationContext with my own (my
> application's) ApplicationContext. How to integrate my Spring
> ApplicationContext and CXF Spring ApplicationContext? Any clue?

Normally, you would just have a single ApplicationContext that would contain 
all of your own beans and have it <import....> the required stuff for CXF.   
Kind of like:


<?xml version="1.0" encoding="UTF-8"?>
<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" />


....   all of your beans here  .....


        <jaxws:endpoint 
          id="helloWorld" 
          implementor="net.lr.java2wstest.HelloWorldImpl" 
          address="/HelloWorld" />
          
</beans>

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog