* serialize method is called on the returned response object to obtain the extected
* response XML.
*/
private void attachVolume( HttpServletRequest request, HttpServletResponse response )
throws ADBException, XMLStreamException, IOException {
EC2Volume EC2request = new EC2Volume();
// -> all these parameters are required
String[] volumeId = request.getParameterValues( "VolumeId" );
if ( null != volumeId && 0 < volumeId.length )
EC2request.setId( volumeId[0] );
else {
throw new EC2ServiceException( ClientError.MissingParamter, "Missing required parameter - VolumeId");
}
String[] instanceId = request.getParameterValues( "InstanceId" );
if ( null != instanceId && 0 < instanceId.length )
EC2request.setInstanceId( instanceId[0] );
else {
throw new EC2ServiceException( ClientError.MissingParamter, "Missing required parameter - InstanceId");
}
String[] device = request.getParameterValues( "Device" );
if ( null != device && 0 < device.length )
EC2request.setDevice( device[0] );
else {
throw new EC2ServiceException( ClientError.MissingParamter, "Missing required parameter - Device");
}
// -> execute the request