Hi,

I'm generating a soap message from a JSON payload and there I would get
custom object arrays for the payload. An example message format would be
like below.

{
   "phoneNumbers":[
      {
         "number":"",
         "person":""
      }
   ]
}

respective soap message should be like this.

<web:Payload>
    <web:PhoneNumbers>
<web:PhoneNumber>
    <web:Number></web:Number>
    <web:Person></web:Person>
<web:PhoneNumber/>
    </web:PhoneNumbers>
</web:Payload>

I have used a payload factory mediator for the simple object types(without
arrays) and I use property mediator to access the object fields so that I
can inject them using an argument to the message template used for payload
factory. But when getting an array of as mentioned payload the argument
should be populated with following elements for the size of the array.

* <web:PhoneNumber>*
*     <web:Number></web:Number>*
*     <web:Person></web:Person>*
* <web:PhoneNumber/>*

In this case, is there a way I can use payload factory with property
mediator? Or Is there a recommended mediators I can use for this scenario?

Thanks and Regards,
Sameera,
-- 
Sameera Gunarathne
Software Engineer, WSO2 Inc. http://wso2.com
<http://l.facebook.com/l.php?u=http%3A%2F%2Fwso2.com&h=gAQEswASa>
Email: samee...@wso2.com
Mobile: +94714155561
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to