Hi,
I'm using Jira automation with Incoming Webhook as trigger. I'm pretty sure the incoming webhook comes in XML format, and I'm noticing I'm not able to access the webhook data using smart values. Is it because the webhook data can only be accessed using dot notation if its a Json object? I believe I read this somewhere and wanted to make sure this is the case. If so, how can I handle the XML data to be posted on Jira issue fields?
Cheers,
That feature idea is in the backlog: https://codebarrel.atlassian.net/browse/AUT-193
Until that is implemented, I believe you would need to rely upon the string functions, including regular expressions, to get your data.
Best regards,
Bill
Hi Laura, Bill,
I am exactly at this point.
I am using a A4J webhook request to make a SOAP call. (Essentially, SOAP is just a webrequest over HTTP with specific headers).
The webrequest to a SOAP endpoint is successful, I see the response when I test validate it.
But I am unable to retrieve results from it.
As the above thread mentions, {{webhookData}} and parsing it is only supported for JSON response payloads.
But the data is there, how do I use string functions or anything else to retrieve it?
I am ok to use scriptrunner or anything else
using script runner and any of the below code does not give me any result -
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First thing: I recommend creating a new question for this. Otherwise only the people following this old thread will see it. When you do that, please post images of your complete rule, the audit log details, explain what is not working as expected, and link back to this thread. Thanks!
Back to your question...
The response from a rule's web request is a JSON, text string. That can be processed using text functions and iterators. When you need to do more, you can split apart text values and then use conversions, such as asNumber, toDate, etc.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
Thank you so much for your response.
I will create a new ticket and hope that you can take a look. (I see that you are close to this subject)
Regarding your answer above,
There is one change in my case, the response from my rule's web request is an XML, text string, and not JSON. This is because I am calling a legacy SOAP web service. This part is working for me.
I am unable to parse the XML/Text response
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Vijay. I believe you can still use the text functions to parse the message as it is composed of text, even though the specific format is XML.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.