0
我正在使用gsoap創建我的第一個Web服務客戶端。我能夠運行gsoap提供的計算示例。試圖瞭解gsoap
現在我試圖從WCF Web服務訪問String GetData()函數。我做了wsdl2h和soapcpp2步驟並生成了.h文件。在xxxxproxy.h中,我看到GetData的原型如下
/// Web service operation 'GetData' (returns error code or SOAP_OK)
virtual int GetData(_ns1__GetData *ns1__GetData, _ns1__GetDataResponse *ns1__GetDataResponse);
Can someone tell me what should I write in my main.cpp to access GetData. I have following code in main.cpp
#include <QtCore/QCoreApplication>
#include "soapWSHttpBinding_USCOREIAquaLinkProxy.h"
#include "WSHttpBinding_USCOREIAquaLink.nsmap"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
WSHttpBinding_USCOREIAquaLinkProxy webService;
std::cout <<"Sent request"<<std::endl;
std::string result;
if(webService.GetData(??????)==SOAP_OK)
{
std::cout << "Returned "<< ????? <<std::endl;
}
else
{
webService.soap_stream_fault(std::cerr);
}
return a.exec();
}
謝謝。
謝謝基督徒。 – dev 2011-04-06 01:37:32
沒問題,希望它有幫助。 – 2011-04-06 07:12:40