如何在 Eclipse 中创建 Axis2 Web 服务客户端?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6782782/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to create an Axis2 Web Service Client in Eclipse?
提问by Jay Sullivan
I'd like to use the "Web Service Client" wizard to create a web service client in Eclipse, but the wizard doesn't allow me to choose Axis2 as the web service runtime; I'm stuck with just plain Axis.
我想使用“Web 服务客户端”向导在 Eclipse 中创建一个 Web 服务客户端,但该向导不允许我选择 Axis2 作为 Web 服务运行时;我只坚持使用简单的 Axis。
I start off at the following screen (which I got to via File -> New -> Other -> Web Service Client ):
我从以下屏幕开始(我通过 File -> New -> Other -> Web Service Client 进入):
I click on "Web service runtime: Apache Axis", to get this new "Client Environment Configuration" dialog:
我单击“Web 服务运行时:Apache Axis”,以获取这个新的“客户端环境配置”对话框:
I've chosen "Apache Axis2", but the OK button is grayed out. Not matter what I choose in this dialog--even if I choose "Apache Axis"--the OK button is grayed out. I can't get past this step. Am I using a bad version of Eclipse (Indigo version 20110615-0604 here), do I need to install/upgrade some plugin (I've installed Axis2 Tools 1.1.200v201103022)? What's wrong here?
我选择了“Apache Axis2”,但“确定”按钮是灰色的。无论我在这个对话框中选择什么——即使我选择了“Apache Axis”——OK 按钮都是灰色的。这一步我过不去。我是否使用了错误版本的 Eclipse(此处为 Indigo 版本 20110615-0604),是否需要安装/升级某些插件(我已安装 Axis2 Tools 1.1.200v201103022)?这里有什么问题?
This is on a Windows 7 64-bit machine.
这是在 Windows 7 64 位机器上。
采纳答案by BOSS
Untill and unless you won't add any server the OK button will be grayed out.
直到并且除非您不添加任何服务器,否则“确定”按钮将变灰。
回答by Chakri
Try these, it may help you out to generate a Axis2 web service client successfully, it worked for me.
试试这些,它可能会帮助您成功生成 Axis2 Web 服务客户端,它对我有用。
- Install Axis2 on your system, dowloading from it's site (Google Axis2 download).
- You want to add Axis2 runtime in your eclipse editor : Windows>>Preferences>>Web services>>Axis2 Preferences.
- Assuming you are generating web services client in in a Dynamic Web project, add Axis2 in project facets(right click on the web project >> Properties>>Project facets)
- Also add a server run time in your eclipse editor: Windows>>Preferences>>Server>>Runtime environments
- 在您的系统上安装 Axis2,从其站点下载(Google Axis2 下载)。
- 您想在 Eclipse 编辑器中添加 Axis2 运行时:Windows>>Preferences>>Web services>>Axis2 Preferences。
- 假设您在动态 Web 项目中生成 Web 服务客户端,在项目方面添加 Axis2 (右键单击 Web 项目>>属性>>项目方面)
- 还要在 eclipse 编辑器中添加服务器运行时:Windows>>Preferences>>Server>>Runtime environment
These should enable your OK button after selecting Axis2 and one of server runtime environments in the 'Client Environment Configuration'dialog.
在“客户端环境配置”对话框中选择 Axis2 和服务器运行时环境之一后,这些应该会启用您的 OK 按钮。
Good luck solving your problem.
祝您好运解决您的问题。
回答by anhtuannd
Why don't use Axis2 Code Generator for Eclipse? I think it'll help you to create client code easier.
为什么不为 Eclipse使用Axis2 代码生成器?我认为它会帮助您更轻松地创建客户端代码。