Skip to content

Build a Spring Rest Service that consumes a bulk file and returns the individual responses.

Notifications You must be signed in to change notification settings

tquaile123/SpringFileMutation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Spring File Mutation

Build a Spring Boot 2+ Service using Maven that consumes a xml file(see data.xml) and returns a response containing information about the individual entries in the xml file.

Information

The data.xml is broken into individual sets of information identified by the </PersAutoPolicyQuoteInqRq>tag. Assume this solution will be "production ready" and should contain propper logging and test coverage. Keep in mind that xml file sizes may varry so scalability should be considered.

The xpaths to build the responses can be found bellow :
Policy Number - //PolicyNumber
Customer Name - //InsuredOrPrincipal[InsuredOrPrincipalInfo/InsuredOrPrincipalRoleCd='Insured']/GeneralPartyInfo/NameInfo/CommlName/CommercialName
Policy Type - //PersPolicy/LOBCd
Total Premium - //PersPolicy/CurrentTermAmt/Amt
Vehicle Collection - //PersAutoLineBusiness/PersVeh
Driver Collection - //PersAutoLineBusiness/DriverInfo

Response Format

The response should contain an array of the following information extracted from the file and a count of the number of entries:

{
"policyNumber": String,
"customerName": String,
"PolicyType": String,
"totalPremium": Float,
"vehichles": [{
"make" : String,
"model": String,
"liscenceNumber": String
}...],
"drivers" : [{
"driverName": String,
"age": Integer
}...]

Blah Blah

About

Build a Spring Rest Service that consumes a bulk file and returns the individual responses.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published