← Back to all posts
Technical solution

SOAP to REST: How to safely normalize heavy flight payloads

By Tharindu Ruwanpathirana·Oct 18, 2026
Parsing multi-megabyte XML payloads from airline SOAP endpoints in Node.js or Spring Boot can cause serious heap memory pressure if done carelessly. Here are 3 concrete optimizations: 1. Stream parsing with StAX or sax-js instead of loading the entire DOM tree into memory. 2. Normalizing date-time strings to UTC ISO-8601 at the gateway boundary to avoid timezone mismatches across international departure airports. 3. Selective extraction: Don't map 150 XML attributes when your client only needs flightNumber, departureTime, cabinClass, and totalFare. By applying streaming XML transformation, our P95 latency dropped from 1.8s down to 320ms on flight shopping queries.

1 approved reply

Streaming XML parsing was exactly what we needed for high-concurrency search. Thanks for sharing this pattern!

By Kasun Silva · Oct 19, 2026