byte[] value = response.getResponseValue();
ByteBuffer buffer = ByteBuffer.wrap( value );
PasswordModifyResponseContainer container = new PasswordModifyResponseContainer();
PwdModifyResponse pwdModifyResponse = null;
try
{
decoder.decode( buffer, container );
pwdModifyResponse = container.getPwdModifyResponse();
// Now, update the created response with what we got from the extendedResponse
pwdModifyResponse.getLdapResult().setResultCode( response.getLdapResult().getResultCode() );
pwdModifyResponse.getLdapResult().setDiagnosticMessage( response.getLdapResult().getDiagnosticMessage() );
pwdModifyResponse.getLdapResult().setMatchedDn( response.getLdapResult().getMatchedDn() );
pwdModifyResponse.getLdapResult().setReferral( response.getLdapResult().getReferral() );
}
catch ( DecoderException de )
{
StringWriter sw = new StringWriter();
de.printStackTrace( new PrintWriter( sw ) );