C ++客户端代理头文件不是由gSoap中的soapcpp2.exe生成的

时间:2015-05-29 14:51:24

标签: c++ gsoap

成功运行生成头文件' calc.h'的wsdl2h.exe后,如下所示 -

C:\Users\Tushar\Desktop\gsoap_2.8.22\gsoap-2.8\gsoap\bin\win32>wsdl2h -o calc.h calc.wsdl

**  The gSOAP WSDL/Schema processor for C and C++, wsdl2h release 2.8.22
**  Copyright (C) 2000-2015 Robert van Engelen, Genivia Inc.
**  All Rights Reserved. This product is provided "as is", without any warranty.

**  The wsdl2h tool is released under one of the following licenses:
**  GPL or the commercial license by Genivia Inc. Use option -l for details.
Saving calc.h

Cannot open file "typemap.dat"
Problem reading type map file 'typemap.dat'.
Using internal type definitions for C++ instead.


Reading file 'calc.wsdl'...
Done reading 'calc.wsdl'

To complete the process, compile with:

> soapcpp2 calc.h
or to generate C++ proxy and object classes:
> soapcpp2 -j calc.h

接下来,我运行了gSOAP编译器' soapcpp2'在gSOAP头文件' calc.h'生成源代码存根和框架以实现客户端应用程序。如下 -

C:\Users\Tushar\Desktop\gsoap_2.8.22\gsoap-2.8\gsoap\bin\win32>soapcpp2 -IC:\Users\Tushar\Desktop\gsoap_2.8.22\gsoap-2.8\gsoap\import  calc.h

**  The gSOAP code generator for C and C++, soapcpp2 release 2.8.22
**  Copyright (C) 2000-2015, Robert van Engelen, Genivia Inc.
**  All Rights Reserved. This product is provided "as is", without any warranty.

**  The soapcpp2 tool is released under one of the following licenses:
**  GPL or the commercial license by Genivia Inc.

Saving soapStub.h annotated copy of the source input
Saving soapH.h declarations to #include
Using ns1 service name: calc
Using ns1 service style: document
Using ns1 service encoding: literal
Using ns1 service location: localhost:8000
Using ns1 schema namespace: urn:calc/calc.wsdl
Saving calc.add.req.xml sample SOAP/XML request
Saving calc.add.res.xml sample SOAP/XML response
Saving calc.sub.req.xml sample SOAP/XML request
Saving calc.sub.res.xml sample SOAP/XML response
Saving calc.mul.req.xml sample SOAP/XML request
Saving calc.mul.res.xml sample SOAP/XML response
Saving calc.div.req.xml sample SOAP/XML request
Saving calc.div.res.xml sample SOAP/XML response
Saving calc.nsmap namespace mapping table
Saving soapClient.cpp client calling stubs
Saving soapClientLib.cpp client stubs with serializers (use only for libs)
Saving soapServer.cpp server request dispatcher
Saving soapServerLib.cpp server request dispatcher with serializers (use only for libs)
Saving soapC.cpp serializers

Compilation successful

因为在gSoap文档中已经写过,gSOAP soapcpp2工具会自动生成C ++客户端应用程序的代理类。

但上面的代码中没有代理文件?我在这里做错了,请帮忙!

1 个答案:

答案 0 :(得分:1)

要生成代理类,请使用带-j标记的soapcpp2.exe。