NdsBeisEsb/src/main/java/com/northgateps/nds/beis/esb/registerexemption/RegisterPrsExemptionPersistenceAdapter.java
/**
     * converts NDS request to BEIS request
     */
converts NDS request to BEIS request
converts NDS request to BEIS request
@Override
    protected RegisterPRSExemptionRequest doRequestProcess(RegisterPrsExemptionNdsRequest request,
            NdsSoapRequestAdapterExchangeProxy ndsExchange) throws NdsApplicationException {
        ndsExchange.setOperationName("RegisterPRSExemptionWSDL");
        RegisterPRSExemptionRequest registerPRSExemptionRequest = new RegisterPRSExemptionRequest();
        try {
            request = readFile(ndsExchange, request);
            ndsExchange.setRequestMessageBody(request);
            TypeConverter converter = ndsExchange.getTypeConverter();
            registerPRSExemptionRequest = converter.convertTo(RegisterPRSExemptionRequest.class, request);
            ndsExchange.setResponseMessageBody(registerPRSExemptionRequest);
            if(request.getRegisterPrsExemptionDetails().getExemptionDetails().getLandlordDetails() != null){
                ndsExchange.setAnExchangeProperty(IS_USER_AGENT,"true");
            }
        } catch (TypeConversionException e) {
            throw new NdsApplicationException("Error occured during request conversion process:  " + e.getMessage(), e);
        }         
        logger.info("Successfully created the BEIS request");
        return registerPRSExemptionRequest;
    }
@ Override protected RegisterPRSExemptionRequest doRequestProcess ( RegisterPrsExemptionNdsRequest request , NdsSoapRequestAdapterExchangeProxy ndsExchange ) throws NdsApplicationException { ndsExchange . setOperationName ( "RegisterPRSExemptionWSDL" ) ; RegisterPRSExemptionRequest registerPRSExemptionRequest = new RegisterPRSExemptionRequest ( ) ; try { request = readFile ( ndsExchange , request ) ; ndsExchange . setRequestMessageBody ( request ) ; TypeConverter converter = ndsExchange . getTypeConverter ( ) ; registerPRSExemptionRequest = converter . convertTo ( RegisterPRSExemptionRequest . class , request ) ; ndsExchange . setResponseMessageBody ( registerPRSExemptionRequest ) ; if ( request . getRegisterPrsExemptionDetails ( ) . getExemptionDetails ( ) . getLandlordDetails ( ) != null ) { ndsExchange . setAnExchangeProperty ( IS_USER_AGENT , "true" ) ; } } catch ( TypeConversionException e ) { throw new NdsApplicationException ( "Error occured during request conversion process:  " + e . getMessage ( ) , e ) ; } logger . info ( "Successfully created the BEIS request" ) ; return registerPRSExemptionRequest ; }
converts NDS request to BEIS request
converts NDS request to BEIS request