XML Web Services Practical Implementations

Download Report

Transcript XML Web Services Practical Implementations

XML Web Services
Practical Implementations
Bob Steemson
Product Architect
iSOFT plc
www.isoftplc.com
1
Introduction
 i.Express Systems Integration (ESI)
 i.Express CHI Interface
 National Programme for Information Technology
 Questions
2
THE HEALTH iNNOVATOR
www.isoftplc.com
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)
3
THE HEALTH iNNOVATOR
www.isoftplc.com
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
4
THE HEALTH iNNOVATOR
www.isoftplc.com
Express Systems
Integration Architecture
Web Server(IIS)
Browser
(IE5.5)
Party
Application
ASP
Pages
3rd
SOAP
ESI
Frame
work
VB
Objects
Request
Request
Handlers
Request
Handlers
Handlers
Log
Handler
5
Database
THE HEALTH iNNOVATOR
www.isoftplc.com
Trigger Log
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
6
THE HEALTH iNNOVATOR
www.isoftplc.com
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
7
THE HEALTH iNNOVATOR
www.isoftplc.com
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
8
THE HEALTH iNNOVATOR
www.isoftplc.com
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
9
THE HEALTH iNNOVATOR
www.isoftplc.com
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
10
THE HEALTH iNNOVATOR
www.isoftplc.com
i.Express CHI Interface
Architecture
ASP
Page
Creates
Configuration
“Factory”
Reads
Writes
Request
Message
CHI Proxy
11
Response
Message
SOAP Toolkit
THE HEALTH iNNOVATOR
www.isoftplc.com
Configuration
& State
Information
Configuration
Objects
NHS
Net
CHI Service
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
12
THE HEALTH iNNOVATOR
www.isoftplc.com
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
13
THE HEALTH iNNOVATOR
www.isoftplc.com
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!
14
THE HEALTH iNNOVATOR
www.isoftplc.com
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
15
THE HEALTH iNNOVATOR
www.isoftplc.com
Laboratory System
Wrappers
Flat
File
Order
XML
Order
.NET Web
Service
Writes
Order
File
Laboratory
System
Integration
Hub
XML
Results
16
Flat
File
Order
Flat
File
Results
.NET NT
Service
Reads
THE HEALTH iNNOVATOR
www.isoftplc.com
Results
File
Flat
File
Results
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
17
THE HEALTH iNNOVATOR
www.isoftplc.com
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
18
THE HEALTH iNNOVATOR
www.isoftplc.com
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
19
THE HEALTH iNNOVATOR
www.isoftplc.com
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
20
THE HEALTH iNNOVATOR
www.isoftplc.com
Questions
 Contact Details
[email protected]
21
THE HEALTH iNNOVATOR
www.isoftplc.com