如何更换 AXIS “您好,这是 AXIS 服务!”页?
当我访问“http://192.168.0.149:8080/axis/services/MyService”时,我收到此页面
“您好,这是一项 AXIS 服务!
这里可能会有一个用于调用该服务的表单...”
我知道这意味着我的 Web 服务工作正常(事实上,我有一个 Java 客户端可以很好地调用它)。但昨天有人问我一个简单的问题,但我不知道答案,也找不到答案。 我们可以用实际的表单替换该页面吗?是否有一个设置可以添加到我们的 web.xml 文件中,或者其他什么?
我知道 axis 在我的服务器上部署为 jar 文件(没有 /axis 目录),所以这可能会限制我的可能性......
When I go to "http://192.168.0.149:8080/axis/services/MyService", I get this page
"Hi there, this is an AXIS service!
Perhaps there will be a form for invoking the service here..."
I know this means my web service is working correctly (in fact, I have a java client that calls it just fine). But yesterday I've been asked a simple question, yet I don't know the answer and couldn't find it. Can we replace that page, by an actual form let's say? Is there a setting to add to our web.xml file, or perhaps something else?
I know that axis is deployed as a jar file on my server (there's no /axis directory), so this may limit my possibilities...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到了解决方案。
您可以子类化 AxisServlet 并重新定义 reportServiceInfo() 方法(即打印“嗨,...”的方法)。
然后,您需要在 web.xml 中更改 AxisServlet 上的映射以使用该类。
Found a solution.
You can subclass AxisServlet and redefine the reportServiceInfo() method (that's the one that prints "Hi there, ...").
You then need to change in your web.xml the mapping on AxisServlet to use that class.