NdsBeisEsb/src/main/java/com/northgateps/nds/beis/esb/registration/SaveRegisteredAccountDetailsSoapAdapter.java
/**
     * Receive a response from the BEIS foundation layer for MaintainPartyDetails and translate to a response
     */
Receive a response from the BEIS foundation layer for MaintainPartyDetails and translate to a response
Receive a response from the BEIS foundation layer for MaintainPartyDetails and translate to a response
@Override
    protected SaveRegisteredAccountDetailsNdsResponse doResponseProcess(MaintainPartyDetailsResponse externalResponse,
            NdsSoapRequestAdapterExchangeProxy ndsExchange) throws NdsApplicationException {
        SaveRegisteredAccountDetailsNdsResponse ndsResponse = new SaveRegisteredAccountDetailsNdsResponse();
        try {            
            TypeConverter converter = ndsExchange.getTypeConverter();
            ndsResponse = converter.convertTo(SaveRegisteredAccountDetailsNdsResponse.class, externalResponse);            
        } catch (Exception e) {
            throw new NdsApplicationException("Error occured during response conversion process:  " + e.getMessage(),
                    e);
        }
        logger.info("Successfully created the NDS response");
        if(ndsResponse.isSuccess())
        {            
            if(ndsExchange.getAnExchangeProperty(SaveRegisteredAccountDetailsComponent.EXCHANGE_PROPERTY_PARTIALLY_REGISTERED) != null){
                Boolean partiallyRegistered = (Boolean) ndsExchange.getAnExchangeProperty(SaveRegisteredAccountDetailsComponent.EXCHANGE_PROPERTY_PARTIALLY_REGISTERED);
                if(partiallyRegistered){
                    ndsExchange.setAnExchangeProperty(BeisRegistrationUpdateAccountIdLdapComponent.EXCHANGE_PROPERTY_ACCOUNT_ID, externalResponse.getPartyRef());
                }
            }
        }
        return ndsResponse;
    }
@ Override protected SaveRegisteredAccountDetailsNdsResponse doResponseProcess ( MaintainPartyDetailsResponse externalResponse , NdsSoapRequestAdapterExchangeProxy ndsExchange ) throws NdsApplicationException { SaveRegisteredAccountDetailsNdsResponse ndsResponse = new SaveRegisteredAccountDetailsNdsResponse ( ) ; try { TypeConverter converter = ndsExchange . getTypeConverter ( ) ; ndsResponse = converter . convertTo ( SaveRegisteredAccountDetailsNdsResponse . class , externalResponse ) ; } catch ( Exception e ) { throw new NdsApplicationException ( "Error occured during response conversion process:  " + e . getMessage ( ) , e ) ; } logger . info ( "Successfully created the NDS response" ) ; if ( ndsResponse . isSuccess ( ) ) { if ( ndsExchange . getAnExchangeProperty ( SaveRegisteredAccountDetailsComponent . EXCHANGE_PROPERTY_PARTIALLY_REGISTERED ) != null ) { Boolean partiallyRegistered = ( Boolean ) ndsExchange . getAnExchangeProperty ( SaveRegisteredAccountDetailsComponent . EXCHANGE_PROPERTY_PARTIALLY_REGISTERED ) ; if ( partiallyRegistered ) { ndsExchange . setAnExchangeProperty ( BeisRegistrationUpdateAccountIdLdapComponent . EXCHANGE_PROPERTY_ACCOUNT_ID , externalResponse . getPartyRef ( ) ) ; } } } return ndsResponse ; }
Receive a response from the BEIS foundation layer for MaintainPartyDetails and translate to a response
Receive a response from the BEIS foundation layer for MaintainPartyDetails and translate to a response
//If we successfully converted the response then set the account ID in LDAP //Set party reference on exchange property for an LDAP adapter to deal with if it was partially registered