Example Code: C#

Below is sample C# Code.

1. 
Please ensure you replace your credentials before performing a check.
2. Reference the wsdl as a  "Web Reference"
3. In certain cases the proxy class might be generated incorrectly, there is a known issue in .NET framework for complex types (
https://support.microsoft.com/en-us/kb/2486643).
    Please ensure that you change all the 2D arrays to 1D manually in the proxy classes and rebuild .

Sample implementation : 
using System;

using System.Collections.Generic;
using System.Threading.Tasks;
using System.Xml.Serialization;
using ContegoSample.com.contego.secure;
using System.ServiceModel;
using System.IO;
namespace ContegoSample
{
    class Program
    {
        static void Main(string[] args)
        {
            //Request
            var contegoRequest = new ContegoRequest();
            //Request
            var contegoResponse = new ContegoResponse();
            //Credentials - Please give the respective credentails .
            contegoRequest.Credentials = new ContegoRequestCredentials();
            
            contegoRequest.Credentials.OrganisationUID = "";
            contegoRequest.Credentials.ProfileUID = "";
            contegoRequest.Credentials.MD5signature = "";
            contegoRequest.Header = new HeaderType();
            //Person Request
            var checkPersonRequest = new ContegoRequestCheckPerson();
            var person = new CheckPersonData();
            var nameItems = new string[] { "Bob", "J", "Smith" };
            ItemsChoiceType[] itemsChoiceType = new ItemsChoiceType[]
            {
                ItemsChoiceType.Forename,
                ItemsChoiceType.Middlename,
                ItemsChoiceType.Surname
            };
            person.Items = nameItems;
            person.ItemsElementName = itemsChoiceType;
            person.Title = CheckPersonDataTitle.MR;
            person.DOB = new DateTime(1972, 10, 21).Date;
            checkPersonRequest.Person = person;
            contegoRequest.Item = checkPersonRequest;
            ContegoService cc = new ContegoService();
            try
            {
                contegoResponse = cc.Contego(contegoRequest);
                using (StringWriter stringWriter = new StringWriter())
                {
                    XmlSerializer xmlSerializer = new XmlSerializerFactory().CreateSerializer(contegoResponse.GetType());
                    xmlSerializer.Serialize((TextWriter)stringWriter, contegoResponse);
                    Console.WriteLine(stringWriter.ToString());
                    Console.ReadLine();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.ReadLine();
            }
        }
    }
}


Feedback and Knowledge Base