2005年12月9日 星期五

Lab Web Service II

"we make a living by what we get, we make a life by what we give"

Test Drive a web service
1. Click Stock Quote and play with this operation
2. Enter IBM as symbol and see what you get in the result.

3. Copy the response XML from this web service, which is a SOAP message, into a text file called quote.xml and prepare for transformation as described in the next step.

4. Based on
the method of Lab XSLT,
write an XSLT and transform the result XML into an HTML.

2005年11月18日 星期五

11-18-2005 Homework

LAB XSLT
reference: XML

12-02-2005 XML

XML
LAB XSLT
Lab XSLT II


sample XML file

[weather type="Current conditions"]
[temp]76[/temp]
[wind]5[/wind]
[/weather]

sample XSLT file

[xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"]

[xsl:template match="weather"]
[H1][xsl:value-of select="@type"/][/H1]
[xsl:apply-templates/]
[HR/]
[/xsl:template]

[xsl:template match="temp"]
[LI]Temperature [xsl:apply-templates/]°F[/LI]
[/xsl:template]

[xsl:template match="wind"]
[LI]Wind [xsl:apply-templates/]mph[/LI]
[/xsl:template]

[xsl:template match="text()"]
[xsl:value-of select="."/]
[/xsl:template]

[/xsl:stylesheet]

2005年11月14日 星期一

11-18-2005 HTML and CGI Form

HTML and CGI Form
XML

Web Services

References: Web Service

Extensive list
of web services

Examples
1. find the best rate of USD remission
2. Zip Code
key=eUhOTOJs9D2mcHU6SiL0CyMQvpJ3I3PqR2/fpRq4BOApWxzSzw7wD2FQ2mOmHEk+pq6iRBomQ4wuQl5EGOgfCitYgkQ3N4vl
3. Stock Quote

4. purchase a Hawaii tour with ait tkts, hotel, car rental and golf course


What is SOAP?

SOAP is the Simple Object Access Protocol. It is used for information exchange and RPC, usually (but not necessarily) over HTTP. More information can be found at:

Developmentor SOAP FAQ: http://www.soaprpc.com/faqs/SoapFAQ.html

W3C specifications: http://www.w3.org/TR/SOAP/



What is WSDL?

WSDL is the Web Service Description Language. It provides a formal description of a web service, much like CORBA's IDL. The WSDL file is all you need to know how to call the web service; toolkits can generate proxy code from a WSDL file directly. The official WSDL definition is at http://www.w3.org/TR/wsdl.

Lab Web Services: Test drive a web service with XML.