gSOAP 415错误

2022-06-22  本文已影响0人  XBruce
wsdl2h -o Init.h http://xxxx:8006/wcfhttpservice?wsdl

soapcpp2 -i -C -limport -IC:\Tools\gSOAP\gsoap-2.8\gsoap\import  Init.h

copy 生成的.cpp、.h .nsamp到工程目录

main.cpp
包含头文件

include "ZLWebService/BasicHttpBinding_USCOREIWsWcfService.nsmap"

include "ZLWebService/soapBasicHttpBinding_USCOREIWsWcfServiceProxy.h"

C/C++ Disable PrecompileHeaders

对于415错误
By replacing SOAP-ENV and SOAP-ENC namespaces that resides in the *.nsmap file and the *Proxy.cpp to

{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", NULL, NULL},
{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", NULL, NULL}
{"xsi", "http://www.w3.org/2001/XMLSchema-instance", NULL, NULL},

The above three lines tells the client to send SOAP message with version 1.1 instead of the default generated message version 1.2

中文乱码

上一篇 下一篇

猜你喜欢

热点阅读