Hi Malaka, 

I have already tried this solution and this will work only if we declared
<?xml-multiple?> in payloadFactory mediator. But if i set <?xml-multiple?>
in script mediator it will ignore. Following is my complete config:

<payloadFactory media-type="xml">
                        <format>
                                <jsonObject xmlns=""><?xml-multiple?>
                                        <tags>
                                                
<jsonElement>TestTag</jsonElement>
                                        </tags>
                                        <name>Janaka</name>
                                </jsonObject>
                                
                        </format>
                        <args />
                </payloadFactory>
                
                
                 
                <property name="messageType" value="application/json" 
scope="axis2"
                        type="STRING" />
                <log level="full"/>

                <log>
                        <property name="Janaka" expression="json-eval($.)" />
                </log>

And the output:

[2014-08-12 12:17:41,485]  INFO - LogMediator To:
/services/ClevertimCRM_createOpportunity, MessageID: urn:uuid:73a98f19
-1a7e-4fbe-ba68-2ef530419845, Direction: request, Envelope: <?xml
version="1.0" encoding="utf-8"?><soapenv:Envelope xmln
s:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body><jsonObject><?xml-multiple
 
?><tags><jsonElement>Tes
tTag</jsonElement></tags><name>Janaka</name><scriptArray><jsonElement>TestTag</jsonElement></scriptArray></jsonObject></
soapenv:Body></soapenv:Envelope>

[2014-08-12 12:17:41,486]  INFO - LogMediator To:
/services/ClevertimCRM_createOpportunity, MessageID: urn:uuid:73a98f19
-1a7e-4fbe-ba68-2ef530419845, Direction: request, Janaka =
{"tags":["TestTag"],"name":"Janaka","scriptArray":"TestTag"}

I need to send "scriptArray" also as an array.

Regards,
Janaka



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

Reply via email to