Iteration through Parent-child with endpoint call










0














Scenario: Request consist of multiple orders with details. Send order details to back-end service and get a new Row number that after I should used like one of param with create details



Request looks:



<OrderList>
<Order>
<target>MySQL</target>
<Sales>
<email>p@gmail.com</email>
</Sales>
<Details>
<Item><qty>1</qty><code>PR9</code></Item>
<Item><qty>2</qty><code>PR8</code></Item>
<Item><qty>3</qty><code>PR7</code></Item>
</Details>
</Order>
<Order>
<target>MySQL</target>
<Sales>
<email>j@gmail.com</email>
</Sales>
<Details>
<Item><qty>4</qty><code>PR6</code></Item>
<Item><qty>5</qty><code>PR5</code></Item>
<Item><qty>6</qty><code>PR4</code></Item>
</Details>
</Order>
.......
</OrderList>


sequence:



 <inSequence>
<!-- get source target data -->
<iterate expression="//Order" preservePayload="true">
<target>
<enrich>
<source clone="true" xpath="//Order"/>
<target property="OrderBackup" type="property"/>
</enrich>
<sequence>
<property expression="//target" name="SalesTarget" scope="default" type="STRING"/>
<property expression="//Sales/email" name="email" scope="default" type="STRING"/>
<filter regex="MySQL" source="$ctx:SalesTarget">
<then>

<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:dat="http://ws.wso2.org/dataservice" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<dat:addSalesOrder>
<dat:email>$1</dat:email>
</dat:addSalesOrder>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$ctx:email"/>
</args>
</payloadFactory>
<call blocking="true">
<endpoint key="SalesOrderEP"/>
</call>
**<enrich>
<source clone="true" type="body"/>
<target property="newRowID" type="property"/>
</enrich>**

<property expression="$ctx:newRowID > 0 " name="isCorrectResponse" scope="default" type="BOOLEAN"/>
<filter regex="true" source="$ctx:isCorrectResponse">
<then>
<enrich>
<source clone="true" property="OrderBackup" type="property"/>
<target type="body"/>
</enrich>
<iterate expression="//Details">
<target>
<sequence>
<property expression="//qty" name="qty" scope="default" type="STRING"/>
<property expression="//code" name="code" scope="default" type="STRING"/>
<log level="custom">
<property expression="fn:concat('params:Code: ' ,$ctx:code, ' ;Qty: ',$ctx:qty)" name="info"/>
</log>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:dat="http://ws.wso2.org/dataservice" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<dat:addSalesDetails>
<dat:salesId>$1</dat:salesId>
<dat:qty>$2</dat:qty>
<dat:code>$3</dat:code>
</dat:addSalesDetails>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$ctx:newRowID"/>
<arg evaluator="xml" expression="$ctx:qty"/>
<arg evaluator="xml" expression="$ctx:code"/>
</args>
</payloadFactory>
<call blocking="true">
<endpoint key="SalesDetailsEP"/>
</call>
<!-- get response and log it -->
<aggregate>
<completeCondition>
<messageCount max="-1" min="-1"/>
</completeCondition>
<onComplete expression="//m0:UpdatedRowCount/Value" xmlns:m0="http://ws.wso2.org/dataservice">
<log level="full"/>
<drop/>
</onComplete>
</aggregate>
</sequence>
</target>
</iterate>
</then>
<else/>
</filter>
</then>
<else/>
</filter>
</sequence>
</target>
</iterate>
</inSequence>


I have a problem with first call response ... I used



<enrich>
<source clone="true" type="body"/>
<target property="newRowID" type="property"/>
</enrich>


to save newly created row Id in property and I'm getting it correctly in line



> <log level="custom">
> <property expression="fn:concat('NewRowID = ' ,$ctx:newRowID)" name="info"/>
> </log>


BUT when I want to use it in second payload it looks it cannot resolve it ?!!?



error:




DS Fault Message: Error in 'CallQuery.extractParams', cannot find
parameter with type:query-param name:salesId DS Code:
INCOMPATIBLE_PARAMETERS_ERROR




I figure out that in payload the $ctx:newRowID is reolved as



 <GeneratedKeys> xmlns="http://ws.wso2.org/dataservice"><Entry><ID>93</ID></Entry></GeneratedKeys>


and not simply as 93



I'm guessing this is because in enrich I used source as "body" .. but when I tried to get xpath of response like xpath = "//Entry/ID" I got nothing



what is wrong?










share|improve this question























  • I found a solution to preserve original part of message with <enrich> <source clone="true" property="OrderBackup" type="property"/> <target type="body"/> </enrich> BUT now I have issue to preserve newRowID and send it like part of detail message
    – lpastor
    Feb 13 '18 at 5:46










  • The real question is also WHY when I send call to end point and try to save response in property it wont work ???My response is like <soapenv:Body><GeneratedKeys xmlns="ws.wso2.org/dataservice"><Entry><ID>106</…> and when I set xpath in enrich like <enrich> <source xmlns:n0="ws.wso2.org/dataservice" clone="true" xpath="//n0:GeneratedKeys/Entry/ID"/><target property="newRowID" type="property"/> </enrich> error is xpath cannot be found
    – lpastor
    Feb 14 '18 at 5:22
















0














Scenario: Request consist of multiple orders with details. Send order details to back-end service and get a new Row number that after I should used like one of param with create details



Request looks:



<OrderList>
<Order>
<target>MySQL</target>
<Sales>
<email>p@gmail.com</email>
</Sales>
<Details>
<Item><qty>1</qty><code>PR9</code></Item>
<Item><qty>2</qty><code>PR8</code></Item>
<Item><qty>3</qty><code>PR7</code></Item>
</Details>
</Order>
<Order>
<target>MySQL</target>
<Sales>
<email>j@gmail.com</email>
</Sales>
<Details>
<Item><qty>4</qty><code>PR6</code></Item>
<Item><qty>5</qty><code>PR5</code></Item>
<Item><qty>6</qty><code>PR4</code></Item>
</Details>
</Order>
.......
</OrderList>


sequence:



 <inSequence>
<!-- get source target data -->
<iterate expression="//Order" preservePayload="true">
<target>
<enrich>
<source clone="true" xpath="//Order"/>
<target property="OrderBackup" type="property"/>
</enrich>
<sequence>
<property expression="//target" name="SalesTarget" scope="default" type="STRING"/>
<property expression="//Sales/email" name="email" scope="default" type="STRING"/>
<filter regex="MySQL" source="$ctx:SalesTarget">
<then>

<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:dat="http://ws.wso2.org/dataservice" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<dat:addSalesOrder>
<dat:email>$1</dat:email>
</dat:addSalesOrder>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$ctx:email"/>
</args>
</payloadFactory>
<call blocking="true">
<endpoint key="SalesOrderEP"/>
</call>
**<enrich>
<source clone="true" type="body"/>
<target property="newRowID" type="property"/>
</enrich>**

<property expression="$ctx:newRowID > 0 " name="isCorrectResponse" scope="default" type="BOOLEAN"/>
<filter regex="true" source="$ctx:isCorrectResponse">
<then>
<enrich>
<source clone="true" property="OrderBackup" type="property"/>
<target type="body"/>
</enrich>
<iterate expression="//Details">
<target>
<sequence>
<property expression="//qty" name="qty" scope="default" type="STRING"/>
<property expression="//code" name="code" scope="default" type="STRING"/>
<log level="custom">
<property expression="fn:concat('params:Code: ' ,$ctx:code, ' ;Qty: ',$ctx:qty)" name="info"/>
</log>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:dat="http://ws.wso2.org/dataservice" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<dat:addSalesDetails>
<dat:salesId>$1</dat:salesId>
<dat:qty>$2</dat:qty>
<dat:code>$3</dat:code>
</dat:addSalesDetails>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$ctx:newRowID"/>
<arg evaluator="xml" expression="$ctx:qty"/>
<arg evaluator="xml" expression="$ctx:code"/>
</args>
</payloadFactory>
<call blocking="true">
<endpoint key="SalesDetailsEP"/>
</call>
<!-- get response and log it -->
<aggregate>
<completeCondition>
<messageCount max="-1" min="-1"/>
</completeCondition>
<onComplete expression="//m0:UpdatedRowCount/Value" xmlns:m0="http://ws.wso2.org/dataservice">
<log level="full"/>
<drop/>
</onComplete>
</aggregate>
</sequence>
</target>
</iterate>
</then>
<else/>
</filter>
</then>
<else/>
</filter>
</sequence>
</target>
</iterate>
</inSequence>


I have a problem with first call response ... I used



<enrich>
<source clone="true" type="body"/>
<target property="newRowID" type="property"/>
</enrich>


to save newly created row Id in property and I'm getting it correctly in line



> <log level="custom">
> <property expression="fn:concat('NewRowID = ' ,$ctx:newRowID)" name="info"/>
> </log>


BUT when I want to use it in second payload it looks it cannot resolve it ?!!?



error:




DS Fault Message: Error in 'CallQuery.extractParams', cannot find
parameter with type:query-param name:salesId DS Code:
INCOMPATIBLE_PARAMETERS_ERROR




I figure out that in payload the $ctx:newRowID is reolved as



 <GeneratedKeys> xmlns="http://ws.wso2.org/dataservice"><Entry><ID>93</ID></Entry></GeneratedKeys>


and not simply as 93



I'm guessing this is because in enrich I used source as "body" .. but when I tried to get xpath of response like xpath = "//Entry/ID" I got nothing



what is wrong?










share|improve this question























  • I found a solution to preserve original part of message with <enrich> <source clone="true" property="OrderBackup" type="property"/> <target type="body"/> </enrich> BUT now I have issue to preserve newRowID and send it like part of detail message
    – lpastor
    Feb 13 '18 at 5:46










  • The real question is also WHY when I send call to end point and try to save response in property it wont work ???My response is like <soapenv:Body><GeneratedKeys xmlns="ws.wso2.org/dataservice"><Entry><ID>106</…> and when I set xpath in enrich like <enrich> <source xmlns:n0="ws.wso2.org/dataservice" clone="true" xpath="//n0:GeneratedKeys/Entry/ID"/><target property="newRowID" type="property"/> </enrich> error is xpath cannot be found
    – lpastor
    Feb 14 '18 at 5:22














0












0








0







Scenario: Request consist of multiple orders with details. Send order details to back-end service and get a new Row number that after I should used like one of param with create details



Request looks:



<OrderList>
<Order>
<target>MySQL</target>
<Sales>
<email>p@gmail.com</email>
</Sales>
<Details>
<Item><qty>1</qty><code>PR9</code></Item>
<Item><qty>2</qty><code>PR8</code></Item>
<Item><qty>3</qty><code>PR7</code></Item>
</Details>
</Order>
<Order>
<target>MySQL</target>
<Sales>
<email>j@gmail.com</email>
</Sales>
<Details>
<Item><qty>4</qty><code>PR6</code></Item>
<Item><qty>5</qty><code>PR5</code></Item>
<Item><qty>6</qty><code>PR4</code></Item>
</Details>
</Order>
.......
</OrderList>


sequence:



 <inSequence>
<!-- get source target data -->
<iterate expression="//Order" preservePayload="true">
<target>
<enrich>
<source clone="true" xpath="//Order"/>
<target property="OrderBackup" type="property"/>
</enrich>
<sequence>
<property expression="//target" name="SalesTarget" scope="default" type="STRING"/>
<property expression="//Sales/email" name="email" scope="default" type="STRING"/>
<filter regex="MySQL" source="$ctx:SalesTarget">
<then>

<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:dat="http://ws.wso2.org/dataservice" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<dat:addSalesOrder>
<dat:email>$1</dat:email>
</dat:addSalesOrder>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$ctx:email"/>
</args>
</payloadFactory>
<call blocking="true">
<endpoint key="SalesOrderEP"/>
</call>
**<enrich>
<source clone="true" type="body"/>
<target property="newRowID" type="property"/>
</enrich>**

<property expression="$ctx:newRowID > 0 " name="isCorrectResponse" scope="default" type="BOOLEAN"/>
<filter regex="true" source="$ctx:isCorrectResponse">
<then>
<enrich>
<source clone="true" property="OrderBackup" type="property"/>
<target type="body"/>
</enrich>
<iterate expression="//Details">
<target>
<sequence>
<property expression="//qty" name="qty" scope="default" type="STRING"/>
<property expression="//code" name="code" scope="default" type="STRING"/>
<log level="custom">
<property expression="fn:concat('params:Code: ' ,$ctx:code, ' ;Qty: ',$ctx:qty)" name="info"/>
</log>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:dat="http://ws.wso2.org/dataservice" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<dat:addSalesDetails>
<dat:salesId>$1</dat:salesId>
<dat:qty>$2</dat:qty>
<dat:code>$3</dat:code>
</dat:addSalesDetails>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$ctx:newRowID"/>
<arg evaluator="xml" expression="$ctx:qty"/>
<arg evaluator="xml" expression="$ctx:code"/>
</args>
</payloadFactory>
<call blocking="true">
<endpoint key="SalesDetailsEP"/>
</call>
<!-- get response and log it -->
<aggregate>
<completeCondition>
<messageCount max="-1" min="-1"/>
</completeCondition>
<onComplete expression="//m0:UpdatedRowCount/Value" xmlns:m0="http://ws.wso2.org/dataservice">
<log level="full"/>
<drop/>
</onComplete>
</aggregate>
</sequence>
</target>
</iterate>
</then>
<else/>
</filter>
</then>
<else/>
</filter>
</sequence>
</target>
</iterate>
</inSequence>


I have a problem with first call response ... I used



<enrich>
<source clone="true" type="body"/>
<target property="newRowID" type="property"/>
</enrich>


to save newly created row Id in property and I'm getting it correctly in line



> <log level="custom">
> <property expression="fn:concat('NewRowID = ' ,$ctx:newRowID)" name="info"/>
> </log>


BUT when I want to use it in second payload it looks it cannot resolve it ?!!?



error:




DS Fault Message: Error in 'CallQuery.extractParams', cannot find
parameter with type:query-param name:salesId DS Code:
INCOMPATIBLE_PARAMETERS_ERROR




I figure out that in payload the $ctx:newRowID is reolved as



 <GeneratedKeys> xmlns="http://ws.wso2.org/dataservice"><Entry><ID>93</ID></Entry></GeneratedKeys>


and not simply as 93



I'm guessing this is because in enrich I used source as "body" .. but when I tried to get xpath of response like xpath = "//Entry/ID" I got nothing



what is wrong?










share|improve this question















Scenario: Request consist of multiple orders with details. Send order details to back-end service and get a new Row number that after I should used like one of param with create details



Request looks:



<OrderList>
<Order>
<target>MySQL</target>
<Sales>
<email>p@gmail.com</email>
</Sales>
<Details>
<Item><qty>1</qty><code>PR9</code></Item>
<Item><qty>2</qty><code>PR8</code></Item>
<Item><qty>3</qty><code>PR7</code></Item>
</Details>
</Order>
<Order>
<target>MySQL</target>
<Sales>
<email>j@gmail.com</email>
</Sales>
<Details>
<Item><qty>4</qty><code>PR6</code></Item>
<Item><qty>5</qty><code>PR5</code></Item>
<Item><qty>6</qty><code>PR4</code></Item>
</Details>
</Order>
.......
</OrderList>


sequence:



 <inSequence>
<!-- get source target data -->
<iterate expression="//Order" preservePayload="true">
<target>
<enrich>
<source clone="true" xpath="//Order"/>
<target property="OrderBackup" type="property"/>
</enrich>
<sequence>
<property expression="//target" name="SalesTarget" scope="default" type="STRING"/>
<property expression="//Sales/email" name="email" scope="default" type="STRING"/>
<filter regex="MySQL" source="$ctx:SalesTarget">
<then>

<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:dat="http://ws.wso2.org/dataservice" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<dat:addSalesOrder>
<dat:email>$1</dat:email>
</dat:addSalesOrder>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$ctx:email"/>
</args>
</payloadFactory>
<call blocking="true">
<endpoint key="SalesOrderEP"/>
</call>
**<enrich>
<source clone="true" type="body"/>
<target property="newRowID" type="property"/>
</enrich>**

<property expression="$ctx:newRowID > 0 " name="isCorrectResponse" scope="default" type="BOOLEAN"/>
<filter regex="true" source="$ctx:isCorrectResponse">
<then>
<enrich>
<source clone="true" property="OrderBackup" type="property"/>
<target type="body"/>
</enrich>
<iterate expression="//Details">
<target>
<sequence>
<property expression="//qty" name="qty" scope="default" type="STRING"/>
<property expression="//code" name="code" scope="default" type="STRING"/>
<log level="custom">
<property expression="fn:concat('params:Code: ' ,$ctx:code, ' ;Qty: ',$ctx:qty)" name="info"/>
</log>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:dat="http://ws.wso2.org/dataservice" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<dat:addSalesDetails>
<dat:salesId>$1</dat:salesId>
<dat:qty>$2</dat:qty>
<dat:code>$3</dat:code>
</dat:addSalesDetails>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$ctx:newRowID"/>
<arg evaluator="xml" expression="$ctx:qty"/>
<arg evaluator="xml" expression="$ctx:code"/>
</args>
</payloadFactory>
<call blocking="true">
<endpoint key="SalesDetailsEP"/>
</call>
<!-- get response and log it -->
<aggregate>
<completeCondition>
<messageCount max="-1" min="-1"/>
</completeCondition>
<onComplete expression="//m0:UpdatedRowCount/Value" xmlns:m0="http://ws.wso2.org/dataservice">
<log level="full"/>
<drop/>
</onComplete>
</aggregate>
</sequence>
</target>
</iterate>
</then>
<else/>
</filter>
</then>
<else/>
</filter>
</sequence>
</target>
</iterate>
</inSequence>


I have a problem with first call response ... I used



<enrich>
<source clone="true" type="body"/>
<target property="newRowID" type="property"/>
</enrich>


to save newly created row Id in property and I'm getting it correctly in line



> <log level="custom">
> <property expression="fn:concat('NewRowID = ' ,$ctx:newRowID)" name="info"/>
> </log>


BUT when I want to use it in second payload it looks it cannot resolve it ?!!?



error:




DS Fault Message: Error in 'CallQuery.extractParams', cannot find
parameter with type:query-param name:salesId DS Code:
INCOMPATIBLE_PARAMETERS_ERROR




I figure out that in payload the $ctx:newRowID is reolved as



 <GeneratedKeys> xmlns="http://ws.wso2.org/dataservice"><Entry><ID>93</ID></Entry></GeneratedKeys>


and not simply as 93



I'm guessing this is because in enrich I used source as "body" .. but when I tried to get xpath of response like xpath = "//Entry/ID" I got nothing



what is wrong?







wso2 wso2esb






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 2:11









Cœur

17.4k9103145




17.4k9103145










asked Feb 13 '18 at 4:04









lpastor

749




749











  • I found a solution to preserve original part of message with <enrich> <source clone="true" property="OrderBackup" type="property"/> <target type="body"/> </enrich> BUT now I have issue to preserve newRowID and send it like part of detail message
    – lpastor
    Feb 13 '18 at 5:46










  • The real question is also WHY when I send call to end point and try to save response in property it wont work ???My response is like <soapenv:Body><GeneratedKeys xmlns="ws.wso2.org/dataservice"><Entry><ID>106</…> and when I set xpath in enrich like <enrich> <source xmlns:n0="ws.wso2.org/dataservice" clone="true" xpath="//n0:GeneratedKeys/Entry/ID"/><target property="newRowID" type="property"/> </enrich> error is xpath cannot be found
    – lpastor
    Feb 14 '18 at 5:22

















  • I found a solution to preserve original part of message with <enrich> <source clone="true" property="OrderBackup" type="property"/> <target type="body"/> </enrich> BUT now I have issue to preserve newRowID and send it like part of detail message
    – lpastor
    Feb 13 '18 at 5:46










  • The real question is also WHY when I send call to end point and try to save response in property it wont work ???My response is like <soapenv:Body><GeneratedKeys xmlns="ws.wso2.org/dataservice"><Entry><ID>106</…> and when I set xpath in enrich like <enrich> <source xmlns:n0="ws.wso2.org/dataservice" clone="true" xpath="//n0:GeneratedKeys/Entry/ID"/><target property="newRowID" type="property"/> </enrich> error is xpath cannot be found
    – lpastor
    Feb 14 '18 at 5:22
















I found a solution to preserve original part of message with <enrich> <source clone="true" property="OrderBackup" type="property"/> <target type="body"/> </enrich> BUT now I have issue to preserve newRowID and send it like part of detail message
– lpastor
Feb 13 '18 at 5:46




I found a solution to preserve original part of message with <enrich> <source clone="true" property="OrderBackup" type="property"/> <target type="body"/> </enrich> BUT now I have issue to preserve newRowID and send it like part of detail message
– lpastor
Feb 13 '18 at 5:46












The real question is also WHY when I send call to end point and try to save response in property it wont work ???My response is like <soapenv:Body><GeneratedKeys xmlns="ws.wso2.org/dataservice"><Entry><ID>106</…> and when I set xpath in enrich like <enrich> <source xmlns:n0="ws.wso2.org/dataservice" clone="true" xpath="//n0:GeneratedKeys/Entry/ID"/><target property="newRowID" type="property"/> </enrich> error is xpath cannot be found
– lpastor
Feb 14 '18 at 5:22





The real question is also WHY when I send call to end point and try to save response in property it wont work ???My response is like <soapenv:Body><GeneratedKeys xmlns="ws.wso2.org/dataservice"><Entry><ID>106</…> and when I set xpath in enrich like <enrich> <source xmlns:n0="ws.wso2.org/dataservice" clone="true" xpath="//n0:GeneratedKeys/Entry/ID"/><target property="newRowID" type="property"/> </enrich> error is xpath cannot be found
– lpastor
Feb 14 '18 at 5:22













1 Answer
1






active

oldest

votes


















0














Problem was that enrich mediator need namespace so



<enrich>
<source clone="true" xmlns:n0="http://ws.wso2.org/dataservice" xpath="$body/n0:GeneratedKeys/n0:Entry/n0:ID"/>
<target property="newRowID" type="property"/>
</enrich>


did the magic ... So ALWAYS put a namespace lesson learned






share|improve this answer




















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f48759252%2fiteration-through-parent-child-with-endpoint-call%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Problem was that enrich mediator need namespace so



    <enrich>
    <source clone="true" xmlns:n0="http://ws.wso2.org/dataservice" xpath="$body/n0:GeneratedKeys/n0:Entry/n0:ID"/>
    <target property="newRowID" type="property"/>
    </enrich>


    did the magic ... So ALWAYS put a namespace lesson learned






    share|improve this answer

























      0














      Problem was that enrich mediator need namespace so



      <enrich>
      <source clone="true" xmlns:n0="http://ws.wso2.org/dataservice" xpath="$body/n0:GeneratedKeys/n0:Entry/n0:ID"/>
      <target property="newRowID" type="property"/>
      </enrich>


      did the magic ... So ALWAYS put a namespace lesson learned






      share|improve this answer























        0












        0








        0






        Problem was that enrich mediator need namespace so



        <enrich>
        <source clone="true" xmlns:n0="http://ws.wso2.org/dataservice" xpath="$body/n0:GeneratedKeys/n0:Entry/n0:ID"/>
        <target property="newRowID" type="property"/>
        </enrich>


        did the magic ... So ALWAYS put a namespace lesson learned






        share|improve this answer












        Problem was that enrich mediator need namespace so



        <enrich>
        <source clone="true" xmlns:n0="http://ws.wso2.org/dataservice" xpath="$body/n0:GeneratedKeys/n0:Entry/n0:ID"/>
        <target property="newRowID" type="property"/>
        </enrich>


        did the magic ... So ALWAYS put a namespace lesson learned







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 14 '18 at 6:27









        lpastor

        749




        749



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f48759252%2fiteration-through-parent-child-with-endpoint-call%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            27

            Top Tejano songwriter Luis Silva dead of heart attack at 64

            Category:Rhetoric