Re: [Dev] ESB Enrich Mediator Issue with JSON array

2016-05-26 Thread Godwin Shrimal
Hi Shafreen,

Solve the issue by copying the payload using following. But I think there
is a issue in the JSON Builder as i discussed you.




Thanks Vijitha and Jagath for helping me to sort out this issue.


Thanks
Godwin



On Tue, May 24, 2016 at 6:56 AM, Shafreen Anfar  wrote:

> Hi Godwin,
>
> In that case, we have a problem. So usually what we do is adding the below
> xml instruction just before the element that has to be represented as an
> array. For instance let's say you have an element name foo and want to
> represent that as an array. You can do the following. For more info see [1].
>
> 
> 
> 
> 
>
> [1] https://docs.wso2.com/display/ESB480/JSON+Support
> 
>
>
> On Tue, May 24, 2016 at 5:17 PM, Godwin Shrimal  wrote:
>
>> Hi Shafreen,
>>
>> Yes. This is JSON array.
>>
>>
>> Thanks
>> Godwin
>>
>>
>> On Tue, May 24, 2016 at 6:22 AM, Shafreen Anfar 
>> wrote:
>>
>>> Hi Godwin,
>>>
>>> On Mon, May 23, 2016 at 9:05 PM, Godwin Shrimal  wrote:
>>>
 Hi All,

 I used Enrich Mediator to copy the original payload as follows.

 

 

 

 

 Incoming JSON payload has multi-value attribute, But when multi-value
 attribute has only one value, Enrich mediator convert the JSON payload it
 as a single value attribute. Is this a known issue or do we have any work
 around for this ?

>>>
>>> When you say multi-value attribute do you mean json arrays ?
>>>
>>>


 Thanks
 Godwin



 --
 *Godwin Amila Shrimal*
 Senior Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: *+94772264165*
 linkedin: *http://lnkd.in/KUum6D *
 twitter: https://twitter.com/godwinamila

>>>
>>>
>>>
>>> --
>>> Regards,
>>> *Shafreen*
>>> Software Engineer
>>> WSO2 Inc
>>> Mobile : 077-556-395-1
>>>
>>
>>
>>
>> --
>> *Godwin Amila Shrimal*
>> Senior Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94772264165*
>> linkedin: *http://lnkd.in/KUum6D *
>> twitter: https://twitter.com/godwinamila
>>
>
>
>
> --
> Regards,
> *Shafreen*
> Software Engineer
> WSO2 Inc
> Mobile : 077-556-395-1
>



-- 
*Godwin Amila Shrimal*
Senior Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *http://lnkd.in/KUum6D *
twitter: https://twitter.com/godwinamila
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] ESB Enrich Mediator Issue with JSON array

2016-05-24 Thread Shafreen Anfar
Hi Godwin,

In that case, we have a problem. So usually what we do is adding the below
xml instruction just before the element that has to be represented as an
array. For instance let's say you have an element name foo and want to
represent that as an array. You can do the following. For more info see [1].






[1] https://docs.wso2.com/display/ESB480/JSON+Support



On Tue, May 24, 2016 at 5:17 PM, Godwin Shrimal  wrote:

> Hi Shafreen,
>
> Yes. This is JSON array.
>
>
> Thanks
> Godwin
>
>
> On Tue, May 24, 2016 at 6:22 AM, Shafreen Anfar  wrote:
>
>> Hi Godwin,
>>
>> On Mon, May 23, 2016 at 9:05 PM, Godwin Shrimal  wrote:
>>
>>> Hi All,
>>>
>>> I used Enrich Mediator to copy the original payload as follows.
>>>
>>> 
>>>
>>> 
>>>
>>> 
>>>
>>> 
>>>
>>> Incoming JSON payload has multi-value attribute, But when multi-value
>>> attribute has only one value, Enrich mediator convert the JSON payload it
>>> as a single value attribute. Is this a known issue or do we have any work
>>> around for this ?
>>>
>>
>> When you say multi-value attribute do you mean json arrays ?
>>
>>
>>>
>>>
>>> Thanks
>>> Godwin
>>>
>>>
>>>
>>> --
>>> *Godwin Amila Shrimal*
>>> Senior Software Engineer
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: *+94772264165*
>>> linkedin: *http://lnkd.in/KUum6D *
>>> twitter: https://twitter.com/godwinamila
>>>
>>
>>
>>
>> --
>> Regards,
>> *Shafreen*
>> Software Engineer
>> WSO2 Inc
>> Mobile : 077-556-395-1
>>
>
>
>
> --
> *Godwin Amila Shrimal*
> Senior Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94772264165*
> linkedin: *http://lnkd.in/KUum6D *
> twitter: https://twitter.com/godwinamila
>



-- 
Regards,
*Shafreen*
Software Engineer
WSO2 Inc
Mobile : 077-556-395-1
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] ESB Enrich Mediator Issue with JSON array

2016-05-24 Thread Godwin Shrimal
Hi Shafreen,

Yes. This is JSON array.


Thanks
Godwin


On Tue, May 24, 2016 at 6:22 AM, Shafreen Anfar  wrote:

> Hi Godwin,
>
> On Mon, May 23, 2016 at 9:05 PM, Godwin Shrimal  wrote:
>
>> Hi All,
>>
>> I used Enrich Mediator to copy the original payload as follows.
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> Incoming JSON payload has multi-value attribute, But when multi-value
>> attribute has only one value, Enrich mediator convert the JSON payload it
>> as a single value attribute. Is this a known issue or do we have any work
>> around for this ?
>>
>
> When you say multi-value attribute do you mean json arrays ?
>
>
>>
>>
>> Thanks
>> Godwin
>>
>>
>>
>> --
>> *Godwin Amila Shrimal*
>> Senior Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94772264165*
>> linkedin: *http://lnkd.in/KUum6D *
>> twitter: https://twitter.com/godwinamila
>>
>
>
>
> --
> Regards,
> *Shafreen*
> Software Engineer
> WSO2 Inc
> Mobile : 077-556-395-1
>



-- 
*Godwin Amila Shrimal*
Senior Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *http://lnkd.in/KUum6D *
twitter: https://twitter.com/godwinamila
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] ESB Enrich Mediator Issue with JSON array

2016-05-24 Thread Shafreen Anfar
Hi Godwin,

On Mon, May 23, 2016 at 9:05 PM, Godwin Shrimal  wrote:

> Hi All,
>
> I used Enrich Mediator to copy the original payload as follows.
>
> 
>
> 
>
> 
>
> 
>
> Incoming JSON payload has multi-value attribute, But when multi-value
> attribute has only one value, Enrich mediator convert the JSON payload it
> as a single value attribute. Is this a known issue or do we have any work
> around for this ?
>

When you say multi-value attribute do you mean json arrays ?


>
>
> Thanks
> Godwin
>
>
>
> --
> *Godwin Amila Shrimal*
> Senior Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94772264165*
> linkedin: *http://lnkd.in/KUum6D *
> twitter: https://twitter.com/godwinamila
>



-- 
Regards,
*Shafreen*
Software Engineer
WSO2 Inc
Mobile : 077-556-395-1
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] ESB Enrich Mediator Issue with JSON array

2016-05-23 Thread Godwin Shrimal
Hi All,

I used Enrich Mediator to copy the original payload as follows.









Incoming JSON payload has multi-value attribute, But when multi-value
attribute has only one value, Enrich mediator convert the JSON payload it
as a single value attribute. Is this a known issue or do we have any work
around for this ?


Thanks
Godwin



-- 
*Godwin Amila Shrimal*
Senior Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *http://lnkd.in/KUum6D *
twitter: https://twitter.com/godwinamila
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev