我在Windows 10的Microsoft Visual Studio 2010 IDE上将GSOP 2.8.74用于Web服务客户端。我需要通过客户端程序与Fedex Web服务(https://www.fedex.com/en-us/developer/web-services/process.html#documentation)通信。我使用Fedex WSDL文件中GSOAP中提到的过程创建了标头和CPP文件。它在发送第一个请求消息时失败,并给出错误SOAP_SSL_ERROR。
我已尝试在Windows上安装OPENSSL SDK,以解决考虑到与Fedex服务器通信需要SSL的问题。这样做时出现很多编译错误。然后,我与Fedex确认,他们不需要客户端进行任何SSL身份验证。
struct soap* soap = soap_new();
soap->ssl_flags = SOAP_SSL_NO_AUTHENTICATION;
ns1__ProcessShipmentRequest* processShipmentReqObj =
soap_instantiate_ns1__ProcessShipmentRequest(soap, -1, NULL, NULL, NULL);
// code for creating request message.
soap_status soapRc;
ns1__ProcessShipmentReply processShipmentReplyObj;
soapRc = shipmentProxyObj.processShipment(NULL, NULL,
processShipmentReqObj, processShipmentReplyObj); // this line returns error
// soapRc gets value 30 which is SOAP_SSL_ERROR
soapRc应该为0,即SOAP_OK。