Search the web
Sign In
New User? Sign Up
ydn-mail · Yahoo! Mail Developer Community
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
How can I generate a soap client to use yahoo mail web service?   Message List  
Reply | Forward Message #650 of 655 |
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.






Fri Oct 16, 2009 6:30 am

howardwang111
Offline Offline
Send Email Send Email

Forward
Message #650 of 655 |
Expand Messages Author Sort by Date

I use the following code(C++) to GetUserData: CoInitialize(NULL); HRESULT hResult; ISOAPClientPtr pClient; ISoapConnectorPtr pConnector; ISoapSerializerPtr...
howardwang111
Offline Send Email
Oct 19, 2009
8:24 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help