The function of this project is to use WebService to complete data interaction between two systems. The framework used is axis2. Briefly summarize several issues in the project:
Set access timeout during client development
The default access timeout time of the WebService client generated by axis is relatively short. If the processing time of the server is relatively long, the client access timeout occurs, therefore, you must modify the time-out period of the client to prevent the client from displaying the service call failure due to the long running time.
Pay attention to service processing when service access fails
Just like a transaction rollback is required when an exception occurs during the transaction execution, if the service call fails, you must handle the failure and keep the data in the two systems consistent.
Record logs
The data interaction between the two systems is troublesome, especially when the two manufacturers jointly develop interactive interfaces, because WebService interaction is unstable and network factors are involved, system factors of both parties. Therefore, the results of each interaction must be recorded in the log to avoid defining the responsibility when a problem occurs.
Test whether the service is normal. You can use the dedicated tool soapui.
Whether a WebService call is successful depends on the server and the client. You can use soapui, a dedicated test tool, to test whether the server is normal. If you use soapui to test whether the server is normal, the WebService problem usually occurs on the client.
This is the reconstruction.
After the project is completed, the project is not very satisfied with its own code and has poor readability. Because I initially thought that the project was relatively small and did not attract enough attention, but the user needs changed frequently, and each time I added a small function, therefore, the code is basically added to the original logic, so that the code is too bloated. After the customer's requirements are basically stable, several parts of the project need to be reconstructed to avoid high maintenance costs in the future.