"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年12月9日 星期五
2005年11月18日 星期五
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]
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日 星期一
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
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.
訂閱:
文章 (Atom)