Still not quite sure I understand the problem completely, but here are some ideas to get you started. Your workflow requires three steps:
Fetch the XML data from the external API.
Parse the XML (the SOAP namespace may require some attention) into a usable format.
Filter and display the parsed data in your template.
I assume your existing code is based on ...