Implementing a Mortgage Loan Application with Fault
This sample shows a service implementation that invokes fault using a service and reference binding.
In this sample, the service implements a simplified online mortgage broker application. The borrower requests a loan through a broker and the broker processes the loan request using one of the third-party partner services. The borrower can specify the preferred third-party provider. The third-party partner services request credit rating of the borrower from a credit check service and in turn replies with fault message if requested loan amount is not valid.
Procedure
Result
Bank_A and Bank_C, when invoked, returns fault message Requested Loan Amount is not valid. Loan amount should be more than 25000 and less than 100000.
Understanding the Configuration
The following shared resources are defined in the project:
- HTTPConnectorResource.httpConnResource: The HTTP Connection Shared Resource that contains the transport configuration.
- BankLoanSchema.xsd: The XSD Schema file that contains the definition of the types used by the Bank web service's interface.
- BrokerSchema.xsd: The XSD Schema file that contains the definition of the types used by the Broker web service's interface.
- CreditCheckSchema.xsd: The XSD Schema file that contains the definition of the types used by the Credit Check web service's interface.
- BankWSDLAbstract.wsdl: Common service interface to request for a loan from a bank.
- CreditCheckWSDL.wsdl: The WSDL file that describes the Credit Check web service.
- BrokerWSDL.wsdl: The WSDL file that describes the Mortgage Broker web service.
The example consists of the following:
- CreditCheckService: Provides services for loan approvals. In this example, the borrowers can choose one of the two banks, Bank A and Bank C. These services call CreditCheckService to approve or reject a loan request or to verify if the requested loan amount is not valid.
- Bank_A_Process / Bank_C_Process: Provides service to get the credit rating for a customer by calling a process that generates a credit score or reply with a fault message if the requested loan amount is invalid.
- mortgageBroker.LoanRequestProcess: Provides service to request for a loan through the Mortgage Broker. The broker in turn checks with the preferred bank for the loan.
- LoanRequestProcess: Allows the borrower to issue a loan request. The borrower can specify Name, Amount, and Preferred Bank. Depending on the Preferred Bank value the respective Bank Process is invoked.
Copyright © Cloud Software Group, Inc. All rights reserved.