Posted on 2007-09-07 09:50
天空蒼茫 閱讀(461)
評論(0) 編輯 收藏
3。在導航頁面中,輸入
web service name: HelloWorldTest
java package : services
services Interface : IHelloWorldTest
services impl.class :HelloWorldTestImpl
其他的默認,點finish
最后可以看到Web Services 下面的services.xml的內容如下
<beans xmlns="
<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