Company
Date Published
Author
Hans Hübner
Word count
1603
Language
English
Hacker News points
None

Summary

In the API-centric world, SOAP and JSON APIs represent different eras of data interchange, with SOAP relying on XML and JSON offering a simpler, more accessible format. Many enterprises with existing SOAP infrastructure face challenges in integrating with modern JSON-based systems. One solution is using protocol translators like Kong Gateway to convert JSON requests into SOAP and vice versa, enabling compatibility without overhauling existing systems. This approach minimizes effort and costs, allowing organizations to modernize APIs while retaining their SOAP-based backends. XSLT, a language designed to process XML, plays a crucial role in handling these transformations, using functions like fn:json-to-xml and fn:xml-to-json to manage data conversions. The blog post outlines how to implement a protocol translator using Kong Gateway and Saxon, an XSLT implementation, through a demonstration of converting a Celsius to Fahrenheit SOAP service into a JSON-based API. The process involves creating a custom Kong plugin to manage these transformations within a Docker container, highlighting the potential for seamless integration between legacy and modern systems.