Click or drag to resize

IWsDomainsSetChangeDomainOwner Method

This method changes the data of a domain owner. If original First name, last name, OrgName are changed method will perform a change domain ownership operation.

Namespace:  Aruba.Cloud.Domains.WsDomains
Assembly:  Aruba.Cloud.Domains.WsDomains (in Aruba.Cloud.Domains.WsDomains.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult SetChangeDomainOwner(
	SetChangeDomainOwnerRequest request
)

Parameters

request
Type: Aruba.Cloud.Domains.Common.Entities.WcfSetChangeDomainOwnerRequest

Return Value

Type: WsResult
Examples
By using the Aruba WsDomains method SetChangeDomainOwner is possible to change data of a domain owner.If original First name, last name, OrgName are changed metthod will perform a change domain ownership operation.
/// WsDomains.SetChangeDomainOwner Method (c# .NET)
public static string SetChangeDomainOwner(WsDomainsClient client,
    String domainFullName, DomainRegistrantEntity registrant)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
        // create request object
        SetChangeDomainOwnerRequest request = 
            new SetChangeDomainOwnerRequest();

        request.Body = new NewDomainRegistrantEntity();
        request.Body.DomainName = new InputDomainNameEntity();
        request.Body.DomainName.DomainFullName = domainFullName;
        request.Body.Registrant = registrant;

        // call method SetChangeDomainOwner 
        // obtaining a WsResult item
        WsResult result = client.SetChangeDomainOwner(request);

        //if the call is Success print history values
        if (result.Success)
        {
            // get Value returned from server
            stringBuilder.Append("Operation ends successfully. Result Code:");
            stringBuilder.Append(result.ResultCode);
        }
        else
        {
            throw new ApplicationException(result.ResultMessage);
        }
    }
    catch (Exception ex)
    {
        // re-run the error
        throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
See Also