This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes Apache CXF HelloWorld Service fails to intialize:  Error creating bean with name 'helloWorld' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Apache CXF HelloWorld Service fails to intialize:  Error creating bean with name Watch "Apache CXF HelloWorld Service fails to intialize:  Error creating bean with name New topic
Author

Apache CXF HelloWorld Service fails to intialize: Error creating bean with name 'helloWorld'

Sangeetha Davey
Greenhorn

Joined: May 10, 2011
Posts: 5
I am trying to set up a simple HelloWorld apache CXF webservice in eclipse/maven. I have a web.xml, cxf-servlet.xml in webapp/WEB-INF. But when I enter my request :http://localhost:8080/WebServiceCXFTest/services/HelloWorld

I get:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloWorld': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/

My cxf-servlet.xml is as follows:
<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-servlet.xml" />

<jaxws:endpoint
id="helloWorld"
implementor="com.lifescan.dmt.services.HelloWorldImpl"
address="/HelloWorld" />


</beans>

HelloWorldImpl:
package com.lifescan.dmt.services;

import javax.jws.WebService;
@WebService(endpointInterface = "com.lifescan.dmt.services.HelloWorld",
serviceName = "HelloWorld")
public class HelloWorldImpl implements HelloWorld {



public String sayHi(String text) {
System.out.println("sayHi called");
return "Hello " + text;
}

}


package com.lifescan.dmt.services;

import javax.jws.WebParam;
import javax.jws.WebService;
@WebService
public interface HelloWorld {
String sayHi(@WebParam(name="text") String text);



}

Any help is greatly appreciated. Thanks so much in advance.
Lucky J Verma
Ranch Hand

Joined: Apr 11, 2007
Posts: 278
Hi sangeetha

Were you able to figure out the solution?I am getting same error and don know what to do.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apache CXF HelloWorld Service fails to intialize: Error creating bean with name 'helloWorld'
 
Similar Threads
contract first web service
Apache CXF - ignore setters when marshalling
How to change jetty binding port number in maven.
Problem getting output using CXF & Spring
CXF-RS throwing No operation matching request path /create is found