Given a WSDL file, create a simple Java client

前端 未结 6 540
孤独总比滥情好
孤独总比滥情好 2020-12-28 10:10

Can anyone please provide me with a sample code for this? I have a wsdl file, and I want to create a client that will call a service from that wsdl file
A working code

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-28 10:57

    You can do it from command line using wsimport provided by JAX-WS

    wsimport -keep -s (output folder) urlToWsdl

    > ex : wsimport -keep -s {homeDirectory}/OutputFolder https://www.example.com
    

    PS: while using non-standard SOAP 1.2 binding. You must specify the "-extension" option to use this binding.

    for further reading visit this

提交回复
热议问题