谁能与我分享用于 gSOAP GET 方法实现的 C++ 示例代码?
Can anyone share me the sample code in C++ for gSOAP GET method implementation?
我是 gSOAP 的新手。我通过命令提示符和 SOAPUI 从服务器获得响应。但是我无法通过浏览器获得响应。在浏览器中,我收到响应“GET method not implemented
”。
谁能帮我实现get方法?
请分享浏览器也得到正确响应的简单示例代码。
中有描述
struct soap *soap = soap_new();
soap->fget = http_get;
...
soap_serve(soap);
...
int http_get(struct soap *soap)
{
soap_response(soap, SOAP_HTML); // HTTP response header with text/html
soap_send(soap, "<HTML>My Web server is operational.</HTML>");
soap_end_send(soap);
return SOAP_OK;
}
我是 gSOAP 的新手。我通过命令提示符和 SOAPUI 从服务器获得响应。但是我无法通过浏览器获得响应。在浏览器中,我收到响应“GET method not implemented
”。
谁能帮我实现get方法?
请分享浏览器也得到正确响应的简单示例代码。
struct soap *soap = soap_new();
soap->fget = http_get;
...
soap_serve(soap);
...
int http_get(struct soap *soap)
{
soap_response(soap, SOAP_HTML); // HTTP response header with text/html
soap_send(soap, "<HTML>My Web server is operational.</HTML>");
soap_end_send(soap);
return SOAP_OK;
}