Playing with the Who Wants to be a Millionaire web service
Konrad Wulf has created a quiz web service, Millionaire style. You can see a working HTML example of it here. Today I played with it in Flash. Watch the star to see if you got it right or wrong!
The service has five operations:
getRandomQuestion()
getRandomQuestionByDifficultyLevel()
checkCorrectAnswerById()
getCorrectAnswerForQuestionById()
addNewEntry()
In my example, I use the getRandomQuestion operation to pull a question and answer set from the database when the "new question" button is clicked. Then I am also calling the checkCorrectAnswerById operation to see if the selected answer is correct when the "check answer" button is clicked. The getRandomQuestion operation doesn't take any parameters. It returns the following results:
results: MultipleChoiceQuestion (Object)
id: Integer
question: String
answerA: String
answerB: String
answerC: String
answerD: String
difficultyLevel: Integer
The checkCorrectAnswerById operation expects the following parameters:
params
id: Integer
guessedAnswer: String
The value of guessedAnswer has to be A, B, C, or D. The result that is returned is a Boolean:
results: Boolean
My favorite question in Konrad's database is this one:
What are the three building blocks of Web Services?
A. XML, SOAP, WSDL
B. XML, WSDL, UDDI
C. SOAP, WSDL, UDDI
D. HTTP, HTML, Web Browser
Do you know the answer?
I am going to make the source available for this thing soon, but I'm not quite ready yet. Don't blame me for misspellings in the questions - remember, it's a public web service! My Flash movie is merely consuming it.





posted
by Vera (