Hi Malaka,

My initial payload is as follows:

<payloadFactory media-type="xml">
        <format>
                <jsonObject xmlns="">
                        <name>Janaka</name>
                        <description>Desc</description>
                        <status>open</status>
                        <leadUser>A</leadUser>
                        <currency>LKR</currency>
                        <cust>114520</cust>
                        <?xml-multiple?><tags></tags>
                </jsonObject>
                                
        </format>
        <args />
</payloadFactory>

In script I'm adding some additional parameters (value and tags.tags should
be send as array even if there are only one) to above payload as:

**

This will work properly if user send tags in request. But my problem is if
user doesn't send tags parameter "tags" element will remove from payload and
<?xml-multiple?> is applying to value element and it will send as array
which back end will not accept. I have two options,
[1]. Remove <?xml-multiple?> from payload if user doesn't send any tags
[2]. Add PIs in Script mediator  other than in payloadFactory.

What is your idea to solve this problem?

Regards,
Janaka 



--
View this message in context: 
http://wso2-oxygen-tank.10903.n7.nabble.com/ESB-Problems-sending-numeric-keys-in-JSON-Payloads-tp99789p101325.html
Sent from the WSO2 Development mailing list archive at Nabble.com.
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to