Inheritance: Service, IDisposable
        public void Webservice_Test_WhenRequestShouldNotTimeout_ExpectNoMessage()
        {
            //------------Setup for test--------------------------
            var serviceXml = XmlResource.Fetch("WebService");
            var sourceXml = XmlResource.Fetch("WebSource");
            var response = JsonResource.Fetch("empty");

            var service = new WebService(serviceXml) { Source = new WebSource(sourceXml) };

            foreach(var parameter in service.Method.Parameters)
            {
                parameter.Value = parameter.DefaultValue;
            }

            var webExecuteHitCount = 0;
            var resourceCatalog = new Mock<IResourceCatalog>();
            var services = new WebServicesMock(resourceCatalog.Object,
                (WebSource source, WebRequestMethod method, string uri, string data, bool error, out ErrorResultTO errors, string[] headers) =>
                {
                    webExecuteHitCount++;
                    errors = new ErrorResultTO();
                    return response;
                });

            //------------Execute Test---------------------------
            var result = services.Test(service.ToString(), Guid.Empty, Guid.Empty);

            //------------Assert Results-------------------------
            Assert.AreEqual(1, webExecuteHitCount);
            Assert.AreEqual(string.Empty, result.RequestMessage);
        }
 public static WebService Create()
 {
     var result = new WebService
     {
         ResourceID = Guid.Empty,
         Source = { ResourceID = Guid.Empty },
     };
     return result;
 }
        public void WebServiceConstructorWithXmlWithoutActionElementExpectedDoesNotThrowException()
        {
            //------------Setup for test--------------------------
            const string XmlDataString = @"<Service Name=""Test WebService"" ID=""51a58300-7e9d-4927-a57b-e5d700b11b55"">
	<Actions>
	</Actions>
	<Category>System</Category>
</Service>";
            //------------Execute Test---------------------------
            var testElm = XElement.Parse(XmlDataString);
            var webService = new WebService(testElm);
            //------------Assert Results-------------------------
            Assert.AreEqual("Test WebService", webService.ResourceName);
            Assert.AreEqual(ResourceType.WebService, webService.ResourceType);
            Assert.AreEqual("51a58300-7e9d-4927-a57b-e5d700b11b55", webService.ResourceID.ToString());
            Assert.AreEqual("System", webService.ResourcePath);
            Assert.IsNull(webService.Source);
        }
        public void WebServiceConstructorExpectedCorrectWebService()
        {
            //------------Setup for test--------------------------
            const string XmlDataString = @"<Service Name=""Test WebService"" ID=""51a58300-7e9d-4927-a57b-e5d700b11b55"">
	<Actions>
		<Action Name=""Test_WebService"" Type=""WebService"" SourceName=""Test WebService"" SourceMethod=""Get"" JsonPath=""$.apath"">
			<Inputs>
				<Input Name=""Path"" Source=""Path"">
					<Validator Type=""Required"" />
				</Input>
				<Input Name=""Revision"" Source=""Revision"">
					<Validator Type=""Required"" />
				</Input>
				<Input Name=""Username"" Source=""Username"">
					<Validator Type=""Required"" />
				</Input>
				<Input Name=""Password"" Source=""Password"">
					<Validator Type=""Required"" />
				</Input>
			</Inputs>
			<Outputs>
				<Output Name=""error"" MapsTo=""error"" Value=""[[Error]]"" />
				<Output Name=""author"" MapsTo=""author"" Value=""[[SVNLog().Author]]"" Recordset=""result"" />
			</Outputs>
		</Action>
	</Actions>
	<Category>System</Category>
</Service>";
            //------------Execute Test---------------------------
            var testElm = XElement.Parse(XmlDataString);
            var webService = new WebService(testElm);
            //------------Assert Results-------------------------
            Assert.AreEqual("Test WebService", webService.ResourceName);
            Assert.AreEqual(ResourceType.WebService, webService.ResourceType);
            Assert.AreEqual("51a58300-7e9d-4927-a57b-e5d700b11b55", webService.ResourceID.ToString());
            Assert.AreEqual("$.apath", webService.JsonPath);
            Assert.AreEqual("System", webService.ResourcePath);
            Assert.IsNotNull(webService.Source);
        }
        public void WebServicesTestWithValidArgsAndNonEmptyResponseExpectedFetchesRecordsetOnly()
        {
            var serviceXml = XmlResource.Fetch("WebService");
            var sourceXml = XmlResource.Fetch("WebSource");
            var responseXml = XmlResource.Fetch("WebServiceResponse");

            var service = new WebService(serviceXml) { Source = new WebSource(sourceXml), RequestResponse = responseXml.ToString() };

            foreach(var parameter in service.Method.Parameters)
            {
                parameter.Value = parameter.DefaultValue;
            }

            var webExecuteHitCount = 0;
            var resourceCatalog = new Mock<IResourceCatalog>();
            var services = new WebServicesMock(resourceCatalog.Object,
                (WebSource source, WebRequestMethod method, string uri, string data, bool error, out ErrorResultTO errors, string[] headers) =>
                {
                    webExecuteHitCount++;
                    errors = new ErrorResultTO();
                    return string.Empty;
                });

            var result = services.Test(service.ToString(), Guid.Empty, Guid.Empty);

            Assert.AreEqual(0, webExecuteHitCount);

            // BUG 9626 - 2013.06.11 - TWR: RecordsetListHelper.ToRecordsetList returns correct number of recordsets now
            Assert.AreEqual(1, result.Recordsets.Count);
            Assert.AreEqual("", result.Recordsets[0].Name);
        }
        public void WebServicesDeserializeServiceWithValidJsonExpectedReturnsWebService()
        {
            var xml = XmlResource.Fetch("WebService");
            var service = new WebService(xml);

            var services = new WebServicesMock();
            var result = services.DeserializeService(service.ToString());

            WebServiceTests.VerifyEmbeddedWebService(result as WebService);
        }
        public void Webservice_Test_WhenJsonPathNotSet_ExpectNoShapedData()
        {
            //------------Setup for test--------------------------
            var serviceXml = XmlResource.Fetch("WebService");
            var sourceXml = XmlResource.Fetch("WebSource");
            var response = JsonResource.Fetch("cryptsy_all_markets");

            var service = new WebService(serviceXml) { Source = new WebSource(sourceXml) };

            var services = new WebServicesMock();

            service.RequestResponse = response;

            //------------Execute Test---------------------------
            var result = services.ApplyPath(service.ToString(), Guid.Empty, Guid.Empty);

            //------------Assert Results-------------------------
            Assert.AreEqual(null, result.JsonPathResult);
        }
 public void WebServiceContructorWithDefaultExpectedInitializesProperties()
 {
     var service = new WebService();
     Assert.AreEqual(Guid.Empty, service.ResourceID);
     Assert.AreEqual(ResourceType.WebService, service.ResourceType);
 }
        public virtual RecordsetList FetchRecordset(WebService webService, bool addFields)
        {
            if(webService == null)
            {
                throw new ArgumentNullException("webService");
            }

            var outputDescription = webService.GetOutputDescription();
            return outputDescription.ToRecordsetList(webService.Recordsets);
        }
Example #10
0
        public WebService Test(string args, Guid workspaceId, Guid dataListId)
        {
            var service = new WebService();
            try
            {
                service = JsonConvert.DeserializeObject<WebService>(args);

                if(string.IsNullOrEmpty(service.RequestResponse))
                {
                    ErrorResultTO errors;
                    ExecuteRequest(service, true, out errors, _webExecute);
                    ((WebSource)service.Source).DisposeClient();
                }

                var preTestRsData = service.Recordsets;
                service.RequestMessage = string.Empty;
                service.JsonPathResult = string.Empty;

                if(service.RequestResponse.IsJSON() && String.IsNullOrEmpty(service.JsonPath))
                {
                    service.ApplyPath();
                    // we need to timeout this request after 10 seconds due to nasty pathing issues ;)
                    Thread jsonMapTaskThread = null;
                    var jsonMapTask = new Task(() =>
                    {
                        jsonMapTaskThread = Thread.CurrentThread;
                        service.Recordsets = FetchRecordset(service, true);
                    });

                    jsonMapTask.Start();
                    jsonMapTask.Wait(10000);

                    if(!jsonMapTask.IsCompleted)
                    {
                        if(jsonMapTaskThread != null)
                        {
                            jsonMapTaskThread.Abort();
                        }

                        service.Recordsets = preTestRsData;
                        service.RequestMessage = GlobalConstants.WebServiceTimeoutMessage;
                    }

                    jsonMapTask.Dispose();
                }
                else
                {
                    service.Recordsets = FetchRecordset(service, true);
                }

            }
            catch(Exception ex)
            {
                RaiseError(ex);
                if(service.Recordsets.Count > 0)
                {
                    service.Recordsets[0].HasErrors = true;
                    service.Recordsets[0].ErrorMessage = ex.Message;
                }
                service.RequestResponse = ex.Message;
            }

            return service;
        }
        public void WebServiceContructorWithValidXmlExpectedInitializesProperties()
        {
            var xml = XmlResource.Fetch("WebService");

            var service = new WebService(xml);
            VerifyEmbeddedWebService(service);
        }
 public override RecordsetList FetchRecordset(WebService service, bool addFields)
 {
     FetchRecordsetHitCount++;
     FetchRecordsetAddFields = addFields;
     return base.FetchRecordset(service, addFields);
 }
 protected void ExecuteWebRequest(WebService service, out ErrorResultTO errors)
 {
     throw new Exception("Cannot Execute Web Request");
 }
 public void WebService_ApplyPath_WhenResponseDataNull_NothingHappens()
 {
     //------------Setup for test--------------------------
     var webService = new WebService { RequestResponse = null };
     //------------Execute Test---------------------------
     webService.ApplyPath();
     //------------Assert Results-------------------------
     Assert.IsNull(webService.RequestResponse);
 }
        public static void VerifyEmbeddedWebService(WebService service)
        {
            Assert.AreEqual(Guid.Parse("ec2df7f9-53aa-4873-a13e-4001cef21508"), service.ResourceID);
            Assert.AreEqual(ResourceType.WebService, service.ResourceType);
            Assert.AreEqual("/GetWeather?CityName=[[CityName]]&CountryName=[[CountryName]]", service.RequestUrl);
            Assert.AreEqual(WebRequestMethod.Get, service.RequestMethod);
            Assert.AreEqual(Guid.Parse("518edc28-e348-4a52-a900-f6aa75cfe92b"), service.Source.ResourceID);

            Assert.AreEqual("Paris-Aeroport Charles De Gaulle", service.Method.Parameters.First(p => p.Name == "CityName").DefaultValue);
            Assert.AreEqual("France", service.Method.Parameters.First(p => p.Name == "CountryName").DefaultValue);

            Assert.AreEqual("Location", service.Recordsets[0].Fields.First(f => f.Name == "Location").Alias);
            Assert.AreEqual("Time", service.Recordsets[0].Fields.First(f => f.Name == "Time").Alias);
            Assert.AreEqual("Wind", service.Recordsets[0].Fields.First(f => f.Name == "Wind").Alias);
            Assert.AreEqual("Visibility", service.Recordsets[0].Fields.First(f => f.Name == "Visibility").Alias);
            Assert.AreEqual("DewPoint", service.Recordsets[0].Fields.First(f => f.Name == "DewPoint").Alias);
            Assert.AreEqual("RelativeHumidity", service.Recordsets[0].Fields.First(f => f.Name == "RelativeHumidity").Alias);
            Assert.AreEqual("Pressure", service.Recordsets[0].Fields.First(f => f.Name == "Pressure").Alias);
            Assert.AreEqual("Status", service.Recordsets[0].Fields.First(f => f.Name == "Status").Alias);
        }
        public void WebServiceDisposeExpectedDisposesAndNullsSource()
        {
            var service = new WebService { Source = new WebSource() };

            Assert.IsNotNull(service.Source);
            service.Dispose();
            Assert.IsNull(service.Source);
        }
 public void WebService_ToXml_WhenRequestValuesHaveEnter_ShouldBeRespectedWhenReHydrated()
 {
     //------------Setup for test--------------------------
     var expected = new WebService
     {
         Source = new WebSource
         {
             ResourceID = Guid.NewGuid(),
             ResourceName = "TestWebSource",
         },
         RequestUrl = "pqr",
         RequestMethod = WebRequestMethod.Get,
         RequestHeaders = "Content-Type: text/xml\nBearer: Trusted",
         RequestBody = "abc\nhas an enter\nin it",
         RequestResponse = "xyz",
         JsonPath = "$.somepath"
     };
     //------------Execute Test---------------------------
     var xml = expected.ToXml();
     var actual = new WebService(xml);
     //------------Assert Results-------------------------
     StringAssert.Contains(actual.RequestHeaders, "\n");
     StringAssert.Contains(actual.RequestBody, "\n");
 }
        public void WebServiceToXmlExpectedSerializesProperties()
        {
            var expected = new WebService
            {
                Source = new WebSource
                {
                    ResourceID = Guid.NewGuid(),
                    ResourceName = "TestWebSource",
                },
                RequestUrl = "pqr",
                RequestMethod = WebRequestMethod.Get,
                RequestHeaders = "Content-Type: text/xml",
                RequestBody = "abc",
                RequestResponse = "xyz",
                JsonPath = "$.somepath"
            };

            #region setup method parameters

            expected.Method.Parameters.AddRange(
                new[]
                {
                    new MethodParameter
                    {
                        Name = "Param1",
                        DefaultValue = "123"
                    },
                    new MethodParameter
                    {
                        Name = "Param2",
                        DefaultValue = "456"
                    }
                });

            #endregion

            #region setup rs1

            var rs1 = new Recordset
            {
                Name = "Recordset1()"
            };
            rs1.Fields.AddRange(new[]
            {
                new RecordsetField
                {
                    Name = "Field1",
                    Alias = "Alias1",
                    RecordsetAlias = "RecAlias1()"
                },
                new RecordsetField
                {
                    Name = "Field2",
                    Alias = "Alias2",
                    RecordsetAlias = "RecAlias1()"
                }
            });
            expected.Recordsets.Add(rs1);

            #endregion

            #region setup rs2

            var rs2 = new Recordset
            {
                Name = "Recordset2()"
            };
            rs2.Fields.AddRange(new[]
            {
                new RecordsetField
                {
                    Name = "Field3",
                    Alias = "Alias3"
                },
                new RecordsetField
                {
                    Name = "Field4",
                    Alias = "Alias4"
                }
            });
            expected.Recordsets.Add(rs2);

            #endregion

            var xml = expected.ToXml();

            var actual = new WebService(xml);

            Assert.AreEqual(expected.Source.ResourceType, actual.Source.ResourceType);
            Assert.AreEqual(expected.Source.ResourceID, actual.Source.ResourceID);
            Assert.AreEqual(expected.Source.ResourceName, actual.Source.ResourceName);
            Assert.AreEqual(expected.ResourceType, actual.ResourceType);
            Assert.AreEqual(expected.RequestUrl, actual.RequestUrl);
            Assert.AreEqual(expected.RequestMethod, actual.RequestMethod);
            Assert.AreEqual(expected.RequestHeaders, actual.RequestHeaders);
            Assert.AreEqual(expected.RequestBody, actual.RequestBody);
            Assert.AreEqual(expected.JsonPath, actual.JsonPath);
            Assert.IsNull(actual.RequestResponse);

            foreach(var expectedParameter in expected.Method.Parameters)
            {
                MethodParameter parameter = expectedParameter;
                var actualParameter = actual.Method.Parameters.First(p => p.Name == parameter.Name);
                Assert.AreEqual(expectedParameter.DefaultValue, actualParameter.DefaultValue);
            }

            foreach(var expectedRecordset in expected.Recordsets)
            {
                // expect actual to have removed recordset notation ()...
                Recordset recordset = expectedRecordset;
                var actualRecordset = actual.Recordsets.First(rs => rs.Name == recordset.Name.Replace("()", ""));
                foreach(var expectedField in expectedRecordset.Fields)
                {
                    RecordsetField field = expectedField;
                    var actualField = actualRecordset.Fields.First(f => f.Name == field.Name);
                    Assert.AreEqual(expectedField.Alias, actualField.Alias);
                    // expect actual to have removed recordset notation ()...
                    var expectedRecordsetAlias = string.IsNullOrEmpty(expectedField.RecordsetAlias) ? string.Empty : expectedField.RecordsetAlias.Replace("()", "");
                    Assert.AreEqual(expectedRecordsetAlias, actualField.RecordsetAlias);
                }
            }
        }
        public void WebServicesTestWithInValidArgsExpectedReturnsResponseWithErrorMessage()
        {
            var serviceXml = XmlResource.Fetch("WebService");

            var service = new WebService(serviceXml);

            foreach(var parameter in service.Method.Parameters)
            {
                parameter.Value = parameter.DefaultValue;
            }

            var services = new WebServicesMock();
            var result = services.Test(service.ToString(), Guid.Empty, Guid.Empty);

            Assert.AreEqual("Illegal characters in path.", result.RequestResponse);
            Assert.AreEqual(1, result.Recordsets.Count);
            Assert.IsTrue(result.Recordsets[0].HasErrors);
            Assert.AreEqual("Illegal characters in path.", result.Recordsets[0].ErrorMessage);
        }
Example #20
0
 public static void ExecuteRequest(WebService service, bool throwError, out ErrorResultTO errors)
 {
     ExecuteRequest(service, throwError, out errors, DefaultWebExecute);
 }
 public void WebServiceContructorWithInvalidXmlExpectedDoesNotThrowExceptionAndInitializesProperties()
 {
     var xml = new XElement("root");
     var service = new WebService(xml);
     Assert.AreNotEqual(Guid.Empty, service.ResourceID);
     Assert.IsTrue(service.IsUpgraded);
     Assert.AreEqual(ResourceType.WebService, service.ResourceType);
 }
        // ReSharper disable InconsistentNaming
        public void ServiceExecutionAbstract_ExecuteWithCrazyXML_ShouldMap()
        // ReSharper restore InconsistentNaming
        {
            //init
            
            var mockResourceCatalog = new Mock<ResourceCatalog>(It.IsAny<IEnumerable<DynamicService>>());
            mockResourceCatalog.Setup(c => c.GetResource<WebService>(It.IsAny<Guid>(), It.IsAny<Guid>())).Verifiable();
            const string Xml = "<Service ID=\"489a3611-523c-40ce-a13d-3fc32b857cdc\" Name=\"CEWBSUpdateCommsRequest\" ResourceType=\"WebService\" IsValid=\"false\" ServerVersion=\"0.4.5578.26820\" ServerID=\"1d9aa0ae-4ecd-4c7d-b1d1-30fe5a714600\">" +
                               "<Actions>" +
                               "<Action Name=\"CEWBSUpdateCommsRequest\" Type=\"InvokeWebService\" SourceID=\"6ee209c8-04ca-4da7-a2ae-83822a738c82\" SourceName=\"SRVUpdateCommReq\" ExecuteAction=\"\" SourceMethod=\"\" RequestUrl=\"/api/CommsEngine/UpdateCommunicationRequest?CommunicationRequestID=[[CommunicationRequestID]]&amp;Result=[[Result]]&amp;Reason=[[Reason]]&amp;ScheduledFor=[[ScheduledFor]]\" RequestMethod=\"Get\" JsonPath=\"\">" +
                               "<RequestHeaders><![CDATA[Content-type: application/xml MerchantUserName: User180315 MerchantPassword: 465FDB04-EC2F-421D-9ACF-88274285F84B MerchantPublicKey: 8CE86EE7-A303-4900-90B5-C2DADCC1A931]]></RequestHeaders>" +
                               "<RequestBody><![CDATA[]]></RequestBody>" +
                               "<Inputs>" +                              
                               "</Inputs>" +
                               "<Outputs>" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsException:nil\" Name=\"Exception\" MapsTo=\"Exception\" Value=\"[[Exception]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsMessage:nil\" Name=\"Message\" MapsTo=\"Message\" Value=\"[[Message]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsResponseDate\" Name=\"ResponseDate\" MapsTo=\"ResponseDate\" Value=\"[[ResponseDate]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsResult\" Name=\"Result\" MapsTo=\"Result\" Value=\"[[Result]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsStatusCode\" Name=\"StatusCode\" MapsTo=\"StatusCode\" Value=\"[[StatusCode]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationAdded:nil\" Name=\"Added\" MapsTo=\"Added\" Value=\"[[Added]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToSend:nil\" Name=\"ToSend\" MapsTo=\"ToSend\" Value=\"[[ToSend]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateCommunicationRequestID\" Name=\"UpateCommunicationRequestID\" MapsTo=\"UpateCommunicationRequestID\" Value=\"[[UpateCommunicationRequestID]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateOperationStatus\" Name=\"OperationStatus\" MapsTo=\"OperationStatus\" Value=\"[[OperationStatus]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateReason:nil\" Name=\"UpdateReason\" MapsTo=\"UpdateReason\" Value=\"[[UpdateReason]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateResult\" Name=\"Result\" MapsTo=\"Result\" Value=\"[[Result]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateScheduledFor\" Name=\"ScheduledFor\" MapsTo=\"ScheduledFor\" Value=\"[[ScheduledFor]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToView:nil\" Name=\"View\" MapsTo=\"View\" Value=\"[[View]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "</Outputs>" +
                               "<OutputDescription><![CDATA[<z:anyType xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d1p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.Ouput\" i:type=\"d1p1:OutputDescription\" xmlns:z=\"http://schemas.microsoft.com/2003/10/Serialization/\"><d1p1:DataSourceShapes xmlns:d2p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><d2p1:anyType i:type=\"d1p1:DataSourceShape\"><d1p1:_x003C_Paths_x003E_k__BackingField><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Exception:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Exception:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Exception]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Message:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Message:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Message]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.ResponseDate</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.ResponseDate</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[ResponseDate]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">2015/04/30 02:02:11 PM</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Result</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Result</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Result]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">OK</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.StatusCode</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.StatusCode</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[StatusCode]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Success</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationAdded:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationAdded:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Added]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToSend:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToSend:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[ToSend]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.CommunicationRequestID</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.CommunicationRequestID</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[UpateCommunicationRequestID]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">86d02dff-08ef-e411-a221-0018fefdef3a</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.OperationStatus</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.OperationStatus</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[OperationStatus]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Success</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.Reason:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.Reason:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[UpdateReason]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.Result</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.Result</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Result]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Sent</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.ScheduledFor</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.ScheduledFor</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[ScheduledFor]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">2015-04-30T14:01:01</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToView:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToView:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[View]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType></d1p1:_x003C_Paths_x003E_k__BackingField></d2p1:anyType></d1p1:DataSourceShapes><d1p1:Format>ShapedXML</d1p1:Format></z:anyType>]]></OutputDescription>" +
                               "</Action>" +
                               "</Actions>" +
                               "<TypeOf>InvokeWebService</TypeOf>" +
                               "<DisplayName>CEWBSUpdateCommsRequest</DisplayName>" +
                               "<Category>Communications\\Services\\CEWBSUpdateCommsRequest</Category>" +
                               "<VersionInfo DateTimeStamp=\"2015-04-30T14:06:56.2341245+02:00\" Reason=\"\" User=\"\" VersionNumber=\"16\" ResourceId=\"489a3611-523c-40ce-a13d-3fc32b857cdc\" VersionId=\"63895bba-05d2-414b-a4bb-bd189c793a2d\" />  " +
                               "</Service>";
            var xelement = XElement.Parse(Xml);
            var webService = new WebService(xelement);
            mockResourceCatalog.Setup(c => c.GetResource<WebService>(It.IsAny<Guid>(), It.IsAny<Guid>())).Returns(webService);
            mockResourceCatalog.Setup(c => c.GetResource<WebSource>(It.IsAny<Guid>(), It.IsAny<Guid>())).Verifiable();
            mockResourceCatalog.Setup(c => c.GetResource<WebSource>(It.IsAny<Guid>(), It.IsAny<Guid>())).Returns(new WebSource());
            var webServiceMock = new MockServiceExecutionAbstract<WebService, WebSource>(new DsfDataObject("<DataList></DataList>", Guid.NewGuid()), It.IsAny<bool>());
            webServiceMock.Service = webService;
            webServiceMock.ReturnFromExecute = "<CommsEngineResponseViewModels xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response.CommsEngine\">" +
                                               "<Exception xmlns:d2p1=\"http://schemas.datacontract.org/2004/07/System\" i:nil=\"true\" xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\" />" +
                                               "<Message i:nil=\"true\" xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\" />" +
                                               "<ResponseDate xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\">2015/05/06 02:07:02 PM</ResponseDate>" +
                                               "<Result xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\">OK</Result>" +
                                               "<StatusCode xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\">Success</StatusCode>" +
                                               "<CommsEngineCommunicationAdded i:nil=\"true\" />" +
                                               "<CommsEngineCommunicationToSend i:nil=\"true\" />" +
                                               "<CommsEngineCommunicationToUpdate>" +
                                               "<CommsEngineCommunicationToUpdate>" +
                                               "<CommunicationRequestID>dee2c3d6-e6f3-e411-a221-0018fefdef3a</CommunicationRequestID>" +
                                               "<OperationStatus>Success</OperationStatus>" +
                                               "<Reason i:nil=\"true\" />" +
                                               "<Result>Sent</Result>" +
                                               "<ScheduledFor>2015-05-06T14:08:00</ScheduledFor>" +
                                               "</CommsEngineCommunicationToUpdate>" +
                                               "</CommsEngineCommunicationToUpdate>" +
                                               "<CommsEngineCommunicationToView i:nil=\"true\" />" +
                                               "</CommsEngineResponseViewModels>";
            //exe
            ErrorResultTO errors;
            webServiceMock.MockExecuteImpl(null,out errors);
            Assert.IsFalse(errors.HasErrors(),"Error while parsing crazy xml");

            //assert
        }
 public void WebService_ApplyPath_WhenResponseDataEmpty_NothingHappens()
 {
     //------------Setup for test--------------------------
     var webService = new WebService { RequestResponse = "" };
     //------------Execute Test---------------------------
     webService.ApplyPath();
     //------------Assert Results-------------------------
     Assert.AreEqual("", webService.RequestResponse);
 }
Example #24
0
        public WebService ApplyPath(string args, Guid workspaceId, Guid dataListId)
        {
            var service = new WebService();
            try
            {
                service = JsonConvert.DeserializeObject<WebService>(args);
                service.ApplyPath();
                var oldResult = service.RequestResponse;
                service.RequestResponse = service.JsonPathResult;
                service.Recordsets = FetchRecordset(service, true);
                service.RequestResponse = oldResult;
            }
            catch(Exception ex)
            {
                RaiseError(ex);
                if(service.Recordsets.Count > 0)
                {
                    service.Recordsets[0].HasErrors = true;
                    service.Recordsets[0].ErrorMessage = ex.Message;
                }

                service.JsonPathResult = ex.Message;
            }

            return service;
        }
 public void WebService_ApplyPath_WhenJsonPathEmpty_NothingHappens()
 {
     //------------Setup for test--------------------------
     var webService = new WebService();
     const string expected = "this is the response";
     webService.RequestResponse = expected;
     webService.JsonPath = "";
     //------------Execute Test---------------------------
     webService.ApplyPath();
     //------------Assert Results-------------------------
     Assert.AreEqual(expected, webService.RequestResponse);
 }
Example #26
0
 public static void ExecuteRequest(WebService service, bool throwError, out ErrorResultTO errors, WebExecuteString webExecute)
 {
     var requestHeaders = SetParameters(service.Method.Parameters, service.RequestHeaders);
     var headers = string.IsNullOrEmpty(requestHeaders)
                       ? new string[0]
                       : requestHeaders.Split(new[] { '\n', '\r', ';' }, StringSplitOptions.RemoveEmptyEntries);
     var requestUrl = SetParameters(service.Method.Parameters, service.RequestUrl);
     var requestBody = SetParameters(service.Method.Parameters, service.RequestBody);
     service.RequestResponse = webExecute(service.Source as WebSource, service.RequestMethod, requestUrl, requestBody, throwError, out errors, headers);
     if(!String.IsNullOrEmpty(service.JsonPath))
     {
         service.ApplyPath();
     }
 }
 public void WebService_ApplyPath_ResponseDataNotJsonData_ExceptionThrown()
 {
     //------------Setup for test--------------------------
     const string expected = "blah blah";
     var webService = new WebService { RequestResponse = expected, JsonPath = "some path" };
     //------------Execute Test---------------------------
     webService.ApplyPath();
     //------------Assert Results-------------------------
     Assert.AreEqual(expected, webService.RequestResponse);
 }
        static void VerifyScrub(string requestResponse, IList<IPath> expectedPaths)
        {
            var webService = new WebService { RequestResponse = requestResponse };
            var outputDescription = webService.GetOutputDescription();

            Assert.AreEqual(1, outputDescription.DataSourceShapes.Count);

            foreach(var shape in outputDescription.DataSourceShapes)
            {
                Assert.IsNotNull(shape);
                Assert.AreEqual(expectedPaths.Count, shape.Paths.Count);

                foreach(var actualPath in shape.Paths)
                {
                    var expectedPath = expectedPaths.FirstOrDefault(p => p.ActualPath == actualPath.ActualPath);
                    Assert.IsNotNull(expectedPath);

                    Assert.AreEqual(expectedPath.DisplayPath, actualPath.DisplayPath);
                    Assert.AreEqual(expectedPath.OutputExpression, actualPath.OutputExpression);
                    Assert.IsTrue(actualPath.SampleData.StartsWith(expectedPath.SampleData));
                }
            }
        }
 public void ServiceExecutionAbstract_Execute_ObjectJson_ShouldMapCorrectly()
 {
     //------------Setup for test--------------------------
     var mockResourceCatalog = new Mock<ResourceCatalog>(It.IsAny<IEnumerable<DynamicService>>());
     mockResourceCatalog.Setup(c => c.GetResource<WebService>(It.IsAny<Guid>(), It.IsAny<Guid>())).Verifiable();
     const string Xml = "<Service ID=\"a6c54514-48b5-4c1c-ab48-aac8f692140a\" Name=\"JsonObjectService\" ResourceType=\"WebService\" IsValid=\"false\" ServerVersion=\"0.5.5632.17512\" ServerID=\"51a58300-7e9d-4927-a57b-e5d700b11b55\">" +
                        "<Actions>" +
                        "<Action Name=\"JsonObjectService\" Type=\"InvokeWebService\" SourceID=\"1eaf69f4-e734-46b5-a5ee-5245b971f85e\" SourceName=\"ThreePeaksWebSource\" ExecuteAction=\"\" SourceMethod=\"\" RequestUrl=\"\" RequestMethod=\"Get\" JsonPath=\"\">" +
                        "<RequestHeaders><![CDATA[]]></RequestHeaders>" +
                        "<RequestBody><![CDATA[]]></RequestBody>" +
                        "<Inputs />" +
                        "<Outputs>" +
                        "<Output OriginalName=\"CommsEngineCommunicationToUpdate\" Name=\"CommsEngineCommunicationToUpdate\" MapsTo=\"CommsEngineCommunicationToUpdate\" Value=\"[[CommsEngineCommunicationToUpdate]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"CommsEngineCommunicationAdded\" Name=\"CommsEngineCommunicationAdded\" MapsTo=\"CommsEngineCommunicationAdded\" Value=\"[[CommsEngineCommunicationAdded]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"CommsEngineCommunicationToView\" Name=\"CommsEngineCommunicationToView\" MapsTo=\"CommsEngineCommunicationToView\" Value=\"[[CommsEngineCommunicationToView]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"StatusCode\" Name=\"StatusCode\" MapsTo=\"StatusCode\" Value=\"[[StatusCode]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"Message\" Name=\"Message\" MapsTo=\"Message\" Value=\"[[Message]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"Exception\" Name=\"Exception\" MapsTo=\"Exception\" Value=\"[[Exception]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"Result\" Name=\"Result\" MapsTo=\"Result\" Value=\"[[Result]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"ResponseDate\" Name=\"ResponseDate\" MapsTo=\"ResponseDate\" Value=\"[[ResponseDate]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"CommunicationRequestID\" Name=\"CommunicationRequestID\" MapsTo=\"CommunicationRequestID\" Value=\"[[CommsEngineCommunicationToSend().CommunicationRequestID]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"PolicyNo\" Name=\"PolicyNo\" MapsTo=\"PolicyNo\" Value=\"[[CommsEngineCommunicationToSend().PolicyNo]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"EventType\" Name=\"EventType\" MapsTo=\"EventType\" Value=\"[[CommsEngineCommunicationToSend().EventType]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"EventSource\" Name=\"EventSource\" MapsTo=\"EventSource\" Value=\"[[CommsEngineCommunicationToSend().EventSource]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"MessageContent\" Name=\"MessageContent\" MapsTo=\"MessageContent\" Value=\"[[CommsEngineCommunicationToSend().MessageContent]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"DeliveryAddress\" Name=\"DeliveryAddress\" MapsTo=\"DeliveryAddress\" Value=\"[[CommsEngineCommunicationToSend().DeliveryAddress]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"OriginalAddress\" Name=\"OriginalAddress\" MapsTo=\"OriginalAddress\" Value=\"[[CommsEngineCommunicationToSend().OriginalAddress]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"ScheduledFor\" Name=\"ScheduledFor\" MapsTo=\"ScheduledFor\" Value=\"[[CommsEngineCommunicationToSend().ScheduledFor]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"CommunicationsProfile\" Name=\"CommunicationsProfile\" MapsTo=\"CommunicationsProfile\" Value=\"[[CommsEngineCommunicationToSend().CommunicationsProfile]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"CommunicationType\" Name=\"CommunicationType\" MapsTo=\"CommunicationType\" Value=\"[[CommsEngineCommunicationToSend().CommunicationType]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"Subject\" Name=\"Subject\" MapsTo=\"Subject\" Value=\"[[CommsEngineCommunicationToSend().Subject]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"Attachments\" Name=\"Attachments\" MapsTo=\"Attachments\" Value=\"[[CommsEngineCommunicationToSend().Attachments]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"HTML\" Name=\"HTML\" MapsTo=\"HTML\" Value=\"[[CommsEngineCommunicationToSend().HTML]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"AttemptCount\" Name=\"AttemptCount\" MapsTo=\"AttemptCount\" Value=\"[[CommsEngineCommunicationToSend().AttemptCount]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"Priority\" Name=\"Priority\" MapsTo=\"Priority\" Value=\"[[CommsEngineCommunicationToSend().Priority]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"MetaData\" Name=\"MetaData\" MapsTo=\"MetaData\" Value=\"[[CommsEngineCommunicationToSend().MetaData]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "</Outputs>" +
                        "<OutputDescription><![CDATA[<z:anyType xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d1p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.Ouput\" i:type=\"d1p1:OutputDescription\" xmlns:z=\"http://schemas.microsoft.com/2003/10/Serialization/\"><d1p1:DataSourceShapes xmlns:d2p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><d2p1:anyType i:type=\"d1p1:DataSourceShape\"><d1p1:_x003C_Paths_x003E_k__BackingField><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToUpdate</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToUpdate</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToUpdate]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationAdded</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationAdded</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationAdded]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToView</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToView</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToView]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">StatusCode</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">StatusCode</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[StatusCode]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">1</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Message</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Message</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Message]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Exception</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Exception</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Exception]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Result</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Result</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Result]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">OK</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">ResponseDate</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">ResponseDate</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[ResponseDate]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">2015/06/02 09:58:20 AM</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().CommunicationRequestID</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().CommunicationRequestID</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().CommunicationRequestID]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">60d47fa8-f208-e511-a221-0018fefdef3a</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().PolicyNo</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().PolicyNo</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().PolicyNo]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">AA1001366</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().EventType</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().EventType</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().EventType]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">DebitFailed</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().EventSource</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().EventSource</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().EventSource]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Collections</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().MessageContent</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().MessageContent</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().MessageContent]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Hi there!  Your  debit order didn't go through this month. Please give us a shout on 087 357 6529 so we can make sure we've got your details right. Love__COMMA__ The Unlimited</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().DeliveryAddress</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().DeliveryAddress</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().DeliveryAddress]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">0825688436</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().OriginalAddress</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().OriginalAddress</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().OriginalAddress]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">sample string 10</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().ScheduledFor</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().ScheduledFor</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().ScheduledFor]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">2015/05/27 03:30:02 PM</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().CommunicationsProfile</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().CommunicationsProfile</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().CommunicationsProfile]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">sample string 12</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().CommunicationType</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().CommunicationType</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().CommunicationType]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">SMS</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().Subject</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().Subject</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().Subject]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Default Subject</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().Attachments</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().Attachments</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().Attachments]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().HTML</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().HTML</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().HTML]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().AttemptCount</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().AttemptCount</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().AttemptCount]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().Priority</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().Priority</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().Priority]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">1</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().MetaData</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().MetaData</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().MetaData]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">sample string 15</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType></d1p1:_x003C_Paths_x003E_k__BackingField></d2p1:anyType></d1p1:DataSourceShapes><d1p1:Format>ShapedXML</d1p1:Format></z:anyType>]]></OutputDescription>" +
                        "</Action>" +
                        "</Actions>" +
                        "<TypeOf>InvokeWebService</TypeOf>" +
                        "<DisplayName>JsonObjectService</DisplayName>" +
                        "<Category>JsonObjectService</Category>" +
                        "<VersionInfo DateTimeStamp=\"2015-06-03T10:00:27.8584191+02:00\" Reason=\"Save\" User=\"Unknown\" VersionNumber=\"1\" ResourceId=\"a6c54514-48b5-4c1c-ab48-aac8f692140a\" VersionId=\"7ca42a4e-d08f-40fd-92b5-31bff77394de\" />" +
                        "</Service>";
     var xelement = XElement.Parse(Xml);
     var webService = new WebService(xelement);
     mockResourceCatalog.Setup(c => c.GetResource<WebService>(It.IsAny<Guid>(), It.IsAny<Guid>())).Returns(webService);
     mockResourceCatalog.Setup(c => c.GetResource<WebSource>(It.IsAny<Guid>(), It.IsAny<Guid>())).Verifiable();
     mockResourceCatalog.Setup(c => c.GetResource<WebSource>(It.IsAny<Guid>(), It.IsAny<Guid>())).Returns(new WebSource());
     var webServiceMock = new MockServiceExecutionAbstract<WebService, WebSource>(new DsfDataObject("<DataList></DataList>", Guid.NewGuid()));
     webServiceMock.Service = webService;
     webServiceMock.InstanceOutputDefintions = "<Outputs>" +
                                               "<Output Name=\"CommsEngineCommunicationToUpdate\" MapsTo=\"[[CommsEngineCommunicationToUpdate]]\" Value=\"[[CommsEngineCommunicationToUpdate]]\" />" +
                                               "<Output Name=\"CommsEngineCommunicationAdded\" MapsTo=\"[[CommsEngineCommunicationAdded]]\" Value=\"[[CommsEngineCommunicationAdded]]\" />" +
                                               "<Output Name=\"CommsEngineCommunicationToView\" MapsTo=\"[[CommsEngineCommunicationToView]]\" Value=\"[[CommsEngineCommunicationToView]]\" />" +
                                               "<Output Name=\"StatusCode\" MapsTo=\"[[StatusCode]]\" Value=\"[[StatusCode]]\" />" +
                                               "<Output Name=\"Message\" MapsTo=\"[[Message]]\" Value=\"[[Message]]\" />" +
                                               "<Output Name=\"Exception\" MapsTo=\"[[Exception]]\" Value=\"[[Exception]]\" />" +
                                               "<Output Name=\"Result\" MapsTo=\"[[Result]]\" Value=\"[[Result]]\" />" +
                                               "<Output Name=\"ResponseDate\" MapsTo=\"[[ResponseDate]]\" Value=\"[[ResponseDate]]\" />" +
                                               "<Output Name=\"CommunicationRequestID\" MapsTo=\"[[CommunicationRequestID]]\" Value=\"[[CommsEngineCommunicationToSend().CommunicationRequestID]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"PolicyNo\" MapsTo=\"[[PolicyNo]]\" Value=\"[[CommsEngineCommunicationToSend().PolicyNo]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"EventType\" MapsTo=\"[[EventType]]\" Value=\"[[CommsEngineCommunicationToSend().EventType]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"EventSource\" MapsTo=\"[[EventSource]]\" Value=\"[[CommsEngineCommunicationToSend().EventSource]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"MessageContent\" MapsTo=\"[[MessageContent]]\" Value=\"[[CommsEngineCommunicationToSend().MessageContent]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"DeliveryAddress\" MapsTo=\"[[DeliveryAddress]]\" Value=\"[[CommsEngineCommunicationToSend().DeliveryAddress]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"OriginalAddress\" MapsTo=\"[[OriginalAddress]]\" Value=\"[[CommsEngineCommunicationToSend().OriginalAddress]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"ScheduledFor\" MapsTo=\"[[ScheduledFor]]\" Value=\"[[CommsEngineCommunicationToSend().ScheduledFor]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"CommunicationsProfile\" MapsTo=\"[[CommunicationsProfile]]\" Value=\"[[CommsEngineCommunicationToSend().CommunicationsProfile]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"CommunicationType\" MapsTo=\"[[CommunicationType]]\" Value=\"[[CommsEngineCommunicationToSend().CommunicationType]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"Subject\" MapsTo=\"[[Subject]]\" Value=\"[[CommsEngineCommunicationToSend().Subject]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"Attachments\" MapsTo=\"[[Attachments]]\" Value=\"[[CommsEngineCommunicationToSend().Attachments]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"HTML\" MapsTo=\"[[HTML]]\" Value=\"[[CommsEngineCommunicationToSend().HTML]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"AttemptCount\" MapsTo=\"[[AttemptCount]]\" Value=\"[[CommsEngineCommunicationToSend().AttemptCount]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"Priority\" MapsTo=\"[[Priority]]\" Value=\"[[CommsEngineCommunicationToSend().Priority]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"MetaData\" MapsTo=\"[[MetaData]]\" Value=\"[[CommsEngineCommunicationToSend().MetaData]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "</Outputs>";
     webServiceMock.ReturnFromExecute = "{\"CommsEngineCommunicationToUpdate\":null,\"CommsEngineCommunicationToSend\":[{\"CommunicationRequestID\":\"60d47fa8-f208-e511-a221-0018fefdef3a\",\"PolicyNo\":\"AA1001366\",\"EventType\":\"DebitFailed\",\"EventSource\":\"Collections\",\"MessageContent\":\"Hi there!  Your  debit order didn't go through this month. Please give us a shout on 087 357 6529 so we can make sure we've got your details right. Love, The Unlimited\",\"DeliveryAddress\":\"0825688436\",\"OriginalAddress\":\"sample string 10\",\"ScheduledFor\":\"2015-05-27T15:30:02\",\"CommunicationsProfile\":\"sample string 12\",\"CommunicationType\":\"SMS\",\"Subject\":\"Default Subject\",\"Attachments\":\"\",\"HTML\":null,\"AttemptCount\":null,\"Priority\":1,\"MetaData\":\"sample string 15\"}],\"CommsEngineCommunicationAdded\":null,\"CommsEngineCommunicationToView\":null,\"StatusCode\":1,\"Message\":null,\"Exception\":null,\"Result\":\"OK\",\"ResponseDate\":\"2015/06/02 09:58:20 AM\"}";
     //------------Execute Test---------------------------
     ErrorResultTO errors;
     webServiceMock.MockExecuteImpl(out errors);
     //------------Assert Results-------------------------
     Assert.IsFalse(errors.HasErrors(), "Error while parsing object json");
     var warewolfEvalResult = webServiceMock.DataObj.Environment.Eval("[[CommsEngineCommunicationToSend().MessageContent]]",0) as WarewolfDataEvaluationCommon.WarewolfEvalResult.WarewolfAtomListresult;
     Assert.IsNotNull(warewolfEvalResult);
     var actual = warewolfEvalResult.Item[0].ToString();
     Assert.AreEqual("Hi there!  Your  debit order didn't go through this month. Please give us a shout on 087 357 6529 so we can make sure we've got your details right. Love, The Unlimited",actual);
 }