Hello Wellem, I really don't have anything extra on sever side. To make testing this problem simple, I added the HelloWorld sample code in my server side code and it just seems that the client code when trying to use it when deployed on web application gives the error.
The configuration on server side is as follow: 1. --------- I have a cxf.xml which has following: <?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:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:simple="http://cxf.apache.org/simple" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.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-servlet.xml"/> <simple:server id="hello" address="/hello" serviceClass="com.comp.HelloWorldNew" serviceBean="helloService"> </simple:server> </beans> 2. ------- I have bean.xml, which has ---------- <bean id="helloService" class="com.comp.HelloWorldImpl"> </bean> -------------CXF Sample Client changes done to call the HelloWorld service deployed in tomcat appserv I also tried updating the sample hello world spring client as follow to test this from the sample client: 1. Updates to Client.java public final class Client { private Client() { } public static void main(String args[]) throws Exception { // START SNIPPET: client ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"demo/spring/client/client-beans.xml"}); HelloWorld client = (HelloWorld)context.getBean("client"); // NOTE: If I use this call, I get the error for "javax.xml.ws.WebServiceException: Could not find operation info for web method " //String response = client.sayHi("Joe"); //NOTE: If I use this call, I get the error for "Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class " ClientProxyFactoryBean cf = new ClientProxyFactoryBean(); cf.setAddress("http://localhost:8080/services/hello"); cf.setServiceClass(HelloWorld.class); // Optionally specify the service interface HelloWorld service = (HelloWorld) cf.create(); String test = "Hello World Test in Tomcat appserv"; String response = service.sayHi(test); System.out.println("Response: " + response); System.exit(0); // END SNIPPET: client } } 2. Updates to client-beans.java <bean id="client" class="com.comp.HelloWorldNew" factory-bean="clientFactory" factory-method="create"/> <bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean"> <property name="serviceClass" value="com.comp.HelloWorldNew"/> <property name="address" value="http://localhost:8080/services/hello"/> </bean> -- View this message in context: http://www.nabble.com/having-problem-with-cxf-2.0.2-using-client-webservice-tf4524946.html#a12939613 Sent from the cxf-user mailing list archive at Nabble.com.
