Quick viewing(Text Mode)

CGS Mini-Workshop: Web Servces

CGS Mini-Workshop: Web Servces

CSG Mini-Workshop: Web Services

Justin Tilton instructional media + magic, inc.

As presented at the Common Solutions Group Meeting May 9, 2002 Chicago, Illinois JA-SIG Workshop Series ietr UDDI SAML •Transformation Directory • SOAP •Description Schema XSLT WSDL Security XML• Transport • Validation • •Data Overview Data: XML Overview JA-SIG Workshop Series XML isnot aprogramming language, • isa setofrulesfor designing XML • Structured dataincludesthingslike: • XML isforstructuring data[1] programmer touseit orlearn it and you don't haveto be a your data. text formats thatletyou structure spreadsheets, addressbooks, • transactions, andtechnical drawings configuration parameters, financial JA-SIG Workshop Series • XML avoids commonpitfalls in XML • makesiteasier foracomputer XML • XML isforstructuring data[2] language design: unambiguous ensure thatthedata structureis to generatedata, readdata,and and itsupports internationalization and • it isplatform-independent • it isextensible • localization JA-SIG Workshop Series XSL isthe advanced language for • aresyntaxesin XFragments and XPointer • describes astandardwaytoadd Xlink • 1.0 isthespecificationthatdefines XML • XML isafamily of [1] expressing style sheets. Itisbased onXSLT XML document development forpointingtoparts ofan hyperlinks toanXML file what "tags"and"attributes" are JA-SIG Workshop Series • XML Signatures XML provide integrity, message • provides flexiblequery facilities toextract XQuery • Schemashelp developerstopreciselydefine XML • XPath isalanguage fornavigatinginanXML • XSLT isatransformation languageusedfor • XML isafamily of technologies[2] for an XMLdocument authentication, and signerauthentication services data fromreal andvirtualdocuments ontheWeb the structures oftheirownXML-based formats. document attributes tags and addingand deleting rearranging, JA-SIG Workshop Series The designersof XMLsimplytookthe best • The development ofHTMLstarted in1990. • Before XML therewasSGML,developedin • Development of XML startedin1996and • XML isnew, but notthatnew powerful with HTML, and produced something very parts ofSGML, guidedby theexperience documentation projects the early'80s,and widely usedforlarge February 1998 has beenaW3CRecommendation since JA-SIG Workshop Series XHTML hasalmostallofthesame elements • The successorto HTMLisXHTML • HTML andXHTML slightly toconform to therulesofXML as HTML,butthesyntax hasbeenchanged • Emerging applications such asuPortal areusing Emerging • XHTML saysthat "

" standsfor"paragraph", • XHTML allows"

", butnot""since

is • XHTML tooutputcontent tobrowsers and notfor "price", "person",oranything else defined inXHTML andisnot JA-SIG Workshop Series • XML Schemaisdesigned tosupport XML • XSL andRDF aregoodexamplesofXML- • To eliminate nameconfusionwhen • XML hasnamespaces structure. schemas to produceamerged document structures, makingiteasyto combinetwo modularity bydefiningXMLdocument based formatsthat use namespaces namespace mechanism combining documents, XMLprovidesa JA-SIG Workshop Series Since XML is license-free,you can • A largeandgrowing communityof • islicense-free,platform- XML • XML islicense-free without fees build your ownsoftwarearound it the tools andengineers experiencedin independent and well-supported JA-SIG Workshop Series version="1.0"?> strawberries andwhipped cream plenty ofrealmaple syrup Belgian Waffles Strawberry Belgian Waffles 900 650 7.95 5.95 US Dollars US Dollars light Belgian waffles covered with two ofourfamousBelgianWaffles with JA-SIG Workshop Series version="1.0"?> strawberries andwhipped cream plenty ofrealmaplesyrup Strawberry Belgian Waffles Belgian Waffles 900 650 light Belgianwaffles coveredwith two ofourfamousBelgianWaffles with US Dollars US Dollars "> "> 7.95 5.95 Validation: XML Schema Overview JA-SIG Workshop Series • The purposeofanXMLSchema isto The • XML SchemaisanXML based • What isanXML Schema? XML document, justlike a DTD. define the legalbuilding blocks ofan Definition (DTD) alternative toDocument Type JA-SIG Workshop Series Default values forelements andattributes • Data types forelements and attributes • anelement isemptyorcan Whether • elements The numberofchild • The sequenceinwhichthechildelements • Simple child-parentelement relationships • Elements andattributes thatcanappearin • An XMLSchema defines: include text can appear a document JA-SIG Workshop Series We thinkthatvery soonXML • XML Schemas replacingDTDs DTDs. Herearesome reasons: applications asa replacementfor Schemas willbe used inmostWeb • XML Schemas are extensible tofuture XML • Schemassupport namespaces XML • Schemas support datatypes XML • Schemas arewritteninXML XML • Schemasarericher thanDTDs XML • additions JA-SIG Workshop Series With datatype supportitiseasierto: • XML Schema &DataTypes Convert databetweendifferent data • Define datapatterns (dataformats) • Define data facets(restrictions ondata) • withdatafrom adatabase Work • Validate thecorrectness ofdata • Describe permissible documentcontent • types JA-SIG Workshop Series With XMLSchemas, mostof these • if documentsareWell-Formed Even • A well-formed XMLdocumentisa • Why Schema isimportant validating software. errors canbe caught byyour consequences. those errors canhaveserious they can stillcontainerrors, and syntax rules document thatconforms totheXML XML Schema: Practical JA-SIG Workshop Series Washington Document: Schema: A schemaspecifies asetofvalidtop- • The simplest element definition level elements. • In thesimplest case,wecandefinean In • element to describe a name of the city: element todescribe anameofthe JA-SIG Workshop Series to body heading from " type="xsd:string"/> " type="xsd:string"/> " type="xsd:string"/> " type="xsd:string"/> JA-SIG Workshop Series Document: A schemaspecifies asetofvalidtop- • Another element definition level elements. Complex typescandefineelements with • children: Sam Jack Please updatesection II Your presentation Transport: SOAP Overview JA-SIG Workshop Series SOAP standsforSimple Object • SOAP isan XMLbasedprotocoltolet • What isSOAP? Access Protocol standard Internet HTTP applications communicate using software components and JA-SIG Workshop Series SOAP will be developed as a W3C standard • Remote procedure callprotocol • Simple and extensible • Based onXML • Language independent • Platform independent • Designed tocommunicate viainternet • A formatforsending messages • For betweenapplications • A • SOAP is: JA-SIG Workshop Series SOAP providesawayto communicate • SOAP isTransport Protocolindependent • Why SOAP? languages technologies and different programming operating systems, withdifferent between applications running ondifferent • Real timeovertheinternetmightuseHTTP, Real • Transport protocolchosenaccordingtonetwork • SMTP where abatchprocessing applicationmightuse architecture andtypeof exchange JA-SIG Workshop Series Anyone using the transport portion of • •TheebXMLPlenary Ariba, CommerceOne, UserLand, • voted onSOAP wasProposed 16 bM will therefore beusing SOAP ebXML transport specification ebXML the SOAP With Attachmentsas partof 2001 touseSOAP1.1 and February proposed SOAPto W3C,inMay2000 IONA, Lotus,, andSAP HP,IBM, Developmentor, Compaq, JA-SIG Workshop Series • The XMLdocument containsthe The • A SOAPmessage isanordinaryXML • SOAP Building Blocks following XMLelements: document. A SOAPbody, that contains requestand • A SOAPheader(optional), thatcontains • A SOAP envelope, thatdefines the • response information header information suchascredentials message content of the JA-SIG Workshop Series A SOAPmessage: • Syntax Rules • Must NOT containXML processing instructions Must • NOTcontaina DTD reference Must • usetheSOAPencoding namespace Must • usetheSOAPenvelope namespaces Must • haveaSOAPbody Must • haveaSOAPheader Can • have aSOAPenvelope Must • usingXML beencoded Must • JA-SIG Workshop Series SOAP Request Example Apples JA-SIG Workshop Series soap:encodingStyle= xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/“ JA-SIG Workshop Series It defines theXMLdocumentasa • elementmustbe The • The Envelope Element SOAP message. the rootelement ofaSOAPmessage JA-SIG Workshop Series • The

element cancontain The • The HeaderElement information about theSOAPmessage additional, application specific Optionally, theheader can carry • For example,theHeaderelement can • information authorization & authentication message and currency valuesusedinthe SOAP contain information aboutthe language JA-SIG Workshop Series It containstheactualSOAPmessage • mustbepresentin a The • The BodyElement or “payload” SOAP message JA-SIG Workshop Series •The SOAPA SOAPExample [1] request: IBM JA-SIG Workshop Series The SOAP response: • A SOAPExample [2] 34.5 JA-SIG Workshop Series SAML Assertion http://www.bizexchange URN:dns-date:www.bizexcha http://www.bizexchang http://www.elsevier ://www.SantaMa Alice .test/assertion/AE0221 e.test/rule_book. nge.test:2001-01-03:19283 .com/Journal_X/ riaUniversity.edu/SIS/ JA-SIG Workshop Series Retrieve WSDL Retrieve 3 Definition Web services architectureoverview • Building web services bind Call WebService Web service requestor Document provider Document WSDL WSDL 4 call 2 look upwebservice find (at development time) (at development Register Web Service Web Register 1 publish UDDI Service JA-SIG Workshop Series WSDL makesiteasy for client • Web ServicesDescription Language • WSDL applications touseaweb sevice • Language describingwhatservicesare Language • available andhowthey canbeaccessed • End-points for messageprocessing End-points • sent being Messages • JA-SIG Workshop Series WSDL document structure • WSDL network address forabinding root element grouping of relatedports protocols for aportType set ofabstract operations abstract messagedefinitions data typedefinitions JA-SIG Workshop Series A webservices registrysystem • Description, Discoveryand Universal • UDDI Integration • Green pages – operation rules operation Green pages– • service classifications Yellow pages – • general information pages – White • JA-SIG Workshop Series keyedReference tModelKey keyValue keyName UDDI: Registry organization keyedReference tModelKey keyValue keyName businessEntity categoryBag contacts URL name identifierBag businessServices description businessKey businessService name tModelKey bindingTemplates description serviceKey contact e-mail address phone JA-SIG Workshop Series •RegistryUDDI: SOAP API API •Get methods Find methods • get_tModelDetail • get_bindingDetail • •get_serviceDetail get_businessDetail • •find_tModel find_binding • find_service • •find_business • Inquiry API Inquiry • • Save methods Save • • Delete methods Delete • delete_tModel • delete_binding • delete_service • delete_business • save_tModel • •save_binding•save_service•save_business The Meteor Channel: an example of Web services JA-SIG Workshop Series Meteor inanutshell… DETAIL Value Entered Value Entered $XX,XXX.XX $X,XXX.XX $X,XXX.XX $X,XXX.XX $XXX.XX $XXX.XX $XXX.XX Value Entered $XX,XXX.XX $X,XXX.XX $X,XXX.XX $X,XXX.XX $XXX.XX $XXX.XX $XXX.XX XML Lender JA-SIG Workshop Series Student Student Diagram ofMeteor Concept Web Services HTML Access Provider Access Provider Meteor XML Data Provider Data Provider JA-SIG Workshop Series As implemented ... Standard Standard Browser Browser Web Services Secure HTML uPortal Meteor uPortal Meteor SOAP SOAP Secure XML Meteor Database Database Meteor Meteor SOAP SOAP JA-SIG Workshop Series Data frommultiple sources,locations JA-SIG Workshop Series Meteor Channel intheuPortal The End

Justin Tilton [email protected]