参考:http://blog.sina.com.cn/s/blog_49401fde0100s9cl.html
首先编写 add.h文件:
//gsoap ns service name: account
//gsoap ns service namespace: http://localhost/account.wsdl
//gsoap ns service location: http://localhost
//gsoap ns service executable: account.cgi
//gsoap ns service encoding: encoded
//gsoap ns schema namespace: urn:account
typedef struct ns__AccountInfo_t
{
char *uid; // login name
char *CNPCCommonDescription; // description
char *cn; // name
char accountStatus; // enable or not
char *password;
} ns__AccountInfo;
typedef struct ns__AddAccountRequest_t
{
char *validationCode;
char *requestID;
ns__AccountInfo *AccountInfo;
} ns__AddAccountRequest;
typedef struct ns__AddAccountResponse_t
{
char *requestID;
int returnFlag;
char *returnCode;
char *returnMessage;
} ns__AddAccountResponse;
int ns__addAccount(
ns__AddAccountRequest *AddAccountRequest,
ns__AddAccountResponse *AddAccountResponse );
然后:
soapcpp2 add.h