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 4 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); 
// retrieving error code
System.Xml.XmlNodeList error = docXML.GetElementsByTagName("errorCode");
errorCode = Convert.ToInt32(error[0].InnerText);
...
// retrieving access key
if (errorCode == 0)
{
System.Xml.XmlNodeList key = docXML.GetElementsByTagName("accessKey");
accessKey = key[0].InnerText;
} 
// calling other webservice methods
...
  • No labels