WebService call problem

       Today, my colleagues encountered the following problems when testing the WebService we developed using CXF:

Marshalling Error: class java.util.ArrayList and any of its superclasses are unknown to this context

       Contact the colleague who developed the WebService, he tested and passed the test, put the wsdl of the WebService into the browser for verification, there is no problem, it seems that there is no problem with the WebService. I checked the code again. During this process, I remembered that we had refactored the code and modified the authentication implementation method of the WebService. After the refactoring, the WebService needs to pass two parameters: username and password, and checked the WebService. The interface class does add these two parameters, but they are not passed in the test class. It seems that the test class was written before the refactoring, so the solution is very clear. Add the two parameters, and then re-test, OK, the test passed. In order to save some time when encountering similar problems in the future, I will record it here, hoping to help students who encounter the same problem.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326447382&siteId=291194637