0
我使用gSOAP的用下面的Web服务进行通信: http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx?wsdl段错误上运行的应用程序gSOAP的
我已经运行soapcpp2生成的头文件,这是我soapClient.c: http://pastebin.com/Bjev3dP7
为getQuote:这里
struct _ns1__GetQuote
{
/// Element "StockSymbol" of XSD type xs:string.
char* StockSymbol 0; ///< Optional element.
/// Element "LicenseKey" of XSD type xs:string.
char* LicenseKey 0; ///< Optional element.
};
struct _ns1__GetQuoteResponse
{
/// Element "GetQuoteResult" of XSD type "http://ws.cdyne.com/":QuoteData.
struct ns1__QuoteData* GetQuoteResult 1; ///< Required element.
};
是我到目前为止的代码:
#include "soapH.h"
#include "DelayedStockQuoteSoap.nsmap"
#include "soapClient.c"
struct _ns1__GetQuote *ns1__GetQuote;
struct _ns1__GetQuoteResponse *response;
main() {
struct soap *soap ;
ns1__GetQuote->StockSymbol = "goog";
ns1__GetQuote->LicenseKey = "0";
if (soap_call___ns1__GetQuote(soap, NULL, NULL, ns1__GetQuote, &response) == SOAP_OK)
printf("yay\n");
}
当我运行此代码时,我收到段错误,任何提示?