In Linux, a WebService client is generated using gsoap. during development, the following problems are encountered: The gsoap version is 2.7.15, but it is not re-compiled, instead, use the wsdl2h and soapcpp2 that come with the toolkit. The version number is 2.7.9l.
1. during compilation, the following message is displayed: soap_save_block and soap_push_block functions both lack a parameter.
It is not clear whether the WSDL writing is not standard or the gsoap itself has a problem. However, you only need to modify it briefly.
Just a moment: Add a null parameter to the call that prompts that the parameter is missing.
2. When the program is running: failed to send data to the server by calling the WebService interface, but WebService
The interface can normally receive data from the server.
After investigation, the direct cause of this problem is that the WebService client generated by gsoap of this version accesses multiple parameters.
There is a problem with the port support. Here, the temporary solution is: the server sends data from all clients involved to the server.
The interface is changed to a parameter, so that the program runs normally after modification.
The real cause of the problem has not been found, but you can refer to the following article:
Http://blog.csdn.net/yufeng20345390/archive/2010/06/12/5666304.aspx
3. Problems with the gethostbyname Function
This project is developed based on embedded Linux and found during program development using the client generated by gsoap:
When the program is running, it is always unable to connect to the WebService server. After investigation, it is found that the domain name resolution function gethostbyname
Problem: domain name resolution failed.
The reason is pending.
Solution: the project team overwrites the gethostbyname function, and then uses this function to modify the file
The source code of stdsoap2.cpp and stdsoap2.h about TCP connection solves this problem.