You are on page 1of 5

Prerequisite:

You need to create 4 SOAP web service and 1 Rest Web Service and 1 Database.
For In all the web services generate random score and return it.

Rest Web Service is called NSDL.


4 SOAP: cibil, experian, multibureau, blaze.

CREATE TABLE [dbo].[Loan](


[Id] [int] IDENTITY(1,1) NOT NULL,
[AP_APPLNO] [nvarchar](100) NOT NULL,
[AP_BRANCH] [int] NOT NULL,
[M_BRANCHNAME] [nvarchar](100) NOT NULL,
[AP_TITLE] [nvarchar](10) NOT NULL,
[AP_FNAME] [nvarchar](50) NOT NULL,
[AP_MNAME] [nvarchar](50) NULL,
[AP_LNAME] [nvarchar](50) NOT NULL,
[AP_BIRTHDT] [datetime] NULL,
[AP_APPLDT] [datetime] NULL,
[TYPEOFLOAN] [nvarchar](50) NULL,
[LOANREQUESTED] [decimal](18, 2) NULL,
[AP_BUSI_PROD_ID] [int] NULL,
[M_PRODNME] [nvarchar](50) NULL,
[C_SCORE] [decimal](18, 2) NULL,
[APP_STATUS] [nvarchar](50) NULL,
[NSDL_SCORE] [decimal](18, 2) NULL,
[BLAZE_SCORE] [decimal](18, 2) NULL,
[MULTI_SCORE] [decimal](18, 2) NULL,
[exp_score] [decimal](18, 2) NULL,
CONSTRAINT [PK_Loan] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
Function 1:

In this function generate random number and store it with “choice” key and return the
response.
Function 2:

If choice==1 then call NSDL web service get the random number from response then update
it in database "update loan set nsdl_score=? where AP_APPLNO=?" and remove the
choice key also add “nsdl_score” and “type:others” in response.

If choice==2 then call cibilweb service get the random number from response then update it
in database "update loan set C_SCORE=? where AP_APPLNO=?" and remove the choice
key also add “C_SCORE” and “type:cibil” in response.

If choice==3 then call experian web service get the random number from response then
update it in database "update loan set exp_score=? where AP_APPLNO=?" and remove
the choice key also add “exp_score” and “type:experian” in response.
Function 3:

In this call blaze web service get the random number from response then update it in database
"update loan set BLAZE_SCORE=? where AP_APPLNO=?" and remove the “type” key also
add “blaze_score”.
Function 4:
In this call multibureau web service get the random number from response then update it in
database "update loan set MULTI_SCORE=? where AP_APPLNO=?" and remove the “type”
key also add “multi_score”.

You might also like