将参数传递到 AXIS Web 服务

发布于 2024-08-16 21:39:41 字数 267 浏览 7 评论 0原文

我有一个 AXIS servlet,部署在 Windows 上的 apache tomcat 服务器上。
我编写了一个要在 AXIS 上运行的 Web 服务。
当我想要部署 Web 服务时,我从类中创建一个 jar 文件,然后将它们复制到“axis\WEB-INF\lib”目录中。然后我使用 wsdd 文件部署 Web 服务。 我的问题是 - 如何将参数传递给 Web 服务,以及如何读取它们?
我拥有的唯一 web.xml 文件是 AXIS web.xml 文件。我应该把它们放在那里吗?

I have an AXIS servlet which deployed on an apache tomcat server on windows.
I wrote a web service which I want to run on AXIS.
When I want to deploy my web service, I make a jar file from the classes, and then I copy them to "axis\WEB-INF\lib" directory. Then I deploy the web service using a wsdd file.
My question is - how can I pass parameters to the web service, and how can I read them?
The only web.xml file that I have, is the AXIS web.xml file. Should I put them there?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁把谁当真 2024-08-23 21:39:41

我遇到了完全相同的问题。我有一个不太完美的解决方案。我正在使用属性文件来存储参数并在服务类中访问该属性文件。当我将所有类放入 jar 文件时,我遇到了问题。如果我将属性文件放在 jar 文件中,我就可以访问服务类中的属性文件。当我将属性文件放在 jar 文件之外时,我无法访问属性文件(无需对路径进行硬编码)。从维护的角度来看,保持属性文件易于访问是一个很好的做法。

-饶

I came across with exactly same issue. I have a not so perfect solution. I am using a properties file to store params and access this properties file in the service classes. I am facing problem when I put all my classes in to a jar file. I am able to access properties file in my service class if I place properties file inside the jar file. I am unable to access properties file (without hardcoding the path) when I place it outside jar file. For maintainance point of view it is good practice to keep properties file accessible easyly.

-Rao

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文