Posted on 2007-09-07 09:50
天空苍茫 阅读(446)
评论(0) 编辑 收藏
3。在导航页面中,输入
web service name: HelloWorldTest
java package : services
services Interface : IHelloWorldTest
services impl.class :HelloWorldTestImpl
其他的默认,点finish
最后可以看到Web Services 下面的services.xml的内容如下
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<service>
<name>HelloWorldTest</name>
<serviceClass>services.IHelloWorldTest</serviceClass>
<implementationClass>
services.HelloWorldTestImpl
</implementationClass>
<style>wrapped</style>
<use>literal</use>
<scope>application</scope>
</service>
</beans>
4。services包中的文件:
IHelloWorldTest.java
-----------------------------------------------
package services;
//Generated by MyEclipse
public interface IHelloWorldTest {
public String sayHello(String message);
}
----------------------------------------------------------
HelloWorldTestImpl.java
----------------------------------------------------
package services;
//Generated by MyEclipse
public class HelloWorldTestImpl implements IHelloWorldTest {
public String sayHello(String message) {
return "Hello,"+message;
}
}
------------------------------------------------------------
到此为止webServices编码工作完成,现在开始部署到tomcat这里省略。
部署好后可以测试下:
http://localhost:8080/HelloWorld/services/HelloWorldTest?WSDL