Building an Adapter

Download Report

Transcript Building an Adapter

Building an
Adapter
1
Session Agenda
Review of CONNECT components
Project/source layout
Customization of adapter components
2
Assumptions/Expectations
Familiarity with…
• Java
• Service Oriented
Architecture (SOA)
• NetBeans
• GlassFishESB
3
Review of CONNECT
Components
4
CONNECT Architecture
Messages From NHIN
5
CONNECT Architecture
Messages to NHIN
6
Project / Source Layout
7
Source Code Directory Structure
8
DIRECTORY
DESCRIPTION
C:\projects\NHINC\Current\Product
Contains master ant script that
compiles the CONNECT
gateway and adapter
C:\projects\NHINC\Current\Product\Production
This project will contain sub
folders that separate the code by
its primary location (i.e.
Common, Gateway, Adapter)
C:\projects\NHINC\Current\Product\Production\Adapter
CONNECT adapter source
C:\projects\NHINC\Current\Product\Production\Common
Source used by both gateway
and adapter
C:\projects\NHINC\Current\Product\Production\Gateway
CONNECT gateway source
C:\projects\NHINC\Current\ThirdParty
Contains third party libraries
needed to compile
Project Naming Conventions
PROJECTS ENDING IN…
TYPE OF PROJECT
Web
POJO Web Services
Lib
Java library
Proxy
Spring Component Proxy Projects
DAO
Data Access (Note some data access
objects are defined as Lib)
GUI
Web application
EJB or Ejb
9
Enterprise java bean (mainly in ESC – not
many left)
Project Creation Guidelines
» WIKI page describes the projects
– http://developer.connectopensource.org/display/CONNECTWIKI/Proje
ct+Creation+Guidelines
10
Special Projects
PROJECT/DIRECTORY
11
PURPOSE
Common\Interfaces
Contains all of the WSDL and schemas that
are being used within CONNECT
Common\Properties
Contains property files and configuration files
that are used within CONNECT (These are
used in:
C:\Sun\AppServer\Domains\Domain1\Config
and
C:\Sun\AppServer\Domains\Domain1\Config\N
hin
Web Service
WSDL File Naming Conventions
» First part identifies the type of service
– Adapter: Services on the adapter
– Entity: Services on the gateway which are called by the adapter
– Nhinc: Services on the gateway that are internal to the gateway
– Nhin: NHIN services hosted or called by the CONNECT gateway
» If “component” identified in second part…
– NhincComponent: Identifies internal components to the gateway
– AdapterComponent: Identifies services on the Adapter Service Bus
• Used to customize an adapter service
– EntityComponent: Identifies gateway internal services which orchestrate a message
» Adapter/Entity interfaces may contain word Secured/Unsecured
– Identifies whether the interface represents the secured or unsecured interface
» Rest of the name identifies the service
» Example
– AdapterComponentSecuredMPI.wsdl
12
XML Schema Layout and Naming
Conventions
» Directory: Interfaces\src\schemas
» First level of hierarchy: identifies organization or type of
schemas
» schemas\nhinc: CONNECT schemas
» schemas\nhinc\common: used in gateway and adapter
» schemas\nhinc\gateway: used in gateway
» schemas\nhinc\hl7: schemas to combine HL7 messages
13
Connection Manager
» Manages endpoint URLs
– NHIN services
– Replaceable services
» Two points of configuration
– UDDI
• UDDI Update Manager service
• uddiConnectionInfo.xml: CONNECT service information cache
– Do not modify this file by hand
– Internal
• Used to override UDDI settings – settings here take precedence over UDDI
• Used for non UDDI supported services
• internalConnectionInfo.xml
14
Example internalConnectionInfo.xml
<?xml version="1.0" encoding="UTF-8"?>
<InternalConnectionInfos>
<internalConnectionInfo>
<homeCommunityId>1.1</homeCommunityId>
<name>DoD</name>
<description>DoD Description</description>
<services>
<service>
<name>subjectdiscovery</name>
<description>subjectdiscovery</description>
<endpointURL>
https://localhost:8181/PIXConsumer_Service/SubjectDiscovery
</endpointURL>
</service>
<service>
<name>nhincsubjectdiscovery</name>
<description>NHIN-CONNECT Internal Subject Discovery</description>
<endpointURL>
http://localhost:9080/NhinConnect/NhincSubjectDiscovery
</endpointURL>
</service>
</services>
</internalConnectionInfo>
</InternalConnectioninfos>
15
Customization of Adapter
Components
16
Adapter Service Bus Components
17
COMPONENT
WSDL
Document Repository
AdapterDocRetrieveSecured.wsdl
Document Registry
AdapterDocQuerySecured.wsdl
MPI
AdapterComponentSecuredMpi.wsdl
Policy Engine
AdapterPolicyEngineSecured.wsdl (or)
AdapterPolicyEngineOrchestrator.wsdl
Subscription Repository
AdapterComponentSubscriptionRepository.wsdl
Subscription Management
AdapterSubscriptionManagementSecured.wsdl
Notification
AdapterNotificationConsumerSecured.wsdl
Document Submission (XDR)
AdapterComponentXDRSecured.wsdl
XDR Async Request
AdapterXDRRequestSecured.wsdl
XDR Async Response
AdapterXDRResponseSecured.wsdl
Re-identification
AdapterSubjectDiscoverySecured.wsdl
Steps for Customizing an Adapter
Component
Create a Web Service that implements the
correct WSDL
Deploy the web service
Update internalConnectionInfo.xml with the
URL for the customized WSDL
18