Eclipse WSDL generator (from java class)?

为君一笑 提交于 2019-12-21 04:27:24

问题


I want to generate WSDL compliant with Java classes. 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.

I'm using Eclipse, so I would prefer any solution that's already integrated with it.


回答1:


From eclipse in the java perspective:

  1. Right click on the Java class you want to use as your service implementation
  2. Select Web Services -> Create Web Service
  3. Web service type should be "Botton up Java bean Web Service"

This will generate a WSDL file for you.




回答2:


Also you can publish the service at localhost with any server (Tomcat, for instance) and then with your browser in the address bar write

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

If the service is correctly configured, you should see the generated wsdl. Then you can copy/paste in any text editor and save it as myService.wsdl.

Hope that helps



来源:https://stackoverflow.com/questions/7716771/eclipse-wsdl-generator-from-java-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!