280 likes | 387 Views
Service Pattern & Data Model. Goals. To create interoperable and sustainable message payloads and Web service definitions To support integration with or without an ESB To avoid unnecessary major code change. Key Architecture Considerations.
E N D
Goals • To create interoperable and sustainable message payloads and Web service definitions • To support integration with or without an ESB • To avoid unnecessary major code change
Key Architecture Considerations • Decoupling of end-point connections and business semantics • Guaranteed delivery • Managed integration • Process orchestration where necessary • End point compliance to common business semantics and syntax for information exchange to the public (enterprise) • End point compliance to service patterns (interaction patterns, naming and structure patterns, and message exchange patterns) • Minimal business logic and transformation within the integration layer • Map to IEC TC57 WG14 verbs
Send - to provide (send) information (business object) for public (enterprise) consumption. To be invoked by the system of record for the business object and only when the state of the business object has changed. Receive – to consume (receive) information (business object) from an external source. Request – to request another party to perform a specific service Execute – to run a service provided to the public, which may include a state change request or a query request. Reply – to reply with the result of the execution of a service (by the Execute service) Show - to provide (show) information (business object) for public (enterprise) consumption, when the state of the business object is not changed, by the system of record or other system that has a copy of the same business object. Retrieve– to request specific data of a business object to be provided. Publish - to provide (send) information (business object) for public (enterprise) consumption. To be invoked by the system of record for the business object and only when the state of the business object has changed. Subscribe – to consume (receive) information (business object) from an external source. Service Naming Patterns Used Not Used
IEC 61968 Verb Usage Recommendation Here is a list of IEC 61989 verbs and where and how they are used in the service/operation patterns naming standards: Create ------operation: used in Request, Execute services Change ------operation: used in Request, Execute services Cancel ------operation: used in Request, Execute services Close ------operation: used in Request, Execute services Delete ------operation: used in Request, Execute services Created ------operation: used in Send, Receive, Reply services Changed ------operation: used in Send, Receive, Reply services Closed ------operation: used in Send, Receive, Reply services Canceled ------operation: used in Send, Receive, Reply services Deleted ------operation: used in Send, Receive, Reply services Get ------ not used, equivalent to Retrieve service Show ------ used as the service level pattern. Reply ------ used as the service level pattern. Subscribe ------ used as the service level pattern. Unsubscribe ------ not used.
Integration Requirements CreatedMeterReading (Receive) CreatedMeterReading (Send)
System Integration 1) Integration without ESB or transparent ESB WS
System Integration 2) Integration with ESB WS WS
Service & Operation Naming Convention • Service name: follows <Information Object> name (such as MeterReading). However, if an ESB is involved such service can be deployed in pair such as “SendMeterReading”/”ReceiveMeterReading” following <Service pattern name>+<Information Object> • Operation name: <Operation pattern name>+<Information Object> (such as CreatedMeterReading)
Orchestration Send-Receive Services Interaction Pattern (With ESB) Service Operations Application A Transparent ESB Application B A B Native API or Service Native API or Service S/C S/P S/C S/P T T Guaranteed delivery within ESB, plus internal routing…… Other interested parties……
Send-Receive Services Interaction Pattern (Without ESB) Application A Application B A B Native API or Service Native API or Service S/C S/P T T
Orchestration Request-Reply Services Interaction Pattern (With ESB) Application A Transparent ESB Application B A B Native API or Service Native API or Service S/C S/P S/C S/P T T S/P S/C S/P S/C
Request-Reply Services Interaction Pattern (Without ESB) Application A Application B A B Native API or Service Native API or Service S/C S/P T T S/P S/C
XML Schema Definition • Model driven process <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:m=http://ce.corp.com/ei/2008/06/MeterReadingRequest xmlns:prism="http://ce.corp.com/ei/2008/06" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ce.corp.com/ei/2008/06/MeterReadingRequest" version="1.0"> <xs:import namespace="http://ce.corp.com/ei/2008/06" schemaLocation="_prismEntities.xsd"/> <xs:complexType name="MeterReadingRequest_Type"> <xs:sequence> <xs:element ref="prism:MeterReading"/> </xs:sequence> </xs:complexType> <xs:element name="MeterReadingRequest" type="m:MeterReadingRequest_Type"/> </xs:schema>
Existing Terminology and Metadata Model Driven Process Based on a Enterprise Semantic Model (ESM) Controlled Vocabulary (i.e. wiki, data dictionary, etc.) UML XML Schema
Modeling the ESM – Reference Base • The Reference Base provides a common representation of multiple information sources at the semantic granularity required for an ESM. Enterprise Semantic Model (ESM) CIM Database Metadata MultiSpeak Application Interfaces GML Existing Models XBRL Business Terminology Reference Base
CIM Database Metadata MultiSpeak Application Interfaces SAP Existing Models CIS Business Terminology Modeling the ESM – Semantic Base • The Semantic Base refines the Reference Base to create enterprise-wide semantic elements while adding enterprise standard data types. Semantic Base Entity Semantic Base Reference Base
XBRL Database Metadata GML Application Interfaces CCL Existing Models OAGi Business Terminology Modeling the ESM – Semantic Base Entities in Context • Semantic Base Entities are refined for use within specific contexts. Context Specific Refinement Context Semantic Base Reference Base
Modeling the ESM – Semantic Traceability • A semantic network applied to the ESM provides explicit semantic correlation at the attribute level and facilitates semantically based traversal of the model.
Modeling the ESM – Implementation Models Example Implementation Model Requirement: Model information exchange as a message for application integration where XML Schema is the target implementation technology. Implementation Model
Web Service Definition • Web services defined using Web Service Description Language as part of integration governance. • Web services can be defined following model driven technology such as the one provided by EA. • Or Web services can be defined following a standard template
Web Service Definition Language <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="RequestMeterReading" targetNamespace="http://ce.corp.com/ei/2008/06/RequestMeterReading.wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://ce.corp.com/ei/2008/06/RequestMeterReading.wsdl" xmlns:typeOrig="http://ce.corp.com/ei/2008/06/MeterReadingRequest" xmlns:typeIn="http://ce.corp.com/ei/2008/06/MeterReadingRequest.xsd" xmlns:typeOut="http://ce.corp.com/ei/2008/06/OutputData.xsd"> <wsdl:documentation>A web service to send MeterReadingRequest</wsdl:documentation> <!-- type elements define data types used in this wsdl document using xml schema --> <wsdl:types> <xs:schema targetNamespace="http://ce.corp.com/ei/2008/06/MeterReadingRequest.xsd"> <xs:import namespace="http://ce.corp.com/ei/2008/06/MeterReadingRequest" schemaLocation="MeterReadingRequest.xsd"/> <xs:element name="CreateMeterReading" type="typeOrig:MeterReadingRequest_Type"/> </xs:schema> <xs:schema> <xs:import namespace="http://ce.corp.com/ei/2008/06/OutputData.xsd" schemaLocation="OutputData.xsd"/> </xs:schema> </wsdl:types> <wsdl:message name="createMeterReadingInput"> <wsdl:part name="createMeterReading" element="typeIn:CreateMeterReading"/> </wsdl:message> <wsdl:message name="acknowledgement"> <wsdl:part name="outputData" element="typeOut:OutputData"/> </wsdl:message> <wsdl:message name="faultReturn"> <wsdl:part name="faultInfor" element="typeOut:OutputData"> <wsdl:documentation>fault information</wsdl:documentation> </wsdl:part> </wsdl:message> <wsdl:portType name="MeterReadingRequest"> <wsdl:operation name="CreateMeterReading_Request"> <wsdl:documentation>Send create MeterReadingRequest</wsdl:documentation> <wsdl:input name="createMeterReadingInput" message="tns:createMeterReadingInput"/> <wsdl:output name="createMeterReadingOutput" message="tns:acknowledgement"/> <wsdl:fault name="faultInfor" message="tns:faultReturn"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="MeterReadingRequest_Binding" type="tns:MeterReadingRequest"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="CreateMeterReading_Request"> <wsdl:documentation>Send create MeterReadingRequest</wsdl:documentation> <soap:operation soapAction="http://ce.corp.com/ei/2008/06/RequestMeterReading.wsdl" style="document"/> <wsdl:input name="createMeterReadingInput"> <soap:body use="literal"/> </wsdl:input> <wsdl:output name="createMeterReadingOutput"> <soap:body use="literal"/> </wsdl:output> <wsdl:fault name="faultInfor"> <soap:fault name="faultInfor" use="literal"/> </wsdl:fault> </wsdl:operation> </wsdl:binding> <wsdl:service name="RequestMeterReading"> <wsdl:port name="MeterReadingRequestPort" binding="tns:MeterReadingRequest_Binding"> <soap:address location="http://ce.corp.com/ei/2008/06/RequestMeterReading.wsdl"/> </wsdl:port> </wsdl:service> </wsdl:definitions> <wsdl:types> MeterReadingRequest.xsd <wsdl:message> <wsdl:operation> <wsdl:binding> <wsdl:service>
Web Service Defined following a CMS Standard Template A standard WSDL template is provided with the following strings to be replaced according to the Service Inventory Sheet • _Service_Name_ • Replaced with Service Name in CMS AMI Service Inventory Sheet such as SendActivityRecord • _Information_Object_Name_ • Replaced with Information Object Name in CMS AMI Service Inventory Sheet such as ActivityRecord • _Operation1_Name_ (or 2) • Replaced with one Operation Name in CMS AMI Service Inventory Sheet such as CreatedActivityRecord_Send • _WSDL_Version_ • Replaced with a WSDL version string such as 2008/11 • _Input_XSD_Version_ • Replaced with a WSDL version string such as 2008/10
High Level View of SOA Services RequestMeterReading Note if a Web service is defined based on a template its WSDL should be reverse engineered into EA for deployment and governance.