H.Holloway | 2022-11-20 23:06:13 UTC | #1
Hello,
I am using the Genesys SOAP Adapter which returns a value containing xml.
{ "ValidateAgreementResponse.ValidateAgreementResult": "<?xml version=\"1.0\" encoding=\"utf-8\"?><Agreement><Result>False</Result><AmountToPay>0.00</AmountToPay></Agreement>", "status": 200 } Screenshot:
How do I get the AmountToPay 0.00 as an output in the translation map? I am strugglingt to even get the entire value.
I have configured the following output schema
{ "title": "response", "type": "object", "properties": { "result": { "type": "string" } }, "additionalProperties": true }
and I have tried to get the response with the following
{ "translationMap": { "result": "$.ValidateAgreementResponse.ValidateAgreementResult" }, "translationMapDefaults": {}, "successTemplate": "{ \"result\": ${result}" }
I have met this error:
{ "message": "Transform failed to process result using 'successTemplate' template due to error:'Unexpected end-of-input: expected close marker for Object (start marker at [Source: (String)\"{ \"result\": \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?><Agreement><Result>False</Result><AmountToPay>0.00</AmountToPay></Agreement>\"\"; line: 1, column: 1])\n at [Source: (String)\"{ \"result\": \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?><Agreement><Result>False</Result><AmountToPay>0.00</AmountToPay></Agreement>\"\"; line: 1, column: 133]'\n Template:'{ \"result\": ${result}'.", "code": "bad.request", "status": 400, "messageParams": {}, "contextId": "cc1338c3-b179-4945-bed0-9f59be0a4725", "details": [ { "errorCode": "ACTION.PROCESSING" } ], "errors": [] }
Thank you.
Jason_Mathison | 2022-12-01 03:38:34 UTC | #2
Take a look at this other thread which is also cutting something out of XML: https://developer.genesys.cloud/forum/t/data-action-response-assistance/17382/7
--Jason
H.Holloway | 2022-12-04 11:44:56 UTC | #3
Hi Jason,
Thank you, that was my other post :)
Kind Regards, H
system | 2023-01-04 11:45:38 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 17291