Hi,

Try the following:



"questionnaireId":[123],



Or



"questionnaireId":["123"],



The error is saying it is expecting an ArrayList which is represented by "[]".



----------------------------------------------



Kind Regards,



Carl Wilson





From: ARSList <arslist-boun...@arslist.org> On Behalf Of Maheshwari Lakshmanan
Sent: 16 August 2018 20:54
To: arslist@arslist.org
Subject: Sending answers to request via SB API



Hi,



We are on DWPA 1802 and I'm trying to created a request via Service Broker REST 
API using POSTMAN.

I got a request ID back and it appears that I'm supposed to send the answers 
now before the request can be "submitted". So I used the endpoint 
"services/{serviceId}/questionnaire/answers" and filled up questionIds and 
answers based on a previous GET response. But this results in this error:



Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token 
at [Source: 
org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@6f58d5eb
 
<mailto:org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@6f58d5eb>
 ; line: 3, column: 11] (through reference chain: 
com.bmc.myservice.conditionalquestions.service.QuestionAnswer["answers"])



This is the format I'm posting:

{"questionnaireId":"123",

"questionId":"6ddb9b15-ac0a-4ea9-6bde-f06501bc83cb",

"answers":"PreconfigAns1",

"questionId":"ff1063b0-d2da-6e44-a682-5f6bcad2c8e2",

"answers":"PreconfigAns2",

"questionId":"7998d1bd-2cf5-ccf0-8de5-476987c83b13",

"answers":"blah",

"serviceRequestId":"2156"}



Could you please suggest how to resolve this?

The first 2 questions are dependent dropdowns if that's relevant.



Regards,

Maheshwari L







---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
-- 
ARSList mailing list
ARSList@arslist.org
https://mailman.rrr.se/cgi/listinfo/arslist

Reply via email to