1 / 18

Web Services and XML Applications for the Transit Service Information Portal

Web Services and XML Applications for the Transit Service Information Portal. Webinar March 26 2010. Manny Insignares manny.insignares@consystec.com (212) 687-7911. Presentation Objectives. XML and related Standards W3C (World Wide Web Consortium) IETF – Internet Engineering Task Force

amos
Télécharger la présentation

Web Services and XML Applications for the Transit Service Information Portal

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. Web Services and XML Applicationsfor the Transit Service Information Portal Webinar March 26 2010 Manny Insignares manny.insignares@consystec.com (212) 687-7911

  2. Presentation Objectives • XML and related Standards • W3C (World Wide Web Consortium) • IETF – Internet Engineering Task Force • Web Services Concept • WSDL (Web Services Description Language) • Example Web Service Application

  3. Why the Web Services Approach is Good! • standards based • improve the quality of projects deployed • improved resource utilization • improves cost substitution in markets • multiple vendor solutions • define interfaces that enable integration • enables system interoperability

  4. XML – Extensible Markup Language • The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. • Its goal is to enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. • XML has been designed for ease of implementation and for interoperability with both SGML and HTML.

  5. XML Schema • This document specifies the XML Schema Definition Language, which offers facilities for describing the structure and constraining the contents of XML documents. • The schema language, which is itself represented in an XML vocabulary and uses namespaces.

  6. WSDL – Web Services Description Language • WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. • The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint. • Endpoints are combined into abstract services. • WSDL is extensible to allow description of endpoints and their messages regardless of what message formats or network protocols are used to communicate. • The bindings described in this document describe WSDL in conjunction with • SOAP 1.1, • HTTP GET/POST, and • MIME.

  7. Example Request-Response Sequence Diagram

  8. Web Services Conceptfor Prediction Request Prediction Server Prediction Request (XML Message) Prediction Request Interface Handler Prediction Result Set (XML Message) System Interface Implementation is Vendor Specific System Interface Specification is Vendor Neutral The WSDL Specifies

  9. Center A System Center B System OP1 OP1 MSG Output OP2 MSG Input OP2 MSG Output MSG Input MSG Output MSG Input MSG Output MSG Input MSG Output MSG Output MSG Input OP1 MSG Input OP1 MSG Output MSG Output MSG Input Center C System OP2 OP2 Center D System Regional System Integration and Interoperability TCP/IP Network MSG Input Each center controls what information and control they make available to other centers.

  10. Prediction Result Set XML Schema Definition <xsd:complexType name="PredictionStructure"> <xsd:sequence> <xsd:element name="locID" type="xsd:string"/> <xsd:element name="estimatedTime" type=“xsd:time"/> <xsd:element name="estimateType" type="xsd:string"/> <!-- enumerated [eta, etd] --> <xsd:element name="scheduledTime" type="xsd:integer"/> <!-- SDP Units --> <xsd:element name="agencyID" type="xsd:string"/> <xsd:element name="vehicleID" type="xsd:string"/> <xsd:element name="blockID" type="xsd:string" minOccurs="0"/> <!-- not used for rail --> <xsd:element name="routeID" type="xsd:string"/> <xsd:element name="routeDirection" type="xsd:integer"/> <!-- enumerated [1,2] --> <xsd:element name="lastStopID" type="xsd:string"/> <xsd:element name="departed" type="xsd:boolean"/> <!– valide values [true, false, 1, 0] --> <xsd:element name="nextStopID" type="xsd:string"/> <xsd:element name="serviceStatus" type="xsd:string"/> <!-- enumerated [observed, not available, schedule, delay, cancel] --> <xsd:element name="headsign" type="xsd:string"/> <xsd:element name="size" type="xsd:integer" minOccurs="0"/> <!-- not used for bus --> <xsd:element name="scheduleVersionID" type="xsd:string"/> <xsd:element name="revisionNo" type="xsd:string"/> <xsd:element name="routeDepotVersion" type="xsd:string" minOccurs="0"/> </xsd:sequence> </xsd:complexType>

  11. XML Message Prediction Result Set XML Schema Definition of Message

  12. Prediction Service in the TSIP WSDL<types> & <message> section • <types> • Imports definitions from the RTDP XML Schema • <message> • Defines Message Names and Request Parameters • References elements in the RTDP XML Schema

  13. Prediction Service in the TSIP WSDL<operation> section • <operations> • input message • output message • fault message • The operations define the order of messages, which ones, and message to return if an error occurs.

  14. Prediction Service in the TSIP WSDL<binding> section • <binding> • Protocol • HTTP ‘GET’ • HTTP ‘POST’ • Location • Used to construct the URL target for the service • Value is ‘Prediction’ • Input message is urlEncoded • Output message is XML • Fault message is XML • The binding defines the protocol to use for a particular operation (i.e., message transfer).

  15. Prediction Service in the TSIP WSDL<service> section • <service> • Defines a name for the service • <http:address>* • The service is the connection point. *Note: URL is formed by concatenating the ‘location’ from the binding section to the ‘port’ in the service section: e.g. http://www.tsip.com/ws/Prediction

  16. Prediction Request The HTTP makes the Request! The URL contains the request parameters. Limit is 128 characters if using URL like this, but there are ways around this. • URL Params: • locIDs • agencyID • typeRequest • routeRef • appID http://localhost/RTDP/Prediction.php?locIDs=1001&agencyID=100.1&typeRequest=routeIDrouteID&routeRef=M15,1&appID=12345678901234567890

  17. Prediction Result Set

  18. Look What Another Agency is Doinghttp://www.its.washington.edu/its_ws.html#avl

More Related