We have taken a look at two web services to get our feet wet. The Internet UPC Database is an XML-RPC based service. While the ECS is available in both SOAP and REST flavors, we used the simpler and more popular REST tools. The mashup we created looked up product information from the Internet UPC Database and passed it to ECS. We found how much the product cost on Amazon.com and integrated ECS’s shopping cart operations to create a shopping cart on our site. Finally, the user can purchase the items directly from Amazon.
In creating our mashup, we created a couple of object tools to call XML-RPC and REST services. REST usually returns a XML document to the caller. Using PHP’s SAX function, we created an extensible object-oriented parser for XML. We will use these tools later in other projects.
XML-RPC and REST are the most simple web services. As we progress to later projects, we will see more complex protocols like SOAP.