Skip to content

Instantly share code, notes, and snippets.

@ctigeek
Created January 4, 2021 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ctigeek/7c00568372224dc3acbbd1bdd70776db to your computer and use it in GitHub Desktop.
Save ctigeek/7c00568372224dc3acbbd1bdd70776db to your computer and use it in GitHub Desktop.
Calling the soap api
using System;
using NUnit.Framework;
namespace RackspaceSoapTest
{
[TestFixture]
public class Class1
{
[Test]
public void Test1()
{
string username = "xxxxxxxxxxxxxxxxxxxx";
string password = "xxxxxxxxxxxxxxxxxxxx";
string domain = "mydomain.net";
string user = "someUser";
var client = new excedent.UtilsSoapPortClient();
var activeStatus = client.GetUserActiveStatus(username, password, domain, user);
if (activeStatus == 1)
{
Console.WriteLine("Disabling user....");
var response = client.ModifyUser(username, password, domain, user, "", 0, "", "", "", "", "", "", "", "", "", "");
Console.WriteLine(response);
}
else
{
Console.WriteLine("Enabling user....");
var response = client.ModifyUser(username, password, domain, user, "", 1, "", "", "", "", "", "", "", "", "", "");
Console.WriteLine(response);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment