How to generate java classes from WSDL file

前端 未结 8 549
一生所求
一生所求 2020-12-02 17:09

I am working towards an android application. I need to use a web service. I have a wsdl file but I want to convert that into java so that I can use its functions in my Java

相关标签:
8条回答
  • 2020-12-02 18:07

    You can use the WSDL2JAVA Codegen (or) You can simply use the 'Web Service/WebServiceClient' Wizard available in the Eclipse IDE. Open the IDE and press 'Ctrl+N', selectfor 'Web Service/WebServiceClient', specify the wsdl URL, ouput folder and select finish.

    It creates the complete source files that you would need.

    0 讨论(0)
  • 2020-12-02 18:08

    Assuming that you have JAXB installed Go to the following directory C:\Program Files\jaxb\bin open command window here

    > xjc -wsdl http://localhost/mywsdl/MyDWsdl.wsdl C:\Users\myname\Desktop

    C:\Users\myname\Desktop is the ouput folder you can change that to your preference

    http://localhost/mywsdl/MyDWsdl.wsdl is the link to the WSDL

    0 讨论(0)
提交回复
热议问题