06-06-2018 04:41 PM - edited 03-14-2019 06:13 PM
Good afternoon Cisco Voice Experts and cisco community members.
I'm new in cisco uccx scripting, so my problem is probably a little thing that I don't see very quickly in this moment.
Well, i'm trying to make a rest call and I have success, to see that example i put this image:
As you can see, the server is answer me with a bunch of parameters. At this point my difficulties appear, when I tried to take the information that I need, I don't know how to do it. Because this server is answer me in a Json Format. My Cisco UCCX version is 10.6, 'cause that reason it doesn't support natively Json answers.
This script is a test before a local service that we're going to develop, so I do this to know how to do it with an open alternative.
So, my questions are the following:
1.- ¿Do I need to develop a Java procedure for take the information that I need? For this test, I need to call the city name, only for develop a quick test.
2.- ¿Is better to develop a SOAP request or have a REST API for this Cisco UCCX Version?
Thanks for your help and atention.
06-07-2018 09:24 AM
06-07-2018 09:40 AM
Hi Anthony, thanks for your response and attention.
In this case, we're using Cisco UCCX v10.6. I read in some posts the possibility of do this more easy in cisco UCCX 11.6 version... However, this is not the case.
Could you give me some advice how to parse or take that information with java or regular expressions? I'm not good with java, but i'll do an effort with regular expressions.
If it's useful, I put a copy of my script in this answer.
Thanks in advance for your help.
06-08-2018 08:23 AM
06-18-2018 06:24 PM
Good Night Anthony, aplogize me my late answer... First, I want to thank you for youyr help and attention.
I was trying to do what you recommend me and i have a good result...
But now, I have this situation:
Since my last comment in this post, i changed my script for my final project:
I'm able to send a POST to by the Rest Call to my web service with json. My Rest Call POST is the following:
When my variable "String_Body" is the following sentence, everything is OK: u"{\"peticion\":{\"identidad\": \" 08011985xxxxx \",\"tipoconsulta\":\"M\",\"tarjeta\":\"4444555566667777\"}}"
But I can´t include in my variable "String_Body" the variables "String_CreditCard" and "String_IDNo". For send any value for that fileds in my WebService...
My questions are: ¿How I can include that variables (String_CreditCard and String_IDNo) into my variable String_Body that able me to any value? ¿Am I doing a bad use for the correct syntax to replace the value of those variables into my String_Body variable?
Thanks for your help...
07-06-2018 06:25 AM
Good to know this. regarding JSON, I was facing some issue. so I used JSON Formatter to resolve that.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide