CSC 513 Project 3: Validate XML
For this assignment, you will be defining the XML schemas for each of
the messages to be sent between a customer, a serviceProvider (e.g.,
customer's bank) , and the BigBank. BigBank is the name of a financial institution,
which provides funds transfer service to either its customers or the
service providers.
-
The customer is always the consumer of the funds transfer service; BigBank
is always a provider; the serviceProvider is a provider to customers,
and
a consumer to the BigBank.
All messages contain complete contact information for both consumer and
provider along with a date sent. Contact information includes items such
as name, address, phone number, and email. Basically, each message will
include the contact information of the sender (consumer) and the recipient
(provider).
- Messages travel between consumer and provider. In our scenario, the
relationships are as below.
customer <----> serviceProvider <----> BigBank
-
Providers transfer money from one account to another. Each account
has the following information:
accountId, bankInfo, type of the account (Deposit, Card, or Loan),
balance, transfertoInfo (min, max), transferfromInfo (min, max); where
-
bankInfo has bankId, bankname, country code, country name, branchId,
branchName;
-
balance is a currency amount (curAmount). The curAmount has amount,
currency
code
(ISO currency codes), and an optional currencyRate field if the currency
code of the the origin account is different than the destination account,
- transfertoInfo has the minimum and maximum currency amount that can be
transfered to this account, and transferfromInfo has the minimum and
maximum currency amount that can be transfered from this account.
The messages to be encoded are:
- ExRateInquiry (Exchange Rate Inquiry): A consumer (customer or
the serviceProvider) asks for the fee of fund transfer service; the
message should include customer identifier, the
origin account (accountFrom), the destination account (accountTo), due
date of the transaction, and amount as curAmount that is quoted.
- ExRateSettlement (Exchange Rate Settlement): The provider
(BigBank or the serviceProvider)
submits the information about the fee of any number of exchange rate
transfer; the message includes references to ExRateInquiry messages, fee
type (Forex, Late, Transaction, Interchange), amount of the fee
as curAmount,
the amount that is quoted as curAmount (the currencyRate field of
the curAmount should be filled by the provider if the currency codes of
the origin and destination accounts are different) for each referenced
ExRateInquiry. Each message should
also include an expiration date, maximum and minimum fees that can be
charged by the provider per settlement. One settlement can be used by
many fund transfer requests.
- FundTransfer:
A consumer requests to transfer money from one account to another;
the message should include a session identifier, customer identifier,
AccountFrom, AccountTo, status of the transfer (e.g., delivered to
BigBank, authorized by BigBank, pending by the customer`s bank, pending by
the BigBank), due date, amount that is to be transfered as curAmount,
delivery method (default is channel) and a reference to a ExRateSettlement.
Notes
In this assignment, you are going to give each schema a different
targetNamespace. With the below design, you can define common types
such as Account and CurAmount in Inquiry.xsd and reference them later in
Settlement.xsd.
Inquiry.xsd
Settlement.xsd
Settlement.xml (conforming to the multiple targetNamespaces)
Deliverables
- Submit an XML schema for the ExRateInquiry (Inquiry.xsd), and
ExRateSettlement (Settlement.xsd) message types. You do not need to
submit XML schema for FundTransfer message type since it is trivial
if you can encode the first two message types
- Submit an example xml file that instantiates each schema, i.e.,
Inquiry.xml and Settlement.xml, respectively.