CONNECT: Building an Adapter Les Westberg Copyright All Rights Reserved. 1
Session Agenda Review of CONNECT components Project/source layout Customization of adapter components Demonstration: Replacing the CONNECT API Copyright All Rights Reserved. 2
Assumptions/Expectations Familiarity with… Java Service Oriented Architecture (SOA) NetBeans GlassFishESB Copyright All Rights Reserved. 3
Review of CONNECT Components Copyright All Rights Reserved. 4
CONNECT Architecture Messages From NHIN Copyright All Rights Reserved. 5
CONNECT Architecture Messages to NHIN Copyright All Rights Reserved. 6
Project / Source Layout Copyright All Rights Reserved. 7
Source Code Directory Structure DIRECTORYDESCRIPTION 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\AdapterCONNECT adapter source C:\projects\NHINC\Current\Product\Production\Common Source used by both gateway and adapter C:\projects\NHINC\Current\Product\Production\GatewayCONNECT gateway source C:\projects\NHINC\Current\ThirdParty Contains third party libraries needed to compile Copyright All Rights Reserved. 8
Project Naming Conventions PROJECTS ENDING IN…TYPE OF PROJECT EJB or EjbEnterprise java bean LibJava library CAOpenESB composite application DAO Data Access (Note some data access objects are defined as Lib) BPELBPEL source code JAXBLibrary containing JAXB bindings Copyright All Rights Reserved. 9
Special Projects PROJECT/DIRECTORYPURPOSE 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 Copyright All Rights Reserved. 10
Web Service WSDL File Naming Conventions Copyright All Rights Reserved. 11 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 Rest of the name identifies the service Example –AdapterComponentMpi.wsdl
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 Copyright All Rights Reserved. 12
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 Copyright All Rights Reserved. 13
Example internalConnectionInfo.xml 1.1 DoD DoD Description subjectdiscovery nhincsubjectdiscovery NHIN-CONNECT Internal Subject Discovery Copyright All Rights Reserved. 14
Customization of Adapter Components Copyright All Rights Reserved. 15
Adapter Components COMPONENTTECHNOLOGY Document RepositoryEJB within adapter composite application Document RegistryEJB within adapter composite application MPIEJB Policy EngineBPEL within adapter composite application Subscription RepositoryBPEL within adapter composite application Re-identificationEJB Copyright All Rights Reserved. 16
Steps for Customizing an EJB Create an EJB that implements the correct web service Undeploy the CONNECT reference EJB Deploy the customized EJB Copyright All Rights Reserved. 17
Steps for Customizing an EJB within a Composite Application Create an EJB that implements the correct web service Undeploy AdapterCA Remove the EJB JBI entry from AdapterCA Add the customized EJB JBI entry to AdapterCA Deploy AdapterCA Note: When using BPEL or deploying within a CA, you cannot have both the reference implementation and the customized implementation deployed at the same time in the same instance of GlassFish. This is because the web services are constructed using “Document Literal” bindings. Copyright All Rights Reserved. 18
Steps for Customizing a BPEL within a Composite Application Modify or replace the BPEL in the AdapterBPEL project Undeploy AdapterCA Clean build AdapterCA Redeploy AdapterCA Note: When using BPEL or deploying within a CA, you cannot have both the reference implementation and the customized implementation deployed at the same time in the same instance of GlassFish. This is because the web services are constructed using “Document Literal” bindings. Copyright All Rights Reserved. 19
DEMONSTRATION Replacing CONNECT MPI Copyright All Rights Reserved. 20
Demo: Replace with a Customized MPI CONNECT 2.0 Adapter Reference MPI Simple XML text file (mpi.xml) Service reads and writes to this text file Demonstration Replace MPI with a MySQL database implementation Copyright All Rights Reserved. 21
Demonstration The following steps have been completed previously –Installation of gateway and adapter –Internal self-test of gateway and adapter –Installation and population of MySQL database for the MPI (§5.2) –Library using hibernate to store/retrieve from the MPI database (§5.3) –Add new transform to transforms library (§5.4) Steps shown in the demonstration –Creation of MPI EJB (§5.5) –Fix EJB build.xml file (§5.5) –Code to call the MPI repository library (§5.6) –Deployment to GlassFish (§5.7) –Running SoapUI tests to verify the replacement of the component (§5.8) Copyright All Rights Reserved. 22
Demonstration Copyright All Rights Reserved. 23
Will be Posted on the Release 2.0 of Web Site Adapter MPI Example Copyright All Rights Reserved. 24
CONNECT Seminar Presentations are Available for Download Online at Copyright All Rights Reserved. 25