NdsBeisEsb/src/main/java/com/northgateps/nds/beis/esb/registration/RetrieveRegisteredDetailsSoapAdapter.java
/**
     * Receive a response from back office
     */
Receive a response from back office
Receive a response from back office
@Override
    protected RetrieveRegisteredDetailsNdsResponse doResponseProcess(GetPartyDetailsResponse externalResponse,
            NdsSoapRequestAdapterExchangeProxy ndsExchange) throws NdsApplicationException {
        RetrieveRegisteredDetailsNdsResponse retrieveRegisteredDetailsNdsResponse = new RetrieveRegisteredDetailsNdsResponse();
        logger.info("Started SOAP response");
        try {
            TypeConverter converter = ndsExchange.getTypeConverter();
            retrieveRegisteredDetailsNdsResponse = converter.convertTo(RetrieveRegisteredDetailsNdsResponse.class,
                    externalResponse);
            String username = retrieveUsernameFromDn((String) ndsExchange.getAnExchangeProperty("USERNAME"));
            if (retrieveRegisteredDetailsNdsResponse.isSuccess()){
                retrieveRegisteredDetailsNdsResponse.getBeisRegistrationDetails().getUserDetails().setUsername(username);
                if(retrieveRegisteredDetailsNdsResponse.getBeisRegistrationDetails().getUserDetails().getUserType() != null){
                    ndsExchange.setAnExchangeProperty(USER_TYPE,retrieveRegisteredDetailsNdsResponse.getBeisRegistrationDetails().getUserDetails().getUserType());
                }                    
            }
        } catch (Exception e) {
            throw new NdsApplicationException("Error occured during response conversion process:  " + e.getMessage(),
                    e);
        }
        logger.info("Successfully created the NDS response");
        return retrieveRegisteredDetailsNdsResponse;
    }
@ Override protected RetrieveRegisteredDetailsNdsResponse doResponseProcess ( GetPartyDetailsResponse externalResponse , NdsSoapRequestAdapterExchangeProxy ndsExchange ) throws NdsApplicationException { RetrieveRegisteredDetailsNdsResponse retrieveRegisteredDetailsNdsResponse = new RetrieveRegisteredDetailsNdsResponse ( ) ; logger . info ( "Started SOAP response" ) ; try { TypeConverter converter = ndsExchange . getTypeConverter ( ) ; retrieveRegisteredDetailsNdsResponse = converter . convertTo ( RetrieveRegisteredDetailsNdsResponse . class , externalResponse ) ; String username = retrieveUsernameFromDn ( ( String ) ndsExchange . getAnExchangeProperty ( "USERNAME" ) ) ; if ( retrieveRegisteredDetailsNdsResponse . isSuccess ( ) ) { retrieveRegisteredDetailsNdsResponse . getBeisRegistrationDetails ( ) . getUserDetails ( ) . setUsername ( username ) ; if ( retrieveRegisteredDetailsNdsResponse . getBeisRegistrationDetails ( ) . getUserDetails ( ) . getUserType ( ) != null ) { ndsExchange . setAnExchangeProperty ( USER_TYPE , retrieveRegisteredDetailsNdsResponse . getBeisRegistrationDetails ( ) . getUserDetails ( ) . getUserType ( ) ) ; } } } catch ( Exception e ) { throw new NdsApplicationException ( "Error occured during response conversion process:  " + e . getMessage ( ) , e ) ; } logger . info ( "Successfully created the NDS response" ) ; return retrieveRegisteredDetailsNdsResponse ; }
Receive a response from back office
Receive a response from back office