hello galaxy-community,

we stored a lot of peak-information in a database. to import these files into galaxy, i read the DataConnectionProtocol (https://bitbucket.org/galaxy/galaxy-central/wiki/DataSources) and i also took a look at the biomart.xml example
(https://bitbucket.org/galaxy/galaxy-dist/src/8729d2e29b02/tools/data_source/biomart.xml).

biomart does exactly what i want. 

here is my full tool configuration xml-file:
<tool id="regionDb" name="RegionDb-Import">
  <description>Import from regionDb</description>
  <command interpreter="python">../data_source/data_source.py $output $__app__.config.output_size_limit</command>
  <inputs action="http://localhost:8888/index.html" check_values="false" method="get">
 <display>Display-Text</display>
      <param name="GALAXY_URL" type="baseurl" value="/tool_runner" />
      <param name="tool_id" type="hidden" value="regionDb" />
  </inputs>
  <request_param_translation>
 <request_param galaxy_name="URL" remote_name="URL" missing=""/>
          <request_param galaxy_name="URL_method" remote_name="URL_method" missing="get" />
 <request_param galaxy_name="name" remote_name="name" missing="Biomart test query" />
  </request_param_translation>
  <outputs>
    <data name="regionDb File" format="bed" label="regionDb import" />
  </outputs>
  
  <help>
**What it does**

import ...
  </help>
</tool>


content of http://localhost:8888/index.html:

<form method="POST" type="text" action="http://galaxy/tool_runner/regionDb?type=text&name=new%20history%20entry&URL=http://localhost:8888/getfile.php" >
 <input type="submit" value="Send to Galaxy"/>
</form>

i also tried a different action="http://galaxy/tool_runner?tool_id=regionDb&type=text&name=new%20history%20entry&URL=http://localhost:8888/getfile.php" with the same error message (shown below).


what actually works is, if i try to receive biomart data with this request.
<form method="POST" type="text" action="http://gen43/galaxy/tool_runner/biomart?type=text&name=ne%20history%20entry&URL=http://www.biomart.org/biomart/martview/4905f90905e8f4b362a96b887cc7c452?do_export=1&resultsButton=1" >
<input type="submit" value="Send to Galaxy"/>
</form>


my question is: was there some extra hack to get the biomart tool to run? i found some lines in the lib/galaxy/web/controllers/tool_runner.py  which confirm that assumption:

    #Hack to get biomart to work, ideally, we could pass tool_id to biomart and receive it back
    @web.expose
    def biomart(self, trans, tool_id='biomart', **kwd):
        """Catches the tool id and redirects as needed"""
        return self.index(trans, tool_id=tool_id, **kwd)


Server Error

URL: http://galaxy/tool_runner/regionDb?type=text&name=new%20history%20entry&URL=http://localhost:8888/getfile.php
Module paste.exceptions.errormiddleware:143 in __call__
>>  app_iter = self.application(environ, start_response)
Module paste.debug.prints:98 in __call__
>>  environ, self.app)
Module paste.wsgilib:539 in intercept_output
>>  app_iter = application(environ, replacement_start_response)
Module paste.recursive:80 in __call__
>>  return self.application(environ, start_response)
Module galaxy.web.framework.middleware.remoteuser:109 in __call__
>>  return self.app( environ, start_response )
Module paste.httpexceptions:632 in __call__
>>  return self.application(environ, start_response)
Module galaxy.web.framework.base:145 in __call__
>>  body = method( trans, **kwargs )
Module galaxy.web.controllers.tool_runner:27 in regionDb
>>  return self.index(trans, tool_id=tool_id, **kwd)
Module galaxy.web.controllers.tool_runner:75 in index
>>  template, vars = tool.handle_input( trans, params.__dict__ )
Module galaxy.tools:933 in handle_input
>>  _, out_data = self.execute( trans, incoming=params )
Module galaxy.tools:1225 in execute
>>  return self.tool_action.execute( self, trans, incoming=incoming, set_output_hid=set_output_hid, history=history )
Module galaxy.tools.actions:291 in execute
>>  wrap_values( tool.inputs, params )
Module galaxy.tools.actions:154 in wrap_values
>>  input_values[ input.name ] = galaxy.tools.InputValueWrapper( input, input_values[ input.name ], incoming )
KeyError: 'GALAXY_URL'
extra data

CGI Variables
CONTENT_LENGTH '-1'
CONTENT_TYPE 'application/x-www-form-urlencoded'
HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
HTTP_ACCEPT_CHARSET 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
HTTP_ACCEPT_ENCODING 'gzip,deflate'
HTTP_ACCEPT_LANGUAGE 'en-us,en;q=0.5'
HTTP_CONNECTION 'Keep-Alive'
HTTP_COOKIE 'galaxysession=c6ca0ddb55be603af8ffade046cb8ca7fe7a18f326db29b947c846a3b24831e1362e15c491e90b43'
HTTP_HOST 'gen43'
HTTP_REFERER 'http://localhost:8888/index2.php?GALAXY_URL=http%3A//gen43/galaxy/tool_runner&tool_id=regionDb'
HTTP_REMOTE_USER 'perdacher@genau.at'
HTTP_USER_AGENT 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3'
HTTP_VIA '1.1 gen43.imp.univie.ac.at'
PATH_INFO '/tool_runner/regionDb'
QUERY_STRING 'type=text&name=new%20history%20entry&URL=http://localhost:8888/getfile.php'
REMOTE_ADDR '10.42.111.27'
REQUEST_METHOD 'POST'
SCRIPT_NAME '/galaxy'
SERVER_NAME 'gen43.imp.univie.ac.at'
SERVER_PORT '9191'
SERVER_PROTOCOL 'HTTP/1.1'

Configuration
__file__ '/projects/solexadst/serverData/galaxy-devel/universe_wsgi.webapp.ini'
admin_users 'tamir@genau.at'
apache_xsendfile 'False'
brand 'GenAu-Epx Development!!!'
cookie_path '/galaxy'
debug 'TRUE'
enable_api 'True'
enable_job_running 'False'
enable_pages 'True'
here '/projects/solexadst/serverData/galaxy-devel'
log_level 'DEBUG'
new_user_dataset_access_role_default_private 'True'
remote_user_logout_href '/logout'
remote_user_maildomain 'genau.at'
require_login 'True'
set_metadata_externally 'True'
static_cache_time '360'
static_dir '/projects/solexadst/serverData/galaxy-devel/static/'
static_enabled 'True'
static_favicon_dir '/projects/solexadst/serverData/galaxy-devel/static/favicon.ico'
static_images_dir '/projects/solexadst/serverData/galaxy-devel/static/images'
static_scripts_dir '/projects/solexadst/serverData/galaxy-devel/static/scripts/'
static_style_dir '/projects/solexadst/serverData/galaxy-devel/static/june_2007_style/blue'
upstream_gzip 'False'
use_interactive 'False'
use_remote_user 'True'