cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brad O'Hearne <br...@neurofire.com>
Subject [Fwd: Re: Exception loading CXF service in Spring with HTTP Binding]
Date Sat, 14 Jul 2007 00:37:29 GMT
Hello,

I don't want to cross the line on asking questions to the dev list, but 
I'm in a bit of a bind here, and I need to get this worked out, and I 
think that posting this to the dev list may be appropriate for the 
following reasons:

1) It is in the realm where the documentation says the functionality 
exists, but doesn't say how to configure (i.e. a hole in the documentation).
2) The stack trace / error I am receiving I am guessing only a developer 
is going to likely understand -- it makes absolutely no sense at a user 
level.
3) The only reference I found to this error on Google was from last 
month on the developer list.

The forwarded email explains my problem and stack trace, but in a 
nutshell, I just need to configure annotation based, SOAP-Free, Restful 
Http/xml services in Spring. Nothing tricky -- simple, standard, 
boilerplate need. I am having no luck, as my service loading fails. The 
stack trace is attached. Here is my web.xml file:

<!DOCTYPE web-app
   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

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

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

   <servlet>
       <servlet-name>CXFServlet</servlet-name>
       <display-name>CXF Servlet</display-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>

Here is my beans.xml file:

<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-extension-http-binding.xml" />
   <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

   <bean id="JaxWsServiceFactoryBean"
       class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
       <property name="wrapped" value="false" />
   </bean>

   <jaxws:endpoint id="userService"
       implementor="com.brad.user.UserService"
       address="/UserService"
       bindingUri="http://apache.org/cxf/binding/http"
       >
       <jaxws:serviceFactory>
           <ref bean="JaxWsServiceFactoryBean" />
       </jaxws:serviceFactory>
   </jaxws:endpoint>

</beans>

Here is my UserService interface:

package com.brad.user;

import javax.jws.WebService;

import org.codehaus.jra.Get;
import org.codehaus.jra.HttpResource;

import com.brad.service.ServiceRequest;
import com.brad.service.ServiceResponse;

@WebService
public interface IUserService {

   @Get
   @HttpResource(location = "/users")
   ServiceResponse getUsers(ServiceRequest request);
}

Thanks in advance for the help. I'm to the end of my rope, with regards 
to my timeline, and I need to get this working, and qualify CXF as a 
service stack that can be used for this project, or else I'm going to 
have to punt this weekend and incur a ton of work basically duplicating 
what CXF already purports to do.

Cheers,

Brad

Mime
View raw message