Unable to Deserialize Value

  • 17 July 2017
  • 3 replies
  • 146 views

Badge +5

After successfully adding a Web Service to the End Points web service and generating SmartObjects, anytime I try to run the service I get an error "Unable to Desrialized Value SmartobjectName". 

 

I have tested this Service and it works.

 

K2 is expecing a single string a input parameter so I paste the entire XML as the parameter but always get the same error. Methods exposed are Read and Read to Serialized item

 

Could it be the Header we're using?

 

If I use the methods exposed in Object Types I find Serialize and Deserialize methods but they just give the same error "Unable to Desrialized Value SmartobjectName"

 

Assistance required.

 

Thanks. 


3 replies

Badge +9

Hi Latte,


 


Would you mind perhaps addidng some screenshots of the execution?


In the ServiceInstance, is there a debug property? If so can you switch it to TRUE and try again, this should give a full error message


 


-Jean

Badge +5

Hi, 

 

Thanks for the reply. 

 

The error after debugging is "Unexpected character encountered while parsing value: <. Path '', line 0, position 0". We are using the same value with SOAPUI and getting a valid response from the API. 

 

Sample of the data sent is:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:scat="http://scats.mann.com/service/scatSAccService">
<soapenv:Header/>
<soapenv:Body>
<scat:CREATE_FSFS_REQ>
<scat:scatS_HEADER>

</scat:scatS_HEADER>
<scat:scatS_BODY xmlns="http://scats.mann.com/service/scatSAccService">
<scat:Cust-Account-Full>

</scat:Cust-Account-Full>
</scat:scatS_BODY>
</scat:CREATE_FSFS_REQ>
</soapenv:Body>
</soapenv:Envelope>

 

See screenshot attached. 




You are passing XML data from a SOAP messge directly to the Deserialize call?  You need to pass a JSON string to Deserialize.

 

If you call the web service via the object's Read method, you should receive a properly formatted JSON string which may then be sent to the Deserialize metod.

Reply