gsoap返回结果是一个结构体编译报错
如下定义
//gsoap ns service name: struct
//gsoap ns service style: rpc
//gsoap ns service encoding: encoded
//gsoap ns service namespace: http://localhost/struct.wsdl
//gsoap ns service location: http://localhost
//gsoap ns service executable: struct.cgi
//gsoap ns schema namespace: urn:struct
typedef struct JobStatusDetail {
int jobId;
int status;
char cpuTime[10];
char wallTime[10];
} testType;
typedef testType *xsd__JobStatusDetailPointer;
struct ns__JobStatusPointer {
xsd__JobStatusDetailPointer *__ptr;
int __size;
};
int ns__StructArrayTest(char *cmd, struct ns__JobStatusPointer *structResult);
编译的时候老是报如下错误,是什么问题
1>structServer.cpp
1>d:\gsoap\struct\soapstub.h(45) : error C2011: 'JobStatusDetail' : 'struct' type redefinition
1> d:\gsoap\struct\struct.h(9) : see declaration of 'JobStatusDetail'
1>d:\gsoap\struct\soapstub.h(77) : error C2011: 'ns__JobStatusPointer' : 'struct' type redefinition
1> d:\gsoap\struct\struct.h(17) : see declaration of 'ns__JobStatusPointer'
1>d:\gsoap\struct\soaph.h(543) : error C2027: use of undefined type 'ns__JobStatusPointer'
1> d:\gsoap\struct\struct.h(17) : see declaration of 'ns__JobStatusPointer'
1>d:\gsoap\struct\soaph.h(543) : error C2227: left of '->__ptr' must point to class/struct/union/generic type
1>d:\gsoap\struct\soaph.h(544) : error C2027: use of undefined type 'ns__JobStatusPointer'
1> d:\gsoap\struct\struct.h(17) : see declaration of 'ns__JobStatusPointer'
1>d:\gsoap\struct\soaph.h(544) : error C2227: left of '->__size' must point to class/struct/union/generic type
1>d:\gsoap\struct\soaph.h(637) : error C2027: use of undefined type 'JobStatusDetail'
1> d:\gsoap\struct\struct.h(9) : see declaration of 'JobStatusDetail'
1>d:\gsoap\struct\soaph.h(637) : error C2227: left of '->jobId' must point to class/struct/union/generic type
1>d:\gsoap\struct\soaph.h(638) : error C2027: use of undefined type 'JobStatusDetail'
1> d:\gsoap\struct\struct.h(9) : see declaration of 'JobStatusDetail'
1>d:\gsoap\struct\soaph.h(638) : error C2227: left of '->status' must point to class/struct/union/generic type
1>d:\gsoap\struct\soaph.h(639) : error C2027: use of undefined type 'JobStatusDetail'
1> d:\gsoap\struct\struct.h(9) : see declaration of 'JobStatusDetail'
1>d:\gsoap\struct\soaph.h(639) : error C2227: left of '->cpuTime' must point to class/struct/union/generic type
1>d:\gsoap\struct\soaph.h(640) : error C2027: use of undefined type 'JobStatusDetail'
1> d:\gsoap\struct\struct.h(9) : see declaration of 'JobStatusDetail'
1>d:\gsoap\struct\soaph.h(640) : error C2227: left of '->wallTime' must point to class/struct/union/generic type
1>d:\gsoap\struct\soaph.h(654) : error C2027: use of undefined type 'JobStatusDetail'
1> d:\gsoap\struct\struct.h(9) : see declaration of 'JobStatusDetail'
1>d:\gsoap\struct\soaph.h(654) : error C2227: left of '->jobId' must point to class/struct/union/generic type
1>d:\gsoap\struct\soaph.h(655) : error C2027: use of undefined type 'JobStatusDetail'
1> d:\gsoap\struct\struct.h(9) : see declaration of 'JobStatusDetail'
1>d:\gsoap\struct\soaph.h(655) : error C2227: left of '->status' must point to class/struct/union/generic type
1>d:\gsoap\struct\soaph.h(656) : error C2027: use of undefined type 'JobStatusDetail'
1> d:\gsoap\struct\struct.h(9) : see declaration of 'JobStatusDetail'
1>d:\gsoap\struct\soaph.h(656) : error C2227: left of '->cpuTime' must point to class/struct/union/generic type
1>d:\gsoap\struct\soaph.h(657) : error C2027: use of undefined type 'JobStatusDetail'
1> d:\gsoap\struct\struct.h(9) : see declaration of 'JobStatusDetail'
1>d:\gsoap\struct\soaph.h(657) : error C2227: left of '->wallTime' must point to class/struct/union/generic type
1>Build log was saved at "file://d:\gSoap\struct\Server\Server\Debug\BuildLog.htm"
1>Server - 22 error(s), 0 warning(s)