Author Message
FrankGuthrie

Joined: Apr 25, 2005
Messages: 30
Offline
OD Version 7.2.3.0803

I am attempting to populate a complex OD variable with the return JSON. Only the first variable gets populated, nothing else. Please see the attached screenshot. Here is a snippet of the tomcat log along with the JSON that is being returned:

16/11/2021 08:07:03:973 DEBUG - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : Web Service Request -> https://www.mockachino.com/6301dfd0-101f-4d/api/orders?PhoneNumber=8583802487
16/11/2021 08:07:04:410 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : variable reference is simple true
16/11/2021 08:07:04:410 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : return data is a collection false
16/11/2021 08:07:04:410 DEBUG - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : Storing [2] to: RESTOutput:ID
16/11/2021 08:07:04:410 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : variable reference is simple true
16/11/2021 08:07:04:410 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : return data is a collection false
16/11/2021 08:07:04:426 DEBUG - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : Storing [] to: RESTOutput:AcctNumber
16/11/2021 08:07:04:426 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : variable reference is simple true
16/11/2021 08:07:04:426 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : return data is a collection false
16/11/2021 08:07:04:426 DEBUG - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : Storing [] to: RESTOutput:PhoneNumber
16/11/2021 08:07:04:426 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : variable reference is simple true
16/11/2021 08:07:04:426 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : return data is a collection false
16/11/2021 08:07:04:426 DEBUG - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : Storing [] to: RESTOutput:OrderNumber
16/11/2021 08:07:04:426 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : variable reference is simple true
16/11/2021 08:07:04:426 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : return data is a collection false
16/11/2021 08:07:04:426 DEBUG - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : Storing [] to: RESTOutput:ClockType
16/11/2021 08:07:04:426 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : variable reference is simple true
16/11/2021 08:07:04:426 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : return data is a collection false
16/11/2021 08:07:04:426 DEBUG - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : Storing [] to: RESTOutput:Status
16/11/2021 08:07:04:426 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : variable reference is simple true
16/11/2021 08:07:04:426 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : return data is a collection false
16/11/2021 08:07:04:426 DEBUG - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : Storing [] to: RESTOutput:DeliveryDate
16/11/2021 08:07:04:426 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : variable reference is simple true
16/11/2021 08:07:04:426 INFO - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : return data is a collection false
16/11/2021 08:07:04:442 DEBUG - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : Storing [] to: RESTOutput:Notes
16/11/2021 08:07:04:442 DEBUG - 88DB408C7B713EA92B0E52E9D9FDF6FC:/RESTExample : Web Service Reply <- {"ID":2,"AcctNumber":123456,"PhoneNumber":"8583802487","OrderNumber":456932,"ClockType":"Wall Clock","Status":"Shipped","DeliveryDate":"2020-11-28","Notes":"no"}

You can see that OD stores the first variable, but does not store anything else ... why? How do I get the complex variable filled?

Thank you.

[Thumb - OD JSON.jpg]
Filename OD JSON.jpg [Disk] Download
Description OD Screenshot of JSON connector
Filesize 141 Kbytes
Downloaded: 68 time(s)

massimo__croci

Joined: Jan 31, 2020
Messages: 107
Offline
Hi. I see you are using OD 7.x, take a look at

https://www.devconnectprogram.com/forums/posts/list/18528.page

https://www.devconnectprogram.com/forums/posts/list/22397.page

https://www.devconnectprogram.com/forums/posts/list/24500.page#p162747
FrankGuthrie

Joined: Apr 25, 2005
Messages: 30
Offline
Thanks for the reply. I found this link most interesting: https://www.devconnectprogram.com/forums/posts/list/22397.page

Based on what I found in that link, I tested with OD 8.1 and AEP 8.1 ... same issue. It looks like the work around is build Java code.

Why has this not been fixed? It looks like this has been an OD bug for several versions back.

Thanks

FrankGuthrie

Joined: Apr 25, 2005
Messages: 30
Offline
I did not see this, but it turns out there is another way to process JSON strings. Just use the JSON PDC built into OD. It works great. This will be our preferred method for parsing JSON.

I am still wondering though why Avaya has not fixed the JSON web connector return string issue though?

Thanks
massimo__croci

Joined: Jan 31, 2020
Messages: 107
Offline
Hi. There is a sample app using the JSON PDC for parsing on the last link of the previous post:

https://www.devconnectprogram.com/forums/posts/list/24500.page#p162747

Here is some info (section 'New Feature Notes' on page 2):

https://www.devconnectprogram.com/fileMedia/download/c716f8d7-7ee3-4e99-bc0d-76c1fa855a1a
Go to:   
Mobile view