Question

System.Exception: Unable to deserialize value Int64 to SmartobjectName.

  • 12 February 2024
  • 3 replies
  • 59 views

Userlevel 1
Badge +1

After successfully adding a Web Service to the End Points web service and generating SmartObjects.

anytime I try to run the Deserialize method I get an error "System.Exception: Unable to deserialize value Int64 to SmartObjectName. at SourceCode.SmartObjects.Services.Endpoints.Common.Extensions.TypeExtensions.”

 

 

this is the screenshot of error from Service Instance debug.

 

 

I am using the same value with SOAPUI and getting a valid response from the API.

 

When I entered this JSON format, I get No error but there’s No Output response.

{"$type":"body, Get_Applicant_Info, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","employeeId":"**********"}

 

the idea of this API I need to send employeeId and get all other employee information.

 


3 replies

Badge

What type of data is employeeId?  Is it maybe expecting it to be a number when it should be a string/text?

Userlevel 1
Badge +1

What type of data is employeeId?  Is it maybe expecting it to be a number when it should be a string/text?

Thanks for your replay!

the employeeId has string datatype.

 

In addition, I tried to use “Deserialize Typed Array“ method from “ApplicanInfo” smartobject there’s No system error, but no response neither.

 

Badge

It may help to turn SmartObject logging https://help.nintex.com/en-us/k2five/icg/5.5/Content/configure/SmOLogging.htm

To try to get a better view on what’s going on.  It may be that the service is returning something like a 400 or 404 and that’s why it can’t deserialize it.  In the service instance, there may be a setting for showing errors.

 

If that still does not work, you may need to look at the request using Fiddler, but this approach is bit more involved - 

 

Reply