0
我使用gSOAP從SOAP webservice請求信息gSOAP在請求完成後刪除對象中的引用值
soap webservice返回一個對象。 我做了一個名爲呼叫請求:「dataconnector」
在dataconnector我可以輸出返回的對象 但外面,在對象中的所有引用值的所有值都爲空。
我做了一些搜索和apperantly gSOAP的刪除一切,除非你從釋放鏈刪除與soap_unlink()
我試過,但它並沒有幫助 這是我的代碼
什麼任何想法我做錯了?
QList<ns1__calls*> calls;
datacheckPortBindingProxy service;
ns1__getCalls request;
std::string un("4444");
request.username = &un;
ns1__getCallsResponse response;
if (service.getCalls(&request, &response) == SOAP_OK){
qDebug() << "succesfull response";
for(unsigned int i = 0; i< response.return_.size(); i++){
ns1__calls* call = response.return_.at(i);
qDebug() << QString(call->roomId->c_str());
qDebug() << " with type_id: " << (call->typeId-1) ;
calls.append(call);
soap_unlink(request.soap, call);
}
編輯
NVM apperantly你需要斷開鏈接的對象
這樣的所有單獨的值:
soap_unlink(response.soap, call->roomId);
soap_unlink(response.soap, call->display);
soap_unlink(response.soap, call->location);
soap_unlink(response.soap, call->staffAidId);
soap_unlink(response.soap, call->firstName);
soap_unlink(response.soap, call->lastName);
是不是有eazier方式?
thx,不敢相信我沒試過:s – Berty 2011-05-20 19:40:30
沒問題:-)。 – 2011-05-20 20:41:00