简体   繁体   English

Eclipse WSDL生成器(来自java类)?

[英]Eclipse WSDL generator (from java class)?

I want to generate WSDL compliant with Java classes. 我想生成符合Java类的WSDL。 At this phase I don't want to put it online, just have the wsdl (in order to discuss it with someone else) and validate the generated file. 在这个阶段,我不想把它放在网上,只需要wsdl(为了与其他人讨论)并验证生成的文件。

I'm using Eclipse, so I would prefer any solution that's already integrated with it. 我正在使用Eclipse,所以我更喜欢任何已经与之集成的解决方案。

From eclipse in the java perspective: 从java的角度来看eclipse:

  1. Right click on the Java class you want to use as your service implementation 右键单击要用作服务实现的Java类
  2. Select Web Services -> Create Web Service 选择“Web服务” - >“创建Web服务”
  3. Web service type should be "Botton up Java bean Web Service" Web服务类型应该是“Botton up Java bean Web Service”

This will generate a WSDL file for you. 这将为您生成一个WSDL文件。

Also you can publish the service at localhost with any server (Tomcat, for instance) and then with your browser in the address bar write 您还可以使用任何服务器(例如Tomcat)在localhost上发布服务,然后在地址栏中使用浏览器进行写入

http://localhost:<server_port>/path/to/your/service?wsdl

If the service is correctly configured, you should see the generated wsdl. 如果服务配置正确,您应该看到生成的wsdl。 Then you can copy/paste in any text editor and save it as myService.wsdl . 然后,您可以在任何文本编辑器中复制/粘贴并将其另存为myService.wsdl

Hope that helps 希望有所帮助

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

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