解决了Error 200之后又遇到了Error 500: Error 500 fault: SOAP-ENV:Server[no subcode] 通过tcpdump分析得到,gsoap强制加入了一个SOAP-ENV:mustUnderstand=”1”属性,而web service方不能解析该属性。 解决办法, soap.mustUnderstand=0; 修改soapC.cpp, 注释掉soap->mustUnderstand=1这一行: SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Header *a, const char *type){ (void)soap; (void)tag; (void)id; (void)type; if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Header), type)) return soap->error; //soap->mustUnderstand = 1; if (soap_out_PointerTons1__AuthenticationInfo(soap, "ns1:AuthenticationInfo", -1, &a->ns1__AuthenticationInfo_, "")) return soap->error; return soap_element_end_out(soap, tag);} 赞微海报分享
近期评论