> -----Original Message----- > From: Sergey Beryozkin [mailto:[email protected]] > Sent: Saturday, December 12, 2009 5:10 AM > To: [email protected] > Subject: RE: Can't get to the service, must be initializing CXF wrong > > Hi > > All seems to be ok... Perhaps you can try to register a plain > jaxrs:server endpoint only, with aop and tx extensions and then proceed > from there and see what might be affecting the registration ?
I suppose. Is there some logging I could turn on that might provide some useful information? > Is it Tomcat that you use ? WebLogic 10MP1. Moving to 10.3.2 in a while. > > Cheers, Sergey > > -----Original Message----- > From: KARR, DAVID (ATTCINW) [mailto:[email protected]] > Sent: 11 December 2009 23:53 > To: [email protected] > Subject: Can't get to the service, must be initializing CXF wrong > > I'm trying to bootstrap another derivative version of a prototype I > developed a while ago. I'm using CXF 2.2.5 with Spring 2.5.6. When I > try to request the WADL or run the service, it just says "No service > was > found". I imagine it's something simple in my applicationContext.xml > or > web.xml, but I don't see it. I've been away from this for a few weeks. > > Relevant parts of web.xml: > ----------------- > <?xml version="1.0" encoding="UTF-8"?> > <web-app id="WebApp_ID" version="2.4" > xmlns="http://java.sun.com/xml/ns/j2ee" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> > <context-param> > <param-name>contextConfigLocation</param-name> > <param-value>WEB-INF/applicationContext.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>/*</url-pattern> > </servlet-mapping> > </web-app> > --------------- > > Relevant parts of WEB-INF/applicationContext.xml: > ----------------------- > <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" /> > <import > resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" /> > > <tx:annotation-driven /> > > <aop:aspectj-autoproxy /> > > <jaxrs:server name="dynamicContent" address="/rest"> > <jaxrs:features> > <cxf:logging/> > </jaxrs:features> > <jaxrs:providers> > <ref bean="jacksonJsonProvider"/> > </jaxrs:providers> > > <jaxrs:serviceBeans> > <ref bean="dynamicContent"/> > </jaxrs:serviceBeans> > </jaxrs:server> > > <bean id="dynamicContent" > class="com.att.ecom.dynamiccontent.content.Content"> > </bean> > > <bean id="objectMapper" > class="org.codehaus.jackson.map.ObjectMapper"/> > > <bean id="jacksonInit" > class="com.att.ecom.dynamiccontent.JacksonInit" init-method="init"> > <property name="objectMapper" ref="objectMapper"/> > <property name="annotationIntrospector"> > <bean > class="org.codehaus.jackson.map.AnnotationIntrospector$Pair"> > <constructor-arg index="0"> > <bean > class="org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospecto > r > "/> > </constructor-arg> > <constructor-arg index="1"> > <bean > class="org.codehaus.jackson.xc.JaxbAnnotationIntrospector"/> > </constructor-arg> > </bean> > </property> > </bean> > > <bean id="jacksonJsonProvider" > class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"> > <property name="mapper" ref="objectMapper"/> > </bean> > ---------------- > > When I start the server, I see the following in the log: > ------------------------ > Dec 11, 2009 3:42:13 PM org.apache.cxf.transport.servlet.CXFServlet > updateContext > INFO: Load the bus with application context > Dec 11, 2009 3:42:14 PM > org.apache.cxf.transport.servlet.AbstractCXFServlet > replaceDestinationFactory > INFO: Servlet transport factory already registered > --------------------- > > The webapp root is "/DynamicContent". > > In the browser, if I try to go to > <http://localhost:7001/DynamicContent/rest/content/catalog/1>, I see > this in the console output: > --------------- > Dec 11, 2009 3:48:44 PM > org.apache.cxf.transport.servlet.ServletController invoke > WARNING: Can't find the request for > http://localhost:7001/DynamicContent/rest/content/catalog/1's Observer > ---------------
