Now is the time to put it all together. We’ve looked at SOAP, which allowed us to access the Microsoft Live Search Web Service. We then looked at each individual service and saw how they accept and return data. Let’s now put it all together under one common interface.
Let’s start with a front-end form to accept queries.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_ US"> <head> <title>Mashups Chapter 2</title> </head> <body> <form action="action.php" method="post"> <input type="text" size="20" maxlength="40" "name="query" /> <input type="submit" </form> </body> </html>
This will post the query to an action page. For our action page, we will just take the example code we have written so far and consolidate it. The only changes we will make are...