Hi Indika,
Use payload factory to create the initial payload.
Eg:
<payloadfactory>
<format>
<m:select_fields xmlns:m="http://services.samples/xsd">
</format>
<args/>
</payloadfactory>
Use Enrich mediator to add dynamic elements
Eg:
<payloadfactory>
<format>
<m:list xmlns:m="http://services.samples/xsd">Name1</m:list>
</format>
<args/>
</payloadfactory>
<property action="set" expression="//m:list" name="CUR_PAYLOAD"
scope="default" type="OM" />
<enrich>
<source clone="true" property="CUR_PAYLOAD" type="property"/>
<target xmlns:m="http://services.samples/xsd" action="child"
type="custom" xpath="//m:select_fields"/>
</enrich>
For more info check the following
http://mrmalakasilva.blogspot.com/2013/04/use-of-enrich-mediator-to-modify-payload.html
On Tue, Dec 24, 2013 at 2:39 PM, indika prasad <[email protected]> wrote:
> Hi,
>
> How can I pass the dynamic array type data to the payload factory?
> Here is my soap request:
>
> <select_fields>
> <list>name1</list>
> <list>name2</list>
> </select_fields>
>
> What is the best way to pass the above dynamic array in to the payload
> factory?. Much appreciate of you can provide some sample workout/related
> forum post for this.
>
> Thanks
> Indika
>
>
>
> --
> View this message in context:
> http://wso2-oxygen-tank.10903.n7.nabble.com/Dynamic-array-in-payload-factory-tp90180.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
>
--
Best Regards,
Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/
WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/<http://wso2.com/about/team/malaka-silva/>
Save a tree -Conserve nature & Save the world for your future. Print this
email only if it is absolutely necessary.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev