The standard SharePoint web services are deprecated so I don't recommend using these in SharePoint Online. I recommend using the SharePoint Client Object Model. However, you can use the SharePointOnlineCredentials class which is part of the Client Object
Model to set your credentials and set the CookieContainer of the Lists proxy which is required for SharePoint Online. Below are two methods showing you how to get the SharePointOnlineCredentials and from this getting the CookieContainer.
public static CookieContainer GetO365CookieContainer(SharePointOnlineCredentials credentials, string targetSiteUrl)
{
Uri targetSite = new Uri(targetSiteUrl);
string cookieString = credentials.GetAuthenticationCookie(targetSite);
CookieContainer container = new CookieContainer();
string trimmedCookie = cookieString.TrimStart("SPOIDCRL=".ToCharArray());
container.Add(new Cookie("FedAuth", trimmedCookie, string.Empty, targetSite.Authority));
return container;
}
public static SharePointOnlineCredentials GetO365Credentials(string userName, string passWord)
{
SecureString securePassWord = new SecureString();
foreach (char c in passWord.ToCharArray()) securePassWord.AppendChar(c);
SharePointOnlineCredentials credentials = new SharePointOnlineCredentials(userName, securePassWord);
return credentials;
}