Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Correct xpath for SOAP XML response

Hi all,
I am trying to read an XML file which is basically the output of a SOAP call. The top part of the XML looks like this:
<soap:Envelope xmlns:soap=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ICGetWhseProductListV3Response xmlns="Infor.WS">
<ICGetWhseProductListV3Result>
<errorMessage/>
<moreRecordsFlag>false</moreRecordsFlag>
<arrayWhseprod>
<ICGetWhseProductListV3.output.Whseprod>
<prod>001-5B201-H01</prod>
<whse>CAL</whse>
.
.
.
ICGetWhseProductListV3.output.Whseprod is the element I want to loop on so I tried to set my Loop Xpath query for my tFileInputXML component to this:
"/*/ICGetWhseProductListV3Response/ICGetWhseProductListV3Result/arrayWhseprod/ICGetWhseProductListV3.output.Whseprod"

I've tried a few variations and I keep getting this error:
Error on line 3 of document : The prefix "soap" for element "soap:Envelope" is not bound. Nested exception: The prefix "soap" for element "soap:Envelope" is not bound.
I've probably got something small incorrect. What am I missing?
Labels (4)
3 Replies
Anonymous
Not applicable
Author

Hi
I don't understand why the Loop Xpath query contains wildcard "*"? To me, the Loop Xpath query should be:
"/soap:Envelope/soap:Body/ICGetWhseProductListV3Response/ICGetWhseProductListV3Result/arrayWhseprod/ICGetWhseProductListV3.output.Whs"
Shong
Anonymous
Not applicable
Author

That was actually one of the variations I tried. It errored but it actually worked when I connected the XML to a tFileOutputDelimited component. (Didn't realize it worked until I actually looked at the csv file which of course was after I had posted)
Anonymous
Not applicable
Author

I have no idea how my job worked before but it doesn't seem to be working correctly now.
The tAdvancedFileOutputXML is called "out.xml". After running the job its basically empty. (It has the right structure but there's no data)
The tFileInputXML component uses out.xml. I have the option "Ignore the name spaces" selected. If I don't I get the error described above with no output at all. (With it on, it still errors but seems to continue).
With the option selected it needs a value for "Generate a temporary file". However this file is never touched by the job and if the file is missing it gives me an error. So it doesn't seem to be actually getting the data from out.xml but rather from the temp xml file.
Strangely, if I connect a tLogRow to the tAdvancedFileOutputXML I see it generate the XML.
Any ideas?
0683p000009MECH.jpg