示例#1
0
 public GetSkillsProfileRequestBody(SoftSkill.ArrayOfInt SkillsList)
 {
     this.SkillsList = SkillsList;
 }
示例#2
0
        public System.Threading.Tasks.Task <SoftSkill.GetSkillsProfileResponse> GetSkillsProfileAsync(SoftSkill.ArrayOfInt SkillsList)
        {
            SoftSkill.GetSkillsProfileRequest inValue = new SoftSkill.GetSkillsProfileRequest();
            inValue.Body            = new SoftSkill.GetSkillsProfileRequestBody();
            inValue.Body.SkillsList = SkillsList;

            return(((SoftSkill.wsTestPlayPublicSoap)(this)).GetSkillsProfileAsync(inValue));
        }
示例#3
0
        public GetWSResultDto returnGetSkillProfileWSResultDto(List <int> skillCodeArray, string richId)
        {
            // Declaring an empty array of ArrayOfInt
            SoftSkill.ArrayOfInt iArray = new SoftSkill.ArrayOfInt();
            for (int i = 0; i < 6; i++)
            {
                // Assigning the data into the list
                iArray.Add(skillCodeArray[i]);
            }

            // Setting up the configuration for consuming web service
            SoftSkill.wsTestPlayPublicSoapClient.EndpointConfiguration endpointConfiguration
                = new SoftSkill.wsTestPlayPublicSoapClient.EndpointConfiguration();

            // Consuming the web service providing necessary credentials.
            SoftSkill.wsTestPlayPublicSoapClient wsTestPlayPublicSoapClient =
                new SoftSkill.wsTestPlayPublicSoapClient(endpointConfiguration,
                                                         "http://wsplay.laborplay.com/wsTestPlayPublic.asmx");

            // Let the system some time to get the data. Added for testing
            System.Threading.Thread.Sleep(5000);

            // Retrieving the web servince result by consuming the service.
            var result = wsTestPlayPublicSoapClient.GetSkillsProfileAsync(iArray);

            // Let the system some time to get the data. Added for testing
            System.Threading.Thread.Sleep(5000);
            try
            {
                // Declaring and initializing the web service result data to dto object.
                GetWSResultDto getSkillProfileWSResultDto = new GetWSResultDto();
                // Assigning the value of P from web service result
                getSkillProfileWSResultDto.P = result.Result.Body.GetSkillsProfileResult.P;
                // Assigning the value of L from web service result
                getSkillProfileWSResultDto.L = result.Result.Body.GetSkillsProfileResult.L;
                // Assigning the value of A from web service result.
                getSkillProfileWSResultDto.A = result.Result.Body.GetSkillsProfileResult.A;
                // Assigning the value of Y from web service result.
                getSkillProfileWSResultDto.Y = result.Result.Body.GetSkillsProfileResult.Y;
                // Assigning the value of Profile Id from web service result.
                getSkillProfileWSResultDto.ProfileIdProp = result.Result.Body.GetSkillsProfileResult.ProfileIDProp;
                // Assigning static 2 as the value of soft skill test id to define
                // that which method is calling from the web service.
                getSkillProfileWSResultDto.SoftSkillTestId = 2;
                // Assigning static N following the requirement.
                getSkillProfileWSResultDto.SoftSkillTestQuiz = "N";
                // Assigning the rich id following the retrieved rich id by ris_id.
                getSkillProfileWSResultDto.RichId = richId;
                // Returning the web service result dto object.
                return(getSkillProfileWSResultDto);
            }
            catch
            {
                // Retrieving the result that are come from the web service rather than the expected one.
                var wsResult = "Id: " + result.Id + "\n Status: " + result.Status;
                // Creating mail body along with the retrieved result.
                var mailbody = "<br />Hello " + "Isabella" + " Pinzauti" + ",<br /><br /> <br/>" + "Here is the web service provided result for GetSkillsProfile : <br /> " + wsResult + "<br /><br /><b> N.B:  Please do not reply in this mail </b><br /><br /> Thanks, <br /> Talent Team";
                // Initiating the mail address.
                _emailManager.To.Add("*****@*****.**");
                // Initiating the mail subject.
                _emailManager.Subject = "Web_Service_Issue_Talent";
                // Initiating the mail body.
                _emailManager.Body = mailbody.ToString();
                // Sending the mail
                _emailManager.Send();
                // Returning null as the web service doens't provide the expected result.
                return(null);
            }
        }