Qt + GSOAP calls WebService

Reprinted to http://www.voidcn.com/article/p-kgfqyutp-qb.html

Modify under this version

Note 1, It is executed in the system command instead of Qt;

1. Preface

Qt itself provides us with the solution qsoap to call WebService. After reading his introduction, I feel that it is too weak, and it is a new thing, so it is still Decided not to use him. Since Qt is used, of course it is a cross-platform solution that is suitable, and the SoapToolKit of MS is not in the scope of choice. So switch to the old gsoap.

2. Environment

Qt version:

p>

Qt4.6 (other versions are also suitable)

GSOAP Version:

gsoap2.7.12 (other versions are also applicable)

Server development environment:

VS2008, C#, .net2.0 and above

3. Preparation

Go to http://www.voidcn.com/tag/http:// sourceforge.net/projects/gsoap2 download gsoap, then unzip it, and set

gsoap-2.7/gsoap/bin/win32 to the system Path Go in.

4. Client

l Create a folder client/gsoap. And copy stdsoap2.cpp and stdsoap2.h under gsoap-2.7/gsoap/ to the gsoap folder just created.

l Open the command line, cd C:/WSTest/client/gsoap, and execute:

1,

2,

3. < /p>

generated above The file is already ingsoapfolder< span style="color:#333333">; It can be copied directly to the project.

Leave a Comment

Your email address will not be published.