几乎学习所有的新技术一开始都要写这么一个demo,webservice自然也不能例外。
其实这个HelloWorld十分简单,就和你的java版HelloWorld一样。不过你需要把其后缀改为.jws
public class HelloWorld {
public String sayHello(String name)
{
return "Hello WebService by " + name;
}
}
然后把它放到你的tomcat下面的webapps下面axis的目录下。然后通过url访问:http://localhost:8088/axis/HelloWorld.jws?wsdl,得到如下结果:
顺便说一下这个在chrome下好像不能显示,不知道为啥。 -
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有