210 likes | 333 Views
XML Web Services Practical Implementations. Bob Steemson Product Architect iSOFT plc. Introduction. i.Express Systems Integration (ESI) i.Express CHI Interface National Programme for Information Technology Questions. i.Express Systems Integration. Modern external interface to i.Express
E N D
XML Web ServicesPractical Implementations Bob SteemsonProduct ArchitectiSOFT plc
Introduction • i.Express Systems Integration (ESI) • i.Express CHI Interface • National Programme for Information Technology • Questions
i.Express Systems Integration • Modern external interface to i.Express • Based on XML and Web Services • Builds on existing i.Express business objects and Systems Integration Toolkit (SIT) • Allow services to be added incrementally • Flexible configuration (based on XML)
Support for Trigger Messages • “Pull” service available now • “Push” service under development (v12) • Two possible data formats • Current data at the time of requesting • Before and after images of data at the time of event • Both utilise same code as related enquiry services
SOAP Express Systems Integration Architecture Web Server(IIS) Database ASP Pages VBObjects Browser (IE5.5) Request Handlers 3rd Party Application ESIFrame work Request Handlers Request Handlers Trigger Log Log Handler
ESI Architecture • ESI Framework • Single Entry Point passing credentials, target account, interface name and request type • Input and output data transmitted as XML • Security, Validation, Transformations, Lookups, Exceptions • Dynamically Configured using XML Files • Request Handlers • Called from framework using exposed interfaces • Tightly coupled to Express Business Objects • Handlers can call other services internally • New services added as required • Special handler for trigger log messages • ESI Unit Test Suite • Tests all ESI services with a single report produced • Tests configured using XML files
Schemas • Services use proprietary (iSOFT) schemas • Aligns services to the Express data set • Avoids issues with reference files and coded fields • Similar to NHSiS Schemas • Can use XSLT to match NHSiS schemas exactly • Many services are already available • Further services are being developed as required • i.Express v12 will integrate iSOFT Clinical Manager
Tools Used • Developed using Visual Basic 6 • MSXML v4 (Validating Parser, DOM, XSLT) • MS SOAP Toolkit v2 (ISAPI, WSDL, test clients) • ESI Web Services • Configuration held as XML documents • Interactive Test Program • Load a request document from disk • Edit request document if necessary • Call service and display response • Integrated Test suite • Tests defined as XML documents • Tests may be constructed from sub-tests
What would I change? • Pass request and response documents as DOM elements rather than strings • Further separate security credentials from other parameters • Develop a GUI configuration utility
i.Express CHI Interface • Web Service client to access external Web Service • Web Service proxy accessed from ASP pages • Maintains configuration and logon state information on host database • Automatically logs on as required
Configuration& StateInformation Configuration“Factory” Creates Reads Writes Reads Creates RequestMessage ResponseMessage ConfigurationObjects CHI Proxy SOAP Toolkit NHS Net CHI Service i.Express CHI InterfaceArchitecture ASPPage
Tools Used • Developed using Visual Basic 6 and ASP • MSXML v4 (Validating Parser, DOM, XSLT) • MS SOAP Toolkit v3 (SOAP client) • Uses XSLT to convert from and to external XML • Simplifies serialisation and deserialisation • Simple Emulator for test purposes • Written using VB6 and MS SOAP Toolkit • .NET wrapper to solve namespace issues • Database components written in Data/Basic • Configuration using ASP pages
What would I change? • Should have tested over HTTPS in-house • Everything worked, except that the server certificate was loaded in the wrong store • Difficult to diagnose on-site • Emulator was a bit too simple • Namespaces issue was only apparent late in development
National Program for IT - Requirements • Interfaces to existing laboratory application • Connect to integration hub using web services • Supports HL7 v3 (XML) messaging • Applications use “flat file” interface • Needed yesterday!
National Programme for IT - Solution • .NET Web service to accept request from hub with HL7 message and write details as flat file • .NET NT service to monitor for flat file, convert data to HL7 results message and pass to hub web service • Make use of .NET XML Support where possible • Automatic creation of classes from XSD Schema • Object serialisation and de-serialisation using XmlSerializer class • Builds on ideas developed for CHI Interface
FlatFileOrder XMLOrder FlatFileOrder Writes Reads SOAP FlatFileResults SOAP XMLResults Writes FlatFileResults Reads Laboratory SystemWrappers .NET WebService OrderFile IntegrationHub LaboratorySystem ResultsFile .NET NTService
Development – Order Message • Start with HL7 v3 message specified by NHS IA • Create XSL to extract relevant data into a flatter XML document with no namespaces • Create an XSD schema to describe XSL output • XSD.EXE creates C# message classes from the XSD • Write additional C# code: • Apply XSLT to input document • Use XmlSerializer to read transformed XML into message • Extract data from message objects and write to flat file
Development – Results Message • Create XSD schema for flatter XML document with results data • Create XSL to transform this into HL7 v3 format specified by NHS IA • XSD.EXE creates C# message classes from the XSD • Write C# code • Read data and initialise message objects • Use XmlSerializer to serialise these as XML • Apply XSLT to generate HL7 v3 output
Tools Used • Visual Studio .NET 2003 • C# programming language - could have used VB.NET • Standard web service support • Standard web services client • XSD.EXE to generate message classes • Standard XML support classes including XmlSerializer • XSLT Used to transform to and from HL7 v3 • Internal “flatter” XML that can be automatically serialised and deserialised
Summary • Three different implementations of web services • Show both server and client ends • Both VB6 and .NET (C#) development • ESI – designed for future extensibility • CHI Interface – limited scope to handle small number of request types • NPfIT – rapid development requirements
Questions • Contact Details Bob.Steemson@isoftplc.com