How do you convert WSDLs to Java classes using Eclipse?

前端 未结 6 1807
失恋的感觉
失恋的感觉 2020-11-30 00:50

I have a WSDL file (or, more precisely, its URL). I need to convert it to Java classes. I also need to provide tests for the web service it describes. I\'m new to web servi

6条回答
  •  野性不改
    2020-11-30 01:43

    I wouldn't suggest using the Eclipse tool to generate the WS Client because I had bad experience with it:

    I am not really sure if this matters but I had to consume a WS written in .NET. When I used the Eclipse's "New Web Service Client" tool it generated the Java classes using Axis (version 1.x) which as you can check is old (last version from 2006). There is a newer version though that is has some major changes but Eclipse doesn't use it.

    Why the old version of Axis matters you'll say? Because when using OpenJDK you can run into some problems like missing cryptography algorithms in OpenJDK that are presented in the Oracle's JDK and some libraries like this one depend on them.

    So I just used the wsimport tool and ended my headaches.

提交回复
热议问题