O'Reilly logo

REST in Practice by Savas Parastatidis, Jim Webber, Ian Robinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

POX: Plain Old XML over HTTP

For all its ingenuity (and potential drawbacks too), URI tunneling is a little out of the ordinary for enterprise integration—using addresses to convey business intent is, after all, strange. Our second web-based approach to lightweight integration puts us squarely back in familiar territory: messaging. The Plain Old XML (POX) web-style approach to application integration uses HTTP requests and responses as the means to transfer documents, encoded in regular XML, between a client and a server. It’s a lot like SOAP, but without the SOAP envelope or any of the other baggage.

POX is appealing as an approach because XML gives us platform independence, while the use of HTTP gives us practically ubiquitous connectivity between systems. Furthermore, compared to the URI tunneling approach, dealing with XML allows us to use more complex data structures than can be encoded in a URI, which supports more sophisticated integration scenarios.

That’s not to say that POX is on a par with enterprise message-oriented middleware, because clearly it isn’t. We have to remember that POX is a pattern, not a platform, and POX can’t handle transacted or reliable message delivery in a standard way.

However, for integration problems that don’t need such advanced features, XML over HTTP has the virtue of being a simple and highly commoditized solution.

In the remainder of this chapter, we’ll revisit our ordering system and show how it can be developed using the POX approach. We’ll ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required