Hi,
I want to add following XML element as a child to the payload body
<deleveryStatus>abc123</deleveryStatus>
This "abc123" value is taken from a property.
I used enrich mediator to add the element as follows
<property name="deliverystatus" scope="default">
<deleveryStatus></deleveryStatus>
</property>
<enrich>
<source type="property" clone="true"
property="deliverystatus"></source>
<target type="body" action="child"></target>
</enrich>
and it sets the element as expected to the body (with default namespace)
(<deleveryStatus xmlns="http://ws.apache.org/ns/synapse"></deleveryStatus>)
Then I tired to set value in to this element (taking from another property)
<enrich>
<source type="property" clone="true"
property="message1"></source>
<target xpath="//deliverystatus" xmlns="
http://ws.apache.org/ns/synapse"></target>
</enrich>
and it gives me following error
*ERROR - EnrichMediator Invalid Target object to be enrich.*
But I could add values to elements which were already there in the payload
body (value can't be added only to the newly added one). What could be the
reason for this issue? Is there any other way to do this task ?
Regards,
Malintha Adikari
--
*Malintha Adikari*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware
Mobile: +94 71 2312958
Blog: http://malinthas.blogspot.com
Page: http://about.me/malintha
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev