Hello,

I have a project containing a set of POJO's that I am trying to expose as
services with CXF. These objects use spring 2.5.5 and uses Spring IOC wire
the objects together. Everything works fine when I use JUnit to test them.

When I include this jar into my webservices project, its seems that the
autowiring fails. I have confirmed that the applicationcontext.xml is in the
classpath, but the services still fail. I have pasted my configuration files
below. Any suggestions would be greatly appreciated.

thanks


*Web.xml*

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>



    <servlet>
        <servlet-name>CXFServlet</servlet-name>
            <servlet-class>
            org.apache.cxf.transport.servlet.CXFServlet
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>CXFServlet</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>

    <listener>
        <listener-class>
            org.springframework.web.context.ContextLoaderListener
        </listener-class>
    </listener>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/beans.xml
classpath:applicationContext.xml</param-value>
    </context-param>


</web-app>


*Beans.xml*

<?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-2.5.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="organizationDataServiceImpl"
class="org.idm.srvc.org.service.OrganizationDataServiceImpl" />
    <bean id="userMgr" class="org.idm.srvc.user.service.UserMgr" />
    <bean id="groupDataServiceImpl"
class="org.idm.srvc.grp.service.GroupDataServiceImpl" />
    <bean id="roleDataServiceImpl"
class="org.idm.srvc.role.service.RoleDataServiceImpl" />

    <jaxws:endpoint id="organizationDataService"
        implementor="#organizationDataServiceImpl"
        wsdlLocation="WEB-INF/wsdl/OrganizationDataService.wsdl"
address="/OrganizationDataService" />

    <jaxws:endpoint id="userDataService"
        implementor="#userMgr"
        wsdlLocation="WEB-INF/wsdl/UserDataService.wsdl"
        address="/UserDataService"/>
        <!--  wsdlLocation="WEB-INF/wsdl/UserDataService.wsdl"  -->

    <jaxws:endpoint id="groupDataService"
        implementor="#groupDataServiceImpl"
        wsdlLocation="WEB-INF/wsdl/GroupDataService.wsdl"
        address="/GroupDataService"/>

    <jaxws:endpoint id="roleDataService"
        implementor="#roleDataServiceImpl"
        wsdlLocation="WEB-INF/wsdl/RoleDataService.wsdl"
        address="/RoleDataService"/>

    <jaxws:endpoint
      id="HelloWorld"
      implementor="org.idm.srvc.HelloWorldImpl"
      address="/HelloWorld" >

     </jaxws:endpoint>

</beans>

Reply via email to