1 / 11

Veebiteenused & XML & XPATH

Veebiteenused & XML & XPATH. Veebiteenuse väljakutse demo. SoapUI ( http://www.soapui.org/ ) SoapUI WebStart www. soapui .org/ jnlp /4.0.1/ soapui . jnlp Temperatuuri konverteerimise teenus http://www.w3schools.com/webservices/tempconvert.asmx?WSDL. Loengu boonuspunkt.

Télécharger la présentation

Veebiteenused & XML & XPATH

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Veebiteenused & XML & XPATH

  2. Veebiteenuse väljakutse demo • SoapUI (http://www.soapui.org/) • SoapUIWebStart • www.soapui.org/jnlp/4.0.1/soapui.jnlp • Temperatuuri konverteerimise teenus • http://www.w3schools.com/webservices/tempconvert.asmx?WSDL

  3. Loengu boonuspunkt • 1 boonuspunkt neile, kes otsisid ise välja SoapUI-ga käivitatava veebiteenuse.

  4. Ülesanne 1 (ws) Võta krediitkaardi numbri valideerimise veebiteenuse kirjeldus (wsdl) aadressilt: https://ws.cdyne.com/creditcardverify/luhnchecker.asmx Käivita antud teenus soupUI-ga www.soapui.org/jnlp/4.0.1/soapui.jnlp

  5. XML (eXtended Markup Language) • XML õppetund w3Schools lehel • http://www.w3schools.com/xml/default.asp • Root element (document element) • <element_nameattribute_name="attribute_value">Element Content </element_name> • Element content võib olla Child element • XML’i näited http://www.w3schools.com/xml/cd_catalog.xml http://www.w3schools.com/XQuery/books.xml

  6. XML namespaces <root xmlns:h="http://www.w3.org/TR/html4/" xmlns:f="http://www.w3schools.com/furniture"> <h:table> <h:tr> <h:td>Apples</h:td> <h:td>Bananas</h:td> </h:tr> </h:table> <f:table> <f:name>African Coffee Table</f:name> <f:width>80</f:width> <f:length>120</f:length> </f:table> </root> • http://www.w3schools.com/xml/xml_namespaces.asp

  7. Ülesanne 2 (xml) • Koosta XML fail enda rühma tudengite andmete edastamiseks. Minimaalselt peavad olema: • Elemendid • nimi • sugu • vanus • hobid, mis on vabatahtlik, aga millel saab olla 1-mitu alamelementi „nimetus“ • Atribuudid • matrikli_nr • Kommentaar (faili autori nimega) • Valideerige www.w3schools.com/xml/xml_validator.asp • 1 boonuspunkt

  8. XPATH • XPATH õppetund w3Schools lehel iseseisvaks lugemiseks tunnis: • http://www.w3schools.com/xpath/default.asp • XPATH on päringukeel XML dokumentidest informatsiooni otsimisest nagu SQL on päringukeel andmebaasi tabelitest otsimiseks.

  9. XPATH’i näited • Online vahendeid • http://www.bit-101.com/xpath/ • http://www.futurelab.ch/xmlkurs/xpath.en.html • http://www.xmlme.com/XpathTool.aspx • Näite XML • http://www.w3schools.com/xml/cd_catalog.xml • Pärime välja kõik title’d • /CATALOG/CD/TITLE • //TITLE • Pärime välja kõik cd’d, mille hind on suurem kui 10 • /CATALOG/CD[PRICE>10]

  10. Ülesanne 3 (xpath) • Kirjuta XPATH-ga päring, mis tagastaks kõik raamatu (book) pealkirjad (title), mille kategooriaks (category) on märgitud WEB ja hind (price) on suurem kui 40. • http://www.w3schools.com/XQuery/books.xml • 1 boonuspunkt

  11. Lisaülesanne (xpath) • Leia järgmisest uudistevoo xml-st: • http://www.aripaev.ee/mod/rss.xml • Kõikide uudiste (item) lingid (link), kus kirjeldused (description) sisaldavad sõna ‘Eesti’. • 1 boonuspunkt

More Related