char或int,返回值傳遞良好。gsoap linux C++ /結構失敗傳遞
但struct傳遞失敗。
服務器:
soapcpp2 -2 -SLix ...
客戶端:
wsdl2h -f -s -o ... ...
soapcpp2 -i -C ...
和
struct{
char * value;
}USER_ITEM
服務器:
int Service::GetValue(struct USER_ITEM * item)
{
item->value = new char[100];
item->value = "example";
}
客戶:
....
ns2__useritemresponse user;
proxy.Getvalue(user)
user.user_item->value // user.user_item address is null;
....
窗戶很好。但不是在Linux C++上。
與上述格式相同。
我需要一組單獨的選項嗎?
如果您懷疑部件,請幫助。
對不起,我的英語說得不好。
感謝您的閱讀。
如果用-Wall和-Werror編譯你得到任何警告?方法是「GetValue」還是「Getvalue」,它的聲明在代理基類中是什麼樣的。 – 2015-04-06 10:39:36