serializeResponse(response, EC2response);
}
private void modifyImageAttribute( HttpServletRequest request, HttpServletResponse response )
throws ADBException, XMLStreamException, IOException {
EC2Image image = new EC2Image();
// -> its interesting to note that the SOAP API docs has description but the REST API docs do not
String[] imageId = request.getParameterValues( "ImageId" );
if ( null != imageId && 0 < imageId.length )
image.setId( imageId[0] );
else { response.sendError(530, "Missing ImageId parameter" ); return; }
String[] description = request.getParameterValues( "Description" );
if ( null != description && 0 < description.length )
image.setDescription( description[0] );
else { response.sendError(530, "Missing Description parameter" ); return; }
// -> execute the request
ModifyImageAttributeResponse EC2response = EC2SoapServiceImpl.toModifyImageAttributeResponse( ServiceProvider.getInstance().getEC2Engine().modifyImageAttribute( image ));
serializeResponse(response, EC2response);