The out of box connector rule throws an JsonMappingException
Can not instantiate value of type [map type; class java.util.LinkedHashMap, [simple type, class java.lang.Object] -> [simple type, class java.lang.Object]]
from String value ('Equipment ERT1231 successfully removed'); no single-String constructor/factory method
I tried changing the property type of the property mentioned in the Response to PageList, Page, String, Java Object, Java object List.... but all threw different type of exception. Please can you throw some light - if there is any limitation with Rest JSON etc..
Is there any solution you could suggest? thanks very much for your help.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
To be clear - are you saying the endpoint is returning exactly the following response as a result of your HTTP POST request:
Equipment MT1421TPK481 successfully removed
If so: this isn't valid JSON - it is just a String; so cannot be mapped as JSON.
Some endpoint respond in different ways (say provide XML, JSON, etc) to different clients (usually based on the incoming 'User-Agent' HTTP header - or 'Accept' header of the request).
Do you have another client (say a Python + 'Requests' Script or something or SOAPUI?) that you can cross-check with ? Are you able to get JSON back from your endpoint ? (if so: you might have to trace the HTTP calls from the working example and your PRPC example to look for differences).
If your endpoint really doesn't return JSON : consider using a CONNECT-HTTP rule here ; where you can get the entire Response Body more easily. (Possibly the REST Connector lets you do this as well : but I'm not sure).
Posted: 5 years ago
Posted: 24 May 2017 11:20 EDT
Mukul Rathod (mrathod_gcs)
Sr. Software Solutions Engineer