C# SOAP sample client files

Main.cs

The Main.cs file logs in to M-Business SOAP Server and sets up an environment from which calls can be made to the M-Business SOAP API.

AsemblyInfo.cs

The AsemblyInfo.cs file sets up the assembly for the Microsoft .NET framework that Visual Studio .NET requires.

Hook.cs

The Hook.cs file sets up helper classes to properly format SOAP headers. For an explanation of why this is necessary, see comments in the file.

TestAPI.cs

The TestAPI.cs sets up some more helper functions, but most of the sample code in this file consists of calls to the M-Business SOAP API, with explanatory comments. The following is the first call, creating a new user:

			// group user create
			NewUser nu = new NewUser();
			nu.userName = "CS_UnitTestGroupUser" + System.DateTime.Now.Ticks;
			nu.firstName = "UnitTest";
			nu.lastName = "User";
			nu.password = "j";
			nu.comment = "exec";
			m_groupUserId = m_api.userCreate(nu);
			if(m_groupUserId == 0) 
			{
				Console.WriteLine("Failed to create group user");
				return 1;
			}
            Console.Write( "." );