IEDA创建WebServiceClient
最初听到webserviceclient一脸懵。。。。不过还是成功了,虽然尝试了很多失败的方法。欧美项目请允许我练习一下英文。
1.First,you need to have a webService Server side available,for example:
http://localhost:9080/services/XXXXXXXXXXXXXX?wsdl
2.IDEA create project.
choose version Apache Axis,The required base jar packages are automatically imported.(I failed to change the version when creating project,maybe because jdk1.8…,I don’t konw.)
next -> Fill in the project name ->finish.
reopen IEDA -> pop up a dialog box -> fill in wsdl url -> OK
After I created it, there was no java code in the project.Then I must create manually.
If you generate the TestCase Test class , you will get an error because you didn’t add the JUnit framework IDEA. The solution is simply to add a @test annotation to the class and then use ALT+Enter to select JUnit4 and remove the @test annotation. It’s right,but the TestCase still won’t run.
This error is exists in main method,you can add code like this:BasicConfigurator.configure();
How do errors resolve without my research.
In the end,rewrite parts of the main method based on business requirements.Mainly the code associated with the service and calling the method.
Good Luck!