Spring + CXF + 注解方式(webService)

关键字:Spring  +  CXF  + 注解方式(webService)


说明:下载后解压并部署,启动tomcat后:访问
服务地址:http://192.168.1.100:8080/Demo_Spring_CXF_Annotation/ws
此时会显示你所有已经发布的webservice服务


附件是:Spring  +  CXF  + 注解方式(webService)完整的例子,下载即用,希望对大家有所帮助 谢谢 



客户端调用代码可以使用eclipse直接生成,也可以直接用以下方式调用:
client调用代码

Java代码 
1.DynamicClientFactory dcf = DynamicClientFactory.newInstance();  
2.Client client = dcf.createClient("http://192.168.1.100:8080/Demo_Spring_CXF_Annotation/ws/helloService?wsdl");  
3.Object[] reply = client.invoke("sayHello", new Object[] { "just4it" });  
4.System.out.println(reply[0]); 






猜你喜欢

转载自zhaoshijie.iteye.com/blog/1714359