Hi Community,
we have the following problem, when we make a data load through the consumption of a "REST - WebService" We would like to know how we could fix the "parse" error so that the execution does not fall ?. This happens when reading a JSON from the WebService.
Newtonsoft.Json.JsonException: Unexpected character while parsing path:
at Newtonsoft.Json.Linq.JsonPath.JPath.ParseMain()
at Newtonsoft.Json.Linq.JToken.SelectToken(String path, Boolean errorWhenNoMatch)
at Terrasoft.Services.Runtime.JsonResponseBodyParser.FillServiceParameterValues(IEnumerable`1 parameters, JToken responseToken, Dictionary`2 parameterValues)
at Terrasoft.Services.Runtime.JsonResponseBodyParser.FillComplexArray(ServiceParameter parameter, JArray jsonArray)
at Terrasoft.Services.Runtime.JsonResponseBodyParser.FillArrayValues(JToken token, ServiceParameter parameter, Type valueType)
at Terrasoft.Services.Runtime.JsonResponseBodyParser.FillServiceParameterValues(IEnumerable`1 parameters, JToken responseToken, Dictionary`2 parameterValues)
at Terrasoft.Services.Runtime.JsonResponseBodyParser.Parse(String body, Dictionary`2 dataAdapters)
at Terrasoft.Services.Runtime.ServiceClientResponse.FillInBodyParameters(Dictionary`2 parameterValues)
at Terrasoft.Services.Runtime.ServiceClientResponse.ParseResponse()
at Terrasoft.Services.Runtime.ServiceClientResponse.get_ParameterValues()
at Terrasoft.Services.WebServiceUserTaskImplementation.FillResponseParameters(IServiceClientResponse response, ProcessWebService userTask, IProcessParametersMetaInfo schema)
at Terrasoft.Services.WebServiceUserTaskImplementation.Execute(ProcessWebService userTask, ProcessExecutingContext context)
at Terrasoft.Core.Process.ProcessActivity.Execute(ProcessExecutingContext context)
Like
Hello,
Basically, the error means that system receives an unexpected json object from web service.
If you use business process element "call web service" to make requests to external web service you should check web service settings.
In case you make a request to a web service via script task i.e. c# code, you should check your code for incorrect casts.
Also you can simply catch requests and responses from web services via fiddler. With fiddler you are able to view headers, body and other request parameters.
Best regards,
Alex