Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

C_ code for Login

Add a Web reference by entering the URL to the WebService MailupSend (http://services.mailupnet.it/MailupSend.asmx) and specifying a name for it. See how to Add a Web reference in Visual Studio

...
it.mailupnet.services.MailupSend myService = 
new it.mailupnet.services.MailupSend();
string s = myService.Login(user, password, myURL);... // eseguo il parsing del messaggio di ritorno
System.Xml.XmlDataDocument docXML = new System.Xml.XmlDataDocument();
docXML.LoadXml(s); 
// ricavo il codice di errore
System.Xml.XmlNodeList error = docXML.GetElementsByTagName("errorCode");
errorCode = Convert.ToInt32(error[0].InnerText);
...
// ricavo l'access key
if (errorCode == 0)
{
System.Xml.XmlNodeList key = docXML.GetElementsByTagName("accessKey");
accessKey = key[0].InnerText;
} 
// chimate agli altrim metodi del WebServer
...
  • No labels