This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Sangeetha Davey
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 278
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic