Maybe my blog article would help:
http://www.jroller.com/gmazza/entry/web_service_tutorial

You might wish to rename your cxf-servlet.xml (cxf-beans.xml or anything else will be fine)--that's a special name reserved when you're not using the contextConfigLocation parameter in the web.xml, potentially causing it to be loaded twice or otherwise configured in a way you had not intended.

Glen

On 07/18/2012 06:15 PM, April Easton wrote:
Good day,
      I have been able to move forward, but things aren't making sense to me.  
I would appreciate any help in understanding what's going on or where to look 
next.
      I have deployed my war file to Tomcat 6.0.32, but I'm getting exceptions 
that I need to put the jetty jars on the path.  I have seen several online 
tutorials where they do not list the jetty jars as part of the required jars.  
I've read that all I need to do with my service is export my project as a war 
file to Tomcat and it will run.  My does not. Is there something that I have 
missed somewhere with CXF to make it run on Tomcat?  I'm using CXF 2.6.1 with 
Spring 3.1.1.
      If I do put the jetty jars in my classpath for this project, then I get 
the error that the address is already in use.  Do I need to create another 
connector port for this CXF project in my Tomcat server.xml file?

<web.xml>
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns="http://java.sun.com/xml/ns/javaee";
        xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";
        id="WebApp_ID" version="3.0">
<context-param>
     <param-name>contextConfigLocation</param-name>
     <param-value>WEB-INF/cxf-servlet.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>
     <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
     <servlet-name>CXFServlet</servlet-name>
     <url-pattern>/test/*</url-pattern>
   </servlet-mapping>
</web-app>

servlet-cxf.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.0.xsd
                http://cxf.apache.org/jaxws
                http://cxf.apache.org/schemas/jaxws.xsd";>
        
         <bean id="testService" 
class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"/>
        
        <jaxws:endpoint
          id="processTest"
          implementor="org.mycompany.test.service.ImageReceiveDetailsImpl"
          address="http://mycompany.org:8080/test/";>
    </jaxws:endpoint>
</beans>


Thanks,
CXF Newbie


--
Glen Mazza
Talend Community Coders
coders.talend.com
blog: www.jroller.com/gmazza

Reply via email to