Hi all,

   I have a tool written in java for which I want to upload a file as a parameter. I have trouble figuring out how to do it. I tried writing the xml file similar to 'tools/data-source/upload.xml' but it is not working.

correlation.xml

<tool id="correlation" name="Compute correlation" version="1.1.3">

  <description> for the given BAM file </description>

  <action module="galaxy.tools.actions.upload" class="UploadToolAction"/>

  <command>java -jar Correlation.jar $input_bam_file $output</command>
  
  <inputs nginx_upload="true">

<param name="async_datasets" type="hidden" value="None"/>

<upload_dataset name="input" title="Specify Files for Dataset" file_type_name="file_type" metadata_ref="files_metadata">
<param name="input_bam_file" type="file" size="30" label="File (Please avoid Windows format text file)" ajax-upload="true" help="TIP1: Due to browser limitations">
<validator type="expression" message="You will need to reselect the file you specified (%s)." substitute_value_in_message="True">not ( ( isinstance( value, unicode ) or isinstance( value, str ) ) and value != "" )</validator> 
</param>
</upload_dataset>

<param name="dbkey" type="genomebuild" label="Genome" />
       <conditional name="files_metadata" title="Specify metadata" value_from="self:app.datatypes_registry.get_upload_metadata_params" value_ref="file_type" value_ref_in_group="False" />

  </inputs>

  <outputs>
        <data name="output" format="txt" />
  </outputs>

</tool>


I am not sure where I am making a mistake... Is the procedure to upload a file for java different from python?

Thanks,
VJ.