Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[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) :
-ns 0683p000009MAB6.pngART1 (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
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Ok, all is fine now. I had 2 errors :
- I needed the Loop 0683p000009MA5A.pngptionnal 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

View solution in original post

3 Replies
willm1
Creator
Creator

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
Anonymous
Not applicable
Author

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 ?
Anonymous
Not applicable
Author

Ok, all is fine now. I had 2 errors :
- I needed the Loop 0683p000009MA5A.pngptionnal 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