[resolved] Deal with repetition with tXMLMap

One Star

[resolved] Deal with repetition with tXMLMap

Hi,
I have an ESBConsumer that retrieves me a XML response and I send it to a XML MAP component.
In the XMLMap entry I have this tree (extracted from repository) :
-nsSmiley TongueART1 (loop)
-ns:Message
-ns:Value
-ns:Error
-ns:ErrorCode
-ns:ErrorLib
In the XMLMap output I have near the same thing (extracted from repository) :
-ds:REP (loop)
-ds:Msg
-ds:Result
-ds:Err
-ds:ErrCode
-ds:ErrLib

So I after having made my mapping all works fine except... when, I have many errors outputed by my ESBConsumer like :
<enc:Error row="0">
<enc:ErrorCode>-1</enc:ErrorCode>
<enc:ErrorLib>Identity error</enc:ErrorLib>
</enc:Error>
<enc:Error row="1">
<enc:ErrorCode>-1</enc:ErrorCode>
<enc:ErrorLib>Value error</enc:ErrorLib>
</enc:Error>
... my final result keeps only the first result error in place to retrieves all my "error" rows.
How can I set the tXMLMAP to deal with these repetitions ?
I tried the Loop option but did not suceed to obtain what in need.
Regards

Accepted Solutions
One Star

Re: [resolved] Deal with repetition with tXMLMap

Ok, all is fine now. I had 2 errors :
- I needed the LoopSmiley Surprisedptionnal because sometimes the node -ns:Error is not returned by the ESBConsumer.
- For the "Send Response failed! Response already sent with current request." error,
I had to set ALL IN ONE = True.
Thanks

All Replies
One Star

Re: [resolved] Deal with repetition with tXMLMap

cedico - set your loop on ns:Error in the input and let us know what you get in the output... You typically set select the lowest level child tag in the XML as the loop expression
One Star

Re: [resolved] Deal with repetition with tXMLMap

I had already try this solution ( -ns:Error(loop) ) but when i test it, I obtain this error :
(leaving the "loop" at the highest level doesn't raise any exception)
Exception in component tESBProviderResponse_1
java.lang.RuntimeException: Send Response failed! Response already sent with current request.
I've posted the pictures of the complete schema of my Xmlmap but it does t upload... here is a link :
http://i.imgur.com/910uRqu.png
Am i missing something ?
One Star

Re: [resolved] Deal with repetition with tXMLMap

Ok, all is fine now. I had 2 errors :
- I needed the LoopSmiley Surprisedptionnal because sometimes the node -ns:Error is not returned by the ESBConsumer.
- For the "Send Response failed! Response already sent with current request." error,
I had to set ALL IN ONE = True.
Thanks