Re: Sending answers to request via SB API

2018-08-17 Thread Maheshwari Lakshmanan
Thanks Carl.
Yes this worked for me:

{
"questionnaireId": "123",
"questionId":"6ddb9b15-ac0a-4ea9-6bde-f06501bc83cb",
"answers": [
"Server Information Only"
   ],
"serviceRequestId":"2156"
},
{
"questionnaireId": "123",
"questionId":"ff1063b0-d2da-6e44-a682-5f6bcad2c8e2",
"answers": [
"Full Removal"
   ],
"serviceRequestId":"2156"
},

etc


Then I got stuck at POSTing answers to a request(order?)'s question & its
dependencies; rest of the answers went through.
So effectively, I don't have a REQ ID back yet.
There's some server maintenance going on so I'll check once the app's back
up.

Regards,
Maheshwari L

On Fri, Aug 17, 2018 at 12:44 PM, Carl Wilson  wrote:

> 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  *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; 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
>
>
>
>
> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=emailclient>
>  Virus-free.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=emailclient>
> <#m_8209575589874623815_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> --
> ARSList mailing list
> ARSList@arslist.org
> https://mailman.rrr.se/cgi/listinfo/arslist
>
>
-- 
ARSList mailing list
ARSList@arslist.org
https://mailman.rrr.se/cgi/listinfo/arslist


RE: Sending answers to request via SB API

2018-08-17 Thread Carl Wilson
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  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


Sending answers to request via SB API

2018-08-16 Thread Maheshwari Lakshmanan
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;
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
-- 
ARSList mailing list
ARSList@arslist.org
https://mailman.rrr.se/cgi/listinfo/arslist