Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to filter response from tSoap and print them?

Hi,
Following is the job design:
tMSsqlinput------->tFlowToIterate-------->tSoap--------->tExtractXmlField---------->tlogrowerrors_log_errors.
I am getting two types of output from tSoap (in tlogrowerrors_log_errors, when put before tExtractXmlField).
First type:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap=""><soap:Body><ns2:getMappingsResponse xmlns:ns2=""><return><beanId>0</beanId><code>1094087</code><codeDisplayName>Arginine 6 MG/ML / Histidine 4.29 MG/ML / Isoleucine 4.62 MG/ML / Leucine 7.26 MG/ML / Lysine 5.35 MG/ML / Methionine 7.26 MG/ML / Phenylalanine 7.26 MG/ML / Threonine 3.3 MG/ML / Tryptophan 1.65 MG/ML / Valine 5.28 MG/ML Injectable Solution [Aminosyn-RF 5.2 %, Sulfite-Free]</codeDisplayName><codeSystem>RXNORM</codeSystem><codeSystemDisplayName>RXNORM</codeSystemDisplayName><communityId>0</communityId><defaultCommunity>true</defaultCommunity><outbound>true</outbound><sendMasterMap>false</sendMasterMap><sendOneToMany>false</sendOneToMany><sendOneToManyForAllCodeSystems>false</sendOneToManyForAllCodeSystems><toCodeSystem>RXNORM</toCodeSystem></return></ns2:getMappingsResponse></soap:Body></soap:Envelope>
Second type:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap=""><soap:Body><ns2:getMappingsResponse xmlns:ns2=""></ns2:getMappingsResponse></soap:Body></soap:Envelope>
Now the problem is, if I pass(row---->main) second type of output from tSoap, to tExtractXmlField, I dont get it parsed in the final tlogrowerror, but if I pass(row------->main) first type, I get output in tlogrowerror.

My question is, is there anyway that we can filter these two type of outputs from tSoap and get it printed. I want separate list of first type of output from tSoap from which I get response and I want separate list of all second type of output from tSoap from which I am not getting any response.  I need these as I would be able to check the request which I am sending is correct or wrong.

Best regards,
Amal Raj Kashyap

Labels (2)
3 Replies
Anonymous
Not applicable
Author

The easiest way to do this is to find something you can use as a key. For example, if there is always a particular element in one type that is not in the other type, you could carry out a XPath Query for that element in the tExtractXMLField component. You would also have to pass the whole XML document out of the tExtractXMLField component with the result of the element query. The next component would be a tMap component. Use the result of the element you queried to decide which tMap output to send the data to and then process the data according to the XML type.

tMSsqlinput------->tFlowToIterate-------->tSoap--------->tExtractXmlField---------->tMap------------->tExtractXmlField[font=Verdana, Helvetica, Arial, sans-serif] (type1)
                                                                                                                         
[/font]|------------->tExtractXmlField (type2)
Anonymous
Not applicable
Author

Hi Rhall,
Thanks for your response.
I am not getting output for second type of response from tsoap, so I am not getting anything to match with txmlmap.

Anyway, my question is how to save request sent and output of tsoap before passing it to txmlextract.
To make it understand in more simpler way, let me modify the job design:
tMSsqlinput------->tFlowToIterate-------->tSoap--------->tlogrowerror.
Now, how these two types of output can be seperated and saved?
Thank you.
Amal
Anonymous
Not applicable
Author

If you are not getting a response for the second type of XML it suggests a problem with the SOAP service you are calling. Is it a Talend service or another service? Do you have a WSDL so you can work out what you should be getting?