XPath inconsistency between HTTP and FTP?
I have an HTTP export calling a SOAP web service and an xpath statement to access the records in the response:
XML Data from web service:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<aa
xmlns="http://tempuri.org/">
<bb>
<Data>
<cc>
<OrderId>152561087</OrderId>
</cc>
<cc>
<OrderId>152580890</OrderId>
</cc>
</Data>
<Status />
</bb>
</aa>
</soap:Body>
</soap:Envelope>
XPath:
/*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='aa']/*[local-name()='bb']/*[local-name()='Data']/*[local-name()='cc']
Yields:
{
"page_of_records": [{
"record": {
"$": {
"xmlns": "http://tempuri.org/"
},
"OrderId": [{
"_": "152561087"
}]
}
},
{
"record": {
"$": {
"xmlns": "http://tempuri.org/"
},
"OrderId": [{
"_": "152580890"
}]
}
}
]
}
OK, great, so that is working. Now I'm trying to load the same exact data, literally the web service response stream from PostMan saved to xml file, but I can't figure out what the Xpath should be in the FTP Export. You'd think it would be the same Xpath as the HTTP export, but no, it's not. I've been at this for hours trying to figure out what Celigo is expecting for the FTP resource path to be.
I've tried the XML parser tool in the dev playground with the same results.
0
Comments
Steve Klett it looks like we made need a ticket logged for the inconsistency, but it also looks like you can use normal path:
Tyler Lamparter Well, I'll be damned! I guess I was overcomplicating it. I was sure I had to avoid namepsaces altogether, especially because the <aa> element didn't have a binding, guess I was wrong.
Thanks a ton, Tyler, you got me out of a pinch.
BTW, I'm doing this to try to workaround the IIO response stream limitation of 5242880 bytes. The endpoint we're calling doesn't have pagination and they response payload size is obscene.
Thanks again :)
Please sign in to leave a comment.