3. Outline Web API Annotation Web API annotation with SWEET Semantic description publishing in iServe Web API Discovery Without lightweight semantics Service search in iServe Web API Invocation Invocation with the Invocation Engine
4. Preparation for Hands-On The material shown in this session will be the basis for the hands-on session afterwards You’ll need Firefox Tabulator extension for Firefox http://dig.csail.mit.edu/2007/tab/
5. Web API Annotation Hands-On The script for the Web API annotation hands-on is available at: http://iserve.kmi.open.ac.uk/wiki/index.php/Hands-on_Session
6. Web API Annotation with SWEET Open SWEET http://sweetdemo.kmi.open.ac.uk/war/MicroWSMOeditor.html Open GeoNamesWebService documentation http://www.geonames.org/export/web-services.html Annotate the CountryCodeoperation
7. Annotation Steps Create Service property Rename it to ‘GeoNames’ Create Operation property Rename it to ‘CountryCode’ Create Input Create Output Create Address Rename address property (not the label itself) to http://api.geonames.org/countryCode Create HTTP Method Rename method property (not the label itself) to GET
8. Annotation Steps Create Parameter ‘lat’ Select the ‘lat’ string the double-click on ‘Parameter’ Rename the parameter to ‘lat’ Create Parameter ‘long’ Create Parameter ‘username’ Create Parameter ‘isoCode’
9. Model References Input lat http://www.w3.org/2003/01/geo/wgs84_pos#lat long http://www.w3.org/2003/01/geo/wgs84_pos#long username http://purl.oclc.org/NET/WebApiAuthentication#Username Output isoCode http://www.geonames.org/ontology#countryCode
10. Liftings and Lowerings Input lowering http://people.kmi.open.ac.uk/ning/Schema/GeoNames/CountryCodeLowering.txt Output lifting http://people.kmi.open.ac.uk/ning/Schema/GeoNames/CountryCodeLifting.txt
11. Publishing the Description Look at the annotated HTML by saving it to your local machine Look at the generated RDF by exporting it to you local machine Publish the description in the semantic Web service repository iServe http://iserve-dev.kmi.open.ac.uk/iserve maria maria Note the service ID!!!
12. Web API Discovery Hands-On The script for the Web API annotation hands-on is available at: http://iserve.kmi.open.ac.uk/wiki/index.php/IServe_Higher_Level_Discovery_API
13. Invocation Example Test Invoke http://iserve-dev.kmi.open.ac.uk/RestServiceInvoke/ServiceInvoke/4619ca73-bb6e-4b99-8114-ad2e2cae3b60/CountryCode?rdfURL=http://iserve.kmi.open.ac.uk/exampleInput/DE.rdf Monitoring Example http://iserve-dev.kmi.open.ac.uk:8080/RestInvoke/service/e8f9548e-bbed-43fe-9d8a-71b7fdefb9da/operation/SearchListingsOperation/data
14. Invocation Look at you service description http://iserve-dev.kmi.open.ac.uk/iserve/page/services/YOURSERVICEID http://iserve-dev.kmi.open.ac.uk/iserve/page/services/db4b646a-4665-4337-9626-4669cc8bce56 Invocation URI http://iserve-dev.kmi.open.ac.uk/RestServiceInvoke/ServiceInvoke/{YOURSERVICEID} /{OperationName}?rdfURL={URLtoInputRDF} http://iserve-dev.kmi.open.ac.uk/RestServiceInvoke/ServiceInvoke/71879558-f1aa-40a1-8a11-5fd3c48a6cde/CountryCode?rdfURL=http://people.kmi.open.ac.uk/ning/Schema/GeoNames/GeoName_input_CY.rdf