I use the following code(C++) to GetUserData:
CoInitialize(NULL);
HRESULT hResult;
ISOAPClientPtr pClient;
ISoapConnectorPtr pConnector;
ISoapSerializerPtr pSerializer;
ISoapReaderPtr pReader;
pClient.CreateInstance(__uuidof(SoapClient));
pClient->mssoapinit(_bstr_t("http://mail.yahooapis.com/ws/mail/v1.1/wsdl"),_bstr\
_t(""),_bstr_t(""),_bstr_t(""));
//connect to the server
pConnector.CreateInstance(__uuidof(HttpConnector));
pConnector->Property[_bstr_t("EndPointURL")] =
_variant_t("http://mail.yahooapis.com/ws/mail/v1.1/soap?appid=JaHP5FrIkXXXXXX.1s\
WFo4jEFJQyXXXX&WSSID=AM3e3LHXaJw");
InternetSetCookie(L"http://mail.yahooapis.com",L"Y",GetCookie()); //set the
cookie
pConnector->Connect();
pConnector->BeginMessage();
pSerializer.CreateInstance(__uuidof(SoapSerializer));
pSerializer->Init(_variant_t((IUnknown *)pConnector->InputStream));
pSerializer->startEnvelope(_bstr_t(""),_bstr_t("STANDARD"),_bstr_t("UTF-8"));
pSerializer->startBody(_bstr_t(""));
pSerializer->startElement(_bstr_t("GetUserData"),_bstr_t(""),_bstr_t(""),_bstr_t\
(""));
pSerializer->endElement();
pSerializer->endBody();
pSerializer->endEnvelope();
hResult = pConnector->EndMessage();
if(FAILED(hResult))
{
std::cout<<"pConnector->EndMessage() Error!"<<std::endl;
}
pReader.CreateInstance(__uuidof(SoapReader));
pReader->Load(_variant_t((IUnknown *)pConnector->OutputStream),_bstr_t(""));
cout<<(const char*)pReader->Envelope->xml<<endl;
I have bbauth appid, got the token , got the cookies and WSSID call mail api and
get the following response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><S
OAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client.MissingCredentials</faul
tcode><faultstring>Missing credentials.</faultstring><faultactor></faultactor></
SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Why do I get this result(SOAP-ENV:Client.MissingCredentials) and how to correct
it?Any help is appreciated.