Domains and DNS > 2 - Domains Management > Read domain details

2.2 Read domain details

By using the Aruba WsDomains method GetDomainDetails is possible to retrieves detailed data of a domain :Owner Data, Nameserver data, Expiry Date, RegistrationDate..

Parameters
domainFullName
Type: String
Full name of the domain.


    /// WsDomains.GetDomainDetails Method (c# .NET)
    public static string GetDomainDetails(WsDomainsClient client, 
        String domainFullName)
    {
        //specify the account login details 
        client.ClientCredentials.UserName.UserName = "ARU-0000";
        client.ClientCredentials.UserName.Password = "0123456789";

        StringBuilder stringBuilder = new StringBuilder();

        try
        {
            // create the request object
            GetDomainDetailsRequest request = new GetDomainDetailsRequest();
            request.Body = new InputDomainNameEntity();
            request.Body.DomainFullName = domainFullName;

            // call method GetDomainDetails 
            // obtaining a WsResultOfFullRegisteredDomainDataEntity item
            WsResultOfFullRegisteredDomainDataEntity result = 
                client.GetDomainDetails(request);

            //if the call is Success print history values
            if (result.Success)
            {
                stringBuilder.Append("Operation ends successfully\n");

                // get Value returned from server
                FullRegisteredDomainDataEntity domain = result.Value;

                stringBuilder.Append("\nAuthInfo: ");
                stringBuilder.Append(domain.AuthInfo);
                stringBuilder.Append("\n LockStatus: ");
                stringBuilder.Append(domain.LockStatus);
                   
                if (domain.DnsHosts != null)
                {
                    foreach (DnsHostEntity host in domain.DnsHosts)
                    {
                        stringBuilder.Append("\n ----- Host ------ \n");
                        stringBuilder.Append("\n HostName: ");
                        stringBuilder.Append(host.HostName);
                        stringBuilder.Append("\n IPAddress: ");
                        stringBuilder.Append(host.IPAddress);
                        stringBuilder.Append("\n IPAddressType: ");
                        stringBuilder.Append(host.IPAddressType);
                    }
                }

                if (domain.DomainData != null)
                {
                    stringBuilder.Append("\n ---- DomainData --- \n: ");
                    stringBuilder.Append("\n  Domain UserID: ");
                    stringBuilder.Append(domain.DomainData.UserID);
                    stringBuilder.Append("\nDomain CompanyID: ");
                    stringBuilder.Append(domain.DomainData.CompanyID);
                    stringBuilder.Append("\nDomain DataCenterID: ");
                    stringBuilder.Append(domain.DomainData.DataCenterID);
                    stringBuilder.Append("\nDomain FullName: ");
                    stringBuilder.Append(
                        domain.DomainData.DomainName.DomainFullName);

                    if (domain.DomainData.DomainName.PreferredLanguage.HasValue)
                    {
                        stringBuilder.Append("\nDomain PreferredLanguage: ");
                        stringBuilder.Append(
                            domain.DomainData.DomainName.PreferredLanguage.Value);
                    }
                    stringBuilder.Append("\nDomain SecondLevelDomain: ");
                    stringBuilder.Append("\nDomain DomainServiceID: ");
                    stringBuilder.Append(domain.DomainData.DomainServiceID);
                    stringBuilder.Append("\nDomain AutoRenew: ");
                    stringBuilder.Append(domain.DomainData.AutoRenew);
                    if (domain.DomainData.CreationDate.HasValue)
                    {
                        stringBuilder.Append("\nDomain CreationDate: ");
                        stringBuilder.Append(
                            domain.DomainData.CreationDate.Value.ToLongDateString());
                    }
                    if (domain.DomainData.ExpiryDate.HasValue)
                    {
                        stringBuilder.Append("\nDomain ExpiryDate: ");
                        stringBuilder.Append(
                            domain.DomainData.ExpiryDate.Value.ToLongDateString());
                    }
                    if (domain.DomainData.CloudExpiryDate.HasValue)
                    {
                        stringBuilder.Append("\nDomain CloudExpiryDate: ");
                        stringBuilder.Append(
                            domain.DomainData.CloudExpiryDate.Value.ToLongDateString());
                    }
                    if (domain.DomainData.LastRenewDate.HasValue)
                    {
                        stringBuilder.Append("\nDomain LastRenewDate: ");
                        stringBuilder.Append(
                            domain.DomainData.LastRenewDate.Value.ToLongDateString());
                    }
                    stringBuilder.Append("\nDomain PrivacyStatus: ");
                    stringBuilder.Append(domain.DomainData.PrivacyStatus);
                    stringBuilder.Append("\nDomain Status: ");
                    stringBuilder.Append(domain.DomainData.Status);
                }

                if (domain.ContactAdmin != null)
                {
                    stringBuilder.Append("\n ----- Contact Admin ---- \n");
                    stringBuilder.Append("\n FirstName: ");
                    stringBuilder.Append(domain.ContactAdmin.FirstName);
                    stringBuilder.Append("\n LastName: ");
                    stringBuilder.Append(domain.ContactAdmin.LastName);
                    stringBuilder.Append("\n OrganizationName: ");
                    stringBuilder.Append(domain.ContactAdmin.OrganizationName);
                    stringBuilder.Append("\n AddressField1: ");
                    stringBuilder.Append(domain.ContactAdmin.AddressField1);
                    stringBuilder.Append("\n AddressField2: ");
                    stringBuilder.Append(domain.ContactAdmin.AddressField2);
                    stringBuilder.Append("\n AddressField3: ");
                    stringBuilder.Append(domain.ContactAdmin.AddressField3);
                    stringBuilder.Append("\n PostalCode: ");
                    stringBuilder.Append(domain.ContactAdmin.PostalCode);
                    stringBuilder.Append("\n City: ");
                    stringBuilder.Append(domain.ContactAdmin.City);
                    stringBuilder.Append("\n Country: ");
                    stringBuilder.Append(domain.ContactAdmin.Country);
                    stringBuilder.Append("\n Email: ");
                    stringBuilder.Append(domain.ContactAdmin.Email);
                    stringBuilder.Append("\n Fax: ");
                    stringBuilder.Append(domain.ContactAdmin.Fax);
                    stringBuilder.Append("\n Phone: ");
                    stringBuilder.Append(domain.ContactAdmin.Phone);
                    stringBuilder.Append("\n State: ");
                    stringBuilder.Append(domain.ContactAdmin.State);
                    stringBuilder.Append("\n TldData: ");
                    stringBuilder.Append(domain.ContactAdmin.TldData);
                }

                if (domain.ContactBilling != null)
                {
                    stringBuilder.Append("\n ----- Contact Billing ---- \n");
                    stringBuilder.Append("\n FirstName: ");
                    stringBuilder.Append(domain.ContactBilling.FirstName);
                    stringBuilder.Append("\n LastName: ");
                    stringBuilder.Append(domain.ContactBilling.LastName);
                    stringBuilder.Append("\n OrganizationName: ");
                    stringBuilder.Append(domain.ContactBilling.OrganizationName);
                    stringBuilder.Append("\n AddressField1: ");
                    stringBuilder.Append(domain.ContactBilling.AddressField1);
                    stringBuilder.Append("\n AddressField2: ");
                    stringBuilder.Append(domain.ContactBilling.AddressField2);
                    stringBuilder.Append("\n AddressField3: ");
                    stringBuilder.Append(domain.ContactBilling.AddressField3);
                    stringBuilder.Append("\n PostalCode: ");
                    stringBuilder.Append(domain.ContactBilling.PostalCode);
                    stringBuilder.Append("\n City: ");
                    stringBuilder.Append(domain.ContactBilling.City);
                    stringBuilder.Append("\n Country: ");
                    stringBuilder.Append(domain.ContactBilling.Country);
                    stringBuilder.Append("\n Email: ");
                    stringBuilder.Append(domain.ContactBilling.Email);
                    stringBuilder.Append("\n Fax: ");
                    stringBuilder.Append(domain.ContactBilling.Fax);
                    stringBuilder.Append("\n Phone: ");
                    stringBuilder.Append(domain.ContactBilling.Phone);
                    stringBuilder.Append("\n State: ");
                    stringBuilder.Append(domain.ContactBilling.State);
                    stringBuilder.Append("\n TldData: ");
                    stringBuilder.Append(domain.ContactBilling.TldData);
                }

                if (domain.ContactOwner != null)
                {
                    stringBuilder.Append("\n ----- Contact Owner ---- \n");
                    stringBuilder.Append("\n FirstName: ");
                    stringBuilder.Append(domain.ContactOwner.FirstName);
                    stringBuilder.Append("\n LastName: ");
                    stringBuilder.Append(domain.ContactOwner.LastName);
                    stringBuilder.Append("\n OrganizationName: ");
                    stringBuilder.Append(domain.ContactOwner.OrganizationName);
                    stringBuilder.Append("\n AddressField1: ");
                    stringBuilder.Append(domain.ContactOwner.AddressField1);
                    stringBuilder.Append("\n AddressField2: ");
                    stringBuilder.Append(domain.ContactOwner.AddressField2);
                    stringBuilder.Append("\n AddressField3: ");
                    stringBuilder.Append(domain.ContactOwner.AddressField3);
                    stringBuilder.Append("\n PostalCode: ");
                    stringBuilder.Append(domain.ContactOwner.PostalCode);
                    stringBuilder.Append("\n City: ");
                    stringBuilder.Append(domain.ContactOwner.City);
                    stringBuilder.Append("\n Country: ");
                    stringBuilder.Append(domain.ContactOwner.Country);
                    stringBuilder.Append("\n Email: ");
                    stringBuilder.Append(domain.ContactOwner.Email);
                    stringBuilder.Append("\n Fax: ");
                    stringBuilder.Append(domain.ContactOwner.Fax);
                    stringBuilder.Append("\n Phone: ");
                    stringBuilder.Append(domain.ContactOwner.Phone);
                    stringBuilder.Append("\n State: ");
                    stringBuilder.Append(domain.ContactOwner.State);
                    stringBuilder.Append("\n TldData: ");
                    stringBuilder.Append(domain.ContactOwner.TldData);
                }

                if (domain.ContactTech != null)
                {
                    stringBuilder.Append("\n ----- Contact Tech ---- \n");
                    stringBuilder.Append("\n FirstName: ");
                    stringBuilder.Append(domain.ContactTech.FirstName);
                    stringBuilder.Append("\n LastName: ");
                    stringBuilder.Append(domain.ContactTech.LastName);
                    stringBuilder.Append("\n OrganizationName: ");
                    stringBuilder.Append(domain.ContactTech.OrganizationName);
                    stringBuilder.Append("\n AddressField1: ");
                    stringBuilder.Append(domain.ContactTech.AddressField1);
                    stringBuilder.Append("\n AddressField2: ");
                    stringBuilder.Append(domain.ContactTech.AddressField2);
                    stringBuilder.Append("\n AddressField3: ");
                    stringBuilder.Append(domain.ContactTech.AddressField3);
                    stringBuilder.Append("\n PostalCode: ");
                    stringBuilder.Append(domain.ContactTech.PostalCode);
                    stringBuilder.Append("\n City: ");
                    stringBuilder.Append(domain.ContactTech.City);
                    stringBuilder.Append("\n Country: ");
                    stringBuilder.Append(domain.ContactTech.Country);
                    stringBuilder.Append("\n Email: ");
                    stringBuilder.Append(domain.ContactTech.Email);
                    stringBuilder.Append("\n Fax: ");
                    stringBuilder.Append(domain.ContactTech.Fax);
                    stringBuilder.Append("\n Phone: ");
                    stringBuilder.Append(domain.ContactTech.Phone);
                    stringBuilder.Append("\n State: ");
                    stringBuilder.Append(domain.ContactTech.State);
                    stringBuilder.Append("\n TldData: ");
                    stringBuilder.Append(domain.ContactTech.TldData);
                }
            }
            else
            {
                throw new ApplicationException(result.ResultMessage);
            }
        }
        catch (Exception ex)
        {
            // re-run the error
            throw new ApplicationException(ex.Message);
        }

        return stringBuilder.ToString();
    }
    
/// WsDomains.GetDomainDetails Method (JAVA)
public static String GetDomainDetails(IWsDomains client,
        String domainFullName) 
    {
    //specify the account login details 
    ((BindingProvider) client).getRequestContext()
            .put(BindingProvider.USERNAME_PROPERTY, "ARU-0000");
    ((BindingProvider) client).getRequestContext()
            .put(BindingProvider.PASSWORD_PROPERTY, "0123456789");

    StringBuilder stringBuilder = new StringBuilder();

    try {
        // create the request object
        GetDomainDetailsRequest request = new GetDomainDetailsRequest();
        request.setBody(new InputDomainNameEntity());
        request.getBody().setDomainFullName(domainFullName);

        // call method GetDomainDetails 
        // obtaining a WsResultOfFullRegisteredDomainDataEntity item
        WsResultOfFullRegisteredDomainDataEntity result =
                client.getDomainDetails(request);

        //if the call is Success print history values
        if (result.isSuccess()) {
            stringBuilder.append("Operation ends successfully\n");

            // get Value returned from server
            FullRegisteredDomainDataEntity domain = result.getValue();

            stringBuilder.append("\nAuthInfo: ");
            stringBuilder.append(domain.getAuthInfo());
            stringBuilder.append("\n LockStatus: ");
            stringBuilder.append(domain.getLockStatus());

            if (domain.getDnsHosts() != null) 
                {
                List dnsHostEntityList = domain.getDnsHosts().getDnsHostEntity();
                for (Iterator<DnsHostEntity> it = dnsHostEntityList.iterator(); 
			it.hasNext();)
                {
                DnsHostEntity host = it.next();
                stringBuilder.append("\n ----- Host ------ \n");
                stringBuilder.append("\n HostName: ");
                stringBuilder.append(host.getHostName());
                stringBuilder.append("\n IPAddress: ");
                stringBuilder.append(host.getIPAddress());
                stringBuilder.append("\n IPAddressType: ");
                stringBuilder.append(host.getIPAddressType());
                }
            }

            if (domain.getDomainData() != null) {
                stringBuilder.append("\n ---- DomainData --- \n: ");
                stringBuilder.append("\n  Domain UserID: ");
                stringBuilder.append(domain.getDomainData().getUserID());
                stringBuilder.append("\nDomain CompanyID: ");
                stringBuilder.append(domain.getDomainData().getCompanyID());
                stringBuilder.append("\nDomain DataCenterID: ");
                stringBuilder.append(domain.getDomainData().getDataCenterID());
                stringBuilder.append("\nDomain FullName: ");
                stringBuilder.append(domain.getDomainData().getDomainName().
		    getDomainFullName());
                stringBuilder.append("\nDomain PreferredLanguage: ");
                stringBuilder.append(domain.getDomainData().getDomainName().
		    getPreferredLanguage());
                stringBuilder.append("\nDomain SecondLevelDomain: ");
                stringBuilder.append("\nDomain DomainServiceID: ");
                stringBuilder.append(domain.getDomainData().getDomainServiceID());
                stringBuilder.append("\nDomain CreationDate: ");
                stringBuilder.append("\nDomain PrivacyStatus: ");
                stringBuilder.append(domain.getDomainData().getPrivacyStatus());
                stringBuilder.append("\nDomain Status: ");
                stringBuilder.append(domain.getDomainData().getStatus());
            }

            if (domain.getContactAdmin() != null) {
                stringBuilder.append("\n ----- Contact Admin ---- \n");
                stringBuilder.append("\n FirstName: ");
                stringBuilder.append(domain.getContactAdmin().getFirstName());
                stringBuilder.append("\n LastName: ");
                stringBuilder.append(domain.getContactAdmin().getLastName());
                stringBuilder.append("\n OrganizationName: ");
                stringBuilder.append(domain.getContactAdmin().getOrganizationName());
                stringBuilder.append("\n AddressField1: ");
                stringBuilder.append(domain.getContactAdmin().getAddressField1());
                stringBuilder.append("\n AddressField2: ");
                stringBuilder.append(domain.getContactAdmin().getAddressField2());
                stringBuilder.append("\n AddressField3: ");
                stringBuilder.append(domain.getContactAdmin().getAddressField3());
                stringBuilder.append("\n PostalCode: ");
                stringBuilder.append(domain.getContactAdmin().getPostalCode());
                stringBuilder.append("\n City: ");
                stringBuilder.append(domain.getContactAdmin().getCity());
                stringBuilder.append("\n Country: ");
                stringBuilder.append(domain.getContactAdmin().getCountry());
                stringBuilder.append("\n Email: ");
                stringBuilder.append(domain.getContactAdmin().getEmail());
                stringBuilder.append("\n Fax: ");
                stringBuilder.append(domain.getContactAdmin().getFax());
                stringBuilder.append("\n Phone: ");
                stringBuilder.append(domain.getContactAdmin().getPhone());
                stringBuilder.append("\n State: ");
                stringBuilder.append(domain.getContactAdmin().getState());
                stringBuilder.append("\n TldData: ");
                stringBuilder.append(domain.getContactAdmin().getTldData());
            }

            if (domain.getContactBilling() != null) {
                stringBuilder.append("\n ----- Contact Billing ---- \n");
                stringBuilder.append("\n FirstName: ");
                stringBuilder.append(domain.getContactBilling().getFirstName());
                stringBuilder.append("\n LastName: ");
                stringBuilder.append(domain.getContactBilling().getLastName());
                stringBuilder.append("\n OrganizationName: ");
                stringBuilder.append(domain.getContactBilling().getOrganizationName());
                stringBuilder.append("\n AddressField1: ");
                stringBuilder.append(domain.getContactBilling().getAddressField1());
                stringBuilder.append("\n AddressField2: ");
                stringBuilder.append(domain.getContactBilling().getAddressField2());
                stringBuilder.append("\n AddressField3: ");
                stringBuilder.append(domain.getContactBilling().getAddressField3());
                stringBuilder.append("\n PostalCode: ");
                stringBuilder.append(domain.getContactBilling().getPostalCode());
                stringBuilder.append("\n City: ");
                stringBuilder.append(domain.getContactBilling().getCity());
                stringBuilder.append("\n Country: ");
                stringBuilder.append(domain.getContactBilling().getCountry());
                stringBuilder.append("\n Email: ");
                stringBuilder.append(domain.getContactBilling().getEmail());
                stringBuilder.append("\n Fax: ");
                stringBuilder.append(domain.getContactBilling().getFax());
                stringBuilder.append("\n Phone: ");
                stringBuilder.append(domain.getContactBilling().getPhone());
                stringBuilder.append("\n State: ");
                stringBuilder.append(domain.getContactBilling().getState());
                stringBuilder.append("\n TldData: ");
                stringBuilder.append(domain.getContactBilling().getTldData());
            }

            if (domain.getContactOwner() != null) {
                stringBuilder.append("\n ----- Contact Owner ---- \n");
                stringBuilder.append("\n FirstName: ");
                stringBuilder.append(domain.getContactOwner().getFirstName());
                stringBuilder.append("\n LastName: ");
                stringBuilder.append(domain.getContactOwner().getLastName());
                stringBuilder.append("\n OrganizationName: ");
                stringBuilder.append(domain.getContactOwner().getOrganizationName());
                stringBuilder.append("\n AddressField1: ");
                stringBuilder.append(domain.getContactOwner().getAddressField1());
                stringBuilder.append("\n AddressField2: ");
                stringBuilder.append(domain.getContactOwner().getAddressField2());
                stringBuilder.append("\n AddressField3: ");
                stringBuilder.append(domain.getContactOwner().getAddressField3());
                stringBuilder.append("\n PostalCode: ");
                stringBuilder.append(domain.getContactOwner().getPostalCode());
                stringBuilder.append("\n City: ");
                stringBuilder.append(domain.getContactOwner().getCity());
                stringBuilder.append("\n Country: ");
                stringBuilder.append(domain.getContactOwner().getCountry());
                stringBuilder.append("\n Email: ");
                stringBuilder.append(domain.getContactOwner().getEmail());
                stringBuilder.append("\n Fax: ");
                stringBuilder.append(domain.getContactOwner().getFax());
                stringBuilder.append("\n Phone: ");
                stringBuilder.append(domain.getContactOwner().getPhone());
                stringBuilder.append("\n State: ");
                stringBuilder.append(domain.getContactOwner().getState());
                stringBuilder.append("\n TldData: ");
                stringBuilder.append(domain.getContactOwner().getTldData());
            }

            if (domain.getContactTech() != null) {
                stringBuilder.append("\n ----- Contact Tech ---- \n");
                stringBuilder.append("\n FirstName: ");
                stringBuilder.append(domain.getContactTech().getFirstName());
                stringBuilder.append("\n LastName: ");
                stringBuilder.append(domain.getContactTech().getLastName());
                stringBuilder.append("\n OrganizationName: ");
                stringBuilder.append(domain.getContactTech().getOrganizationName());
                stringBuilder.append("\n AddressField1: ");
                stringBuilder.append(domain.getContactTech().getAddressField1());
                stringBuilder.append("\n AddressField2: ");
                stringBuilder.append(domain.getContactTech().getAddressField2());
                stringBuilder.append("\n AddressField3: ");
                stringBuilder.append(domain.getContactTech().getAddressField3());
                stringBuilder.append("\n PostalCode: ");
                stringBuilder.append(domain.getContactTech().getPostalCode());
                stringBuilder.append("\n City: ");
                stringBuilder.append(domain.getContactTech().getCity());
                stringBuilder.append("\n Country: ");
                stringBuilder.append(domain.getContactTech().getCountry());
                stringBuilder.append("\n Email: ");
                stringBuilder.append(domain.getContactTech().getEmail());
                stringBuilder.append("\n Fax: ");
                stringBuilder.append(domain.getContactTech().getFax());
                stringBuilder.append("\n Phone: ");
                stringBuilder.append(domain.getContactTech().getPhone());
                stringBuilder.append("\n State: ");
                stringBuilder.append(domain.getContactTech().getState());
                stringBuilder.append("\n TldData: ");
                stringBuilder.append(domain.getContactTech().getTldData());
            }
        } else {
            throw new Exception(result.getResultMessage());
        }
    } catch (Exception ex) {
        //show error
        System.out.println(ex);
    }

    return stringBuilder.toString();
}
Version
API: v2.8 URL:https://api.services.cloud.it/wsDomains/v2.8/WsDomains.svc?wsdl
See also