Chapter 7. Scenario: Data transformation and security 169
message is parsed to an X12 string format for Legacy 2. Each new
message is then routed to its destination.
b. The OpenAccount message flow transforms the message using XSL
translation and determines the destination for the message based on the
loan amount requested.
4. The message structures are parsed using the following wire protocols:
a. The VerifyCredit message flow delivers the new messages to the Legacy 1
and Legacy 2 services by using WebSphere MQ.
b. The OpenAccount message flow is encrypted by using a 64-bit algorithm
(DES) and delivered to either the Legacy1 or Legacy 2 application by
using WebSphere MQ. The application of the enterprise information
system responds with an encrypted XML message that contains a simple
true|false flag that indicates whether the client has the appropriate score
necessary for a new loan account.
The enterprise information systems are emulated in this scenario using a
message flow.
7.1.2 Service message formats
In this scenario, we illustrate how to use the following resources for
transformation:
? A Web Services Description Language (WSDL) file that contains Web
Services Interoperability Organization (WS-I) definitions, messages, and
bindings
? Two schemas (XSD files) to format the internal parts of the message
(application of the enterprise information system)
? An XSL file to automatically transform a XML message to another
The message from WebSphere Process Server is a SOAP message,
implementing the SOAP 1.1 specification. Messages that are sent to the
back-end services are plain XML messages.
170 Using IBM WebSphere Message Broker as an ESB with WebSphere Process Server
The messages are defined in the bank_definitions.xsd file for the bank.wsdl port
or types used by the enterprise information systems in the VerifyCredit message
flow. The legacy.xsd file is used for the enterprise information systems in the
OpenAccount message flow as illustrated in Figure 7-3.
Figure 7-3 Service interface organization
Bank_definitions schema definition
The bank_definitions.xsd schema file defines the elements in use by the
messages that are defined in the bank.wsdl WSDL file. WebSphere Process
Service uses the bank_definitions schema implementing four elements with four
different complex types:
? VerifyCreditType complex type
The element structure that is necessary to send the client data to the
validation systems running on the back office (Example 7-1)
Example 7-1 VerifyCredity complex type structure
<complexType name="VerifyCreditType">
<sequence>
<element name="client-data">
<complexType>
<sequence maxOccurs="1">
<element name="FrName" type="string" minOccurs="1" />
<element name="MidName" type="string" minOccurs="1" />
<element name="Surname" type="string" minOccurs="1" />
<element name="DtBirth" type="date" minOccurs="1" />
<element name="LastName" type="string" minOccurs="1" />
<element name="SSN" type="string" minOccurs="1" />
Chapter 7. Scenario: Data transformation and security 171
<element name="Address" type="string minOccurs="1" />
</sequence>
</complexType>
</element>
</sequence>
</complexType>
? OpenAccountType complex type
The element structure that is used to the select the desired loan amount,
duration, and tax rate (Example 7-2)
Example 7-2 OpenAccount complex type structure
<complexType name="OpenAccountType">
<sequence>
<element name="SSN">
<simpleType>
<restriction base="string">
<pattern value="[A-Z][0-9]"></pattern>
</restriction>
</simpleType>
</element>
<element name="AskedAmount" type="float" />
<element name="Duration" type="integer" />
<element name="MonthlyTax" type="float" />
</sequence>
</complexType>
? submitFaultType complex type
Defines the fault elements that are used when a business exception occurs,
during the processing of the message flows (Example 7-3)
Example 7-3 submitFault complex type structure
<complexType name="submitFaultType">
<sequence>
<element name="SSN" type="string" />
<element name="RC" type="integer" />
<element name="Cause" type="string" />
<element name="Description" type="string" />
</sequence>
</complexType>
172 Using IBM WebSphere Message Broker as an ESB with WebSphere Process Server
? ackOAType complex type
Defines only one Boolean simple element that is used to return a statement to
the requestor (WebSphere Process Server) that specifies whether the open
account request was approved (Example 7-4)
Example 7-4 ackOA complex type
<complexType name="ackOAType">
<sequence>
<element name="ackOA" type="boolean" />
</sequence>
</complexType>
These elements represent the entire service virtualization between WebSphere
Process Service and WebSphere Message Broker. As part of the service
decomposition, the message flow uses the legacy.xsd schema to transform the
incoming messages to their expected legacy formats.
Legacy.xsd schema
The legacy.xsd schema has defined only two complex types: legacy_bank_req
for the input request and
legacy_bank_res for the output response (Example 7-5).
Example 7-5 Legacy request and response complex types
<complexType name="legacy_bankReqType">
<sequence>
<element name="batch_data">
<complexType>
<attribute name="ssn" type="string" use="required" />
<attribute name="amount" type="float" use="required" />
</complexType>
</element>
</sequence>
</complexType>
<complexType name="legacy_bankResType">
<sequence>
<element name="approved" type="boolean" />
</sequence>
</complexType>
Chapter 7. Scenario: Data transformation and security 173
Bank Service interface definition
The open loan account process has two service interfaces, one for the business
process and one for the WebSphere Process Server or WebSphere Message
Broker interoperability channel.
The external process interface is called
LoanPrcInterface, which has one
request-response operation called
loanOperation (Example 7-6). Messages that
are exchanged between clients and the business process use this interface.
Example 7-6 LoanPrcInterface port
<wsdl:portType name="LoanPrcInterface">
<wsdl:operation name="loanOperation">
<wsdl:input message="tns:loanOperationRequestMsg"
name="loanOperationRequest"/>
<wsdl:output message="tns:loanOperationResponseMsg"
name="loanOperationResponse"/>
</wsdl:operation>
</wsdl:portType>
The interface for messages exchanged between the business process and the
message flow in WebSphere Message Broker is called
BankPortType. In the
sample application in Example 7-7, this interface is stored in bank.wsdl. The
interface has two operations. The first operation is called
BankVerifyCredit and is
used to deliver the client data to the broker’s VerifyCredit message flow. The
second operation is called
BankOpenAccount and is used to send the loan
account details and get a response (either true/false or success/failure flag).
Example 7-7 Internal bank operations using WebSphere Message Broker
<wsdl:portType name="BankPortType">
<wsdl:operation name="BankVerifyCredit">
<wsdl:documentation>
Verifies a client credit.
</wsdl:documentation>
<wsdl:input message="tns:VerifyCreditMsg"/>
</wsdl:operation>
Messages: The messages of the external process interface contain the
elements that are defined inside the bank_definitions.xsd schema. The Input
receives the VerifyCredit, and the output receives the ackOA element parts.
Operation similarities: These two operations are in the same port and are
both bound to an HTTPS call.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.16.229