I using gSOAP
对于网络服务,但我有一个问题必须
将 2 个 Web 服务编译成一个可执行文件,还有一些
函数具有相同的名称,而不是使用参数
函数名称的其他前缀。
编译错误:
X.o: In function `soap_get_string(soap*, char**, char const*, char const*)':
X.cpp:8669: multiple definition of `soap_get_string(soap*, char**, char const*, char const*)'
Y.o:Y.cpp:4763: first defined here
在生成文件中:
wsdl2h -qlpr X.wsdl
wsdl2h Y.wsdl Y.xsd
soapcpp2 -qlpr -plpr -plprws $(GSOAP_IMPORT) -i -C X.h
soapcpp2 -psiwcprws $(GSOAP_IMPORT) -i -C Y.h
有谁知道如何解决这个问题?
19.34 How to Combine Multiple Client and Server Implementations into one Executable The wsdl2h tool can be used to import multiple WSDLs
and schemas at once. The service definitions are combined in one
header file to be parsed by soapcpp2. It is important to assign
namespace prefixes to namespace URIs using the typemap.dat file.
Otherwise, wsdl2h will assign namespace prefixes ns1, ns2, and so on
to the service operations and schema types. Thus, any change to a WSDL
or schema may result in a new prefix assignment. For more details,
please see Section 8.2. Another approach to combine multiple client
and service applications into one executable is by using C++
namespaces to structurally separate the definitions or by creating C
libraries for the client/server objects as explained in subsequent
sections. This is automated with wsdl2h option -q. Both approaches are
demonstrated by example in the gSOAP distribution, the samples/link (C
only) and samples/link++ (C++ with C++ namespaces) examples.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)