NdsBeisEsb/src/main/java/com/northgateps/nds/beis/esb/getprsexemptionrefdata/GetPrsExemptionRefDataAdapter.java
/**
     * converts beis response to NDS response
     */
converts beis response to NDS response
converts beis response to NDS response
@Override
    protected GetPrsExemptionRefDataNdsResponse doResponseProcess(GetPRSExemptionReferenceDataResponse externalResponse,
            NdsSoapRequestAdapterExchangeProxy ndsExchange) throws NdsApplicationException {
        GetPrsExemptionRefDataNdsResponse getPrsExemptionRefDataNdsResponse = new GetPrsExemptionRefDataNdsResponse();
        try {
            TypeConverter converter = ndsExchange.getTypeConverter();
            getPrsExemptionRefDataNdsResponse = converter.convertTo(GetPrsExemptionRefDataNdsResponse.class,
                    externalResponse);
            List<ExemptionTypeDetails> exemptionTypeDetailsList = getPrsExemptionRefDataNdsResponse.getExemptionTypeTextList();
            Collections.sort(exemptionTypeDetailsList, new Comparator<ExemptionTypeDetails>() {
                @Override
                public int compare(ExemptionTypeDetails exemptionDetails1, ExemptionTypeDetails exemptionDetails2) {
                    return Integer.valueOf(exemptionDetails1.getSequence()).compareTo(Integer.valueOf(exemptionDetails2.getSequence()));
                }
            });
        } catch (Exception e) {
            throw new NdsApplicationException("Error occured during response conversion process:  " + e.getMessage(),
                    e);
        }
        logger.info("Successfully created the NDS response");
        return getPrsExemptionRefDataNdsResponse;
    }
@ Override protected GetPrsExemptionRefDataNdsResponse doResponseProcess ( GetPRSExemptionReferenceDataResponse externalResponse , NdsSoapRequestAdapterExchangeProxy ndsExchange ) throws NdsApplicationException { GetPrsExemptionRefDataNdsResponse getPrsExemptionRefDataNdsResponse = new GetPrsExemptionRefDataNdsResponse ( ) ; try { TypeConverter converter = ndsExchange . getTypeConverter ( ) ; getPrsExemptionRefDataNdsResponse = converter . convertTo ( GetPrsExemptionRefDataNdsResponse . class , externalResponse ) ; List < ExemptionTypeDetails > exemptionTypeDetailsList = getPrsExemptionRefDataNdsResponse . getExemptionTypeTextList ( ) ; Collections . sort ( exemptionTypeDetailsList , new Comparator < ExemptionTypeDetails > ( ) { @ Override public int compare ( ExemptionTypeDetails exemptionDetails1 , ExemptionTypeDetails exemptionDetails2 ) { return Integer . valueOf ( exemptionDetails1 . getSequence ( ) ) . compareTo ( Integer . valueOf ( exemptionDetails2 . getSequence ( ) ) ) ; } } ) ; } catch ( Exception e ) { throw new NdsApplicationException ( "Error occured during response conversion process:  " + e . getMessage ( ) , e ) ; } logger . info ( "Successfully created the NDS response" ) ; return getPrsExemptionRefDataNdsResponse ; }
converts beis response to NDS response
converts beis response to NDS response