R
rafalak
hello !
how i get access to bean from axis to spring context ?
in WebService I use
String[] configFiles = new String[] {"/WEB-INF/dispatcher-
servlet.xml"};
BeanFactory spring = new ClassPathXmlApplicationContext(configFiles);
Object obj = spring.getBean("sessionFactory");
but get FileNotFound Exception
my appContext.xml
....
<jaxws:endpoint id="helloWorld" implementor="test.ws.test" address="/
x" />
....
my web.xml
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-
class>org.springframework.web.servlet.DispatcherServlet</servlet-
class>
<load-on-startup>1</load-on-startup>
</servlet>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/appContext.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</
servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
how i get access to bean from axis to spring context ?
in WebService I use
String[] configFiles = new String[] {"/WEB-INF/dispatcher-
servlet.xml"};
BeanFactory spring = new ClassPathXmlApplicationContext(configFiles);
Object obj = spring.getBean("sessionFactory");
but get FileNotFound Exception
my appContext.xml
....
<jaxws:endpoint id="helloWorld" implementor="test.ws.test" address="/
x" />
....
my web.xml
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-
class>org.springframework.web.servlet.DispatcherServlet</servlet-
class>
<load-on-startup>1</load-on-startup>
</servlet>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/appContext.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</
servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>