简体   繁体   English

如何使用 wsdl 文档而不是 URI 创建 Eclipse Web 服务客户端?

[英]How to Create a Eclipse web service client using a wsdl document not URI?

I am trying to create a Eclipse Web Service Client using an existing WSDL document located on my machine.我正在尝试使用位于我的机器上的现有 WSDL 文档创建 Eclipse Web 服务客户端。 I need to browse for the wsdl document from my machine我需要从我的机器上浏览 wsdl 文档

I am using Eclipse Luna version 4.1 with jdk 7 on Windows 7 OS我在 Windows 7 操作系统上使用带有 jdk 7 的 Eclipse Luna 4.1 版

When I click the Browse button, I obtain this当我单击浏览按钮时,我得到了这个图片

Can any one tell me how can I select the wsdl file?谁能告诉我如何选择 wsdl 文件?

[Solution] When I put my wsdl document into my project root and refreshed the project inside Eclipse, the project appeared when I clicked on browse then I can select the wsdl document [解决] 当我把我的wsdl文档放到我的项目根目录中,在Eclipse里面刷新项目,点击浏览出现项目,然后我可以选择wsdl文档

现在我可以浏览 wsdl 文档了

请查看以下帖子,其中提供了一个示例,其中包含有关从给定 WSDL 文件创建 WSDL 客户端的详细步骤: 来自 WSDL 文件的 WSDL 客户端

In Windows, check the file permissions on the WSDL file : Also, confirm whether you run Eclipse as an Administrator or not.在 Windows 中,检查 WSDL 文件的文件权限:另外,确认您是否以管理员身份运行 Eclipse。 For me, I NEED to run Eclipse as an Administrator to have certain Eclipse .metadata work in Windows 7.对我来说,我需要以管理员身份运行 Eclipse 才能让某些 Eclipse .metadata 在 Windows 7 中工作。

So in Windows :所以在 Windows 中:

  • Right-click the WSDL file.右键单击 WSDL 文件。
  • Select Properties选择属性
  • Security Tab安全选项卡
  • Locate Authenticated Users.找到经过身份验证的用户。
  • Click Edit单击编辑
  • Set the Full Control check box.设置完全控制复选框。
  • In Eclipse, try again.在 Eclipse 中,再试一次。

Notice that you can also supply an URI pointing to a file located in your local machine without importing the file into an Eclipse project.请注意,您还可以提供指向位于本地机器中的文件的 URI,而无需将该文件导入 Eclipse 项目。

The Browse button doesn't allow you to navigate your local file system but you can type the URI directly in the input box.浏览按钮不允许您浏览本地文件系统,但您可以直接在输入框中键入 URI。

I have a WSDL file located in我有一个 WSDL 文件位于

D:/stackoverflow/sayhello.wsdl 

Introducing the URI介绍 URI

file:///D:\stackoverflow\sayhello.wsdl

Clicking the OK button, the wizard allow me to create the web service client.单击确定按钮,向导允许我创建 Web 服务客户端。

提供本地 URI

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM