Quick Start (MTOM): Delete Content Services content using the web service API (Deprecated)

The following C# code example deletes a space named /Company Home/Test Directory. (See Deleting Content Services Content.)

    * Ensure that you create a .NET project that uses  
    * MS Visual Studio 2008 and version 3.5 of the .NET 
    * framework. This is required to invoke a  
    * LiveCycle service using MTOM. 
    * For information, see "Invoking LiveCycle using MTOM" in Programming with LiveCycle.   
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using System.ServiceModel; 
using DeleteContent.ServiceReference1; 
using System.IO; 
namespace DeleteContent 
       class Program 
           static void Main(string[] args) 
                   //Specify the name of the store and node 
                   String storeName = "SpacesStore"; 
                   String nodeName = "/Company Home/Test Directory"; 
                   //Create a DocumentManagementServiceClient object 
                   DocumentManagementServiceClient docManagement = new DocumentManagementServiceClient(); 
                   docManagement.Endpoint.Address = new System.ServiceModel.EndpointAddress("http://localhost:8080/soap/services/DocumentManagementService"); 
                   BasicHttpBinding b = (BasicHttpBinding)docManagement.Endpoint.Binding; 
                   b.MessageEncoding = WSMessageEncoding.Mtom; 
                   //Enable BASIC HTTP authentication 
                   docManagement.ClientCredentials.UserName.UserName = "administrator"; 
                   docManagement.ClientCredentials.UserName.Password = "password"; 
                   b.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic; 
                   b.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly; 
                  //Delete /Company Home/Test Directory 
                   Boolean ans = docManagement.deleteContent(storeName, nodeName); 
                if (ans == true) 
                    Console.WriteLine("The content was successfully deleted"); 
                       Console.WriteLine("The content was not deleted"); 
               catch (Exception ee) 

// Ethnio survey code removed