-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think I've got this now... the POST expects the XML to be passed in as
the 'query' parameter, not just on its own.

Try prepending the first line of your XML with "query=", eg.:

query=<?xml version='1.0' encoding='UTF-8'?>
     <!DOCTYPE Query>
        <Query  virtualSchemaName='biomartmaps'  count=''
  softwareVersion='0.5'>
           <Dataset name='maps' interface='default' >
              <Attribute name='map_id' />
              <Attribute name='name' />
              <Filter name='map_id' value='ARKLGP90000001'/>
           </Dataset>
        </Query>

(For reference, see the webExample.pl in the scripts folder of
biomart-perl).

cheers,
Richard

trevor paterson (RI) wrote:
> thanks,..
> 
> removing xml whitespace doesn't fix the problem :(
> (I was just following the formatting in the Documantation pdf ;)
> 
> the html response with the logger  log4perl.threshold = WARN is now 
> 
> 
> HTTP/1.1 500 Internal Server Error
> Date: Wed, 21 Feb 2007 13:39:28 GMT
> Server: Apache/2.2.4 (Unix) mod_perl/2.0.3 Perl/v5.8.8
> Content-Length: 538
> Connection: close
> Content-Type: text/html; charset=iso-8859-1
> 
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
>    <html>
>       <head>
>          <title>500 Internal Server Error</title>
>       </head>
>       <body>
>          <h1>Internal Server Error</h1>
>          <p>The server encountered an internal error ormisconfiguration
> and was unable to completeyour request.</p>
>          <p>Please contact the server administrator, [no address given]
> and inform them of the time the error occurred,and anything you might
> have done that may havecaused the error.</p>
>          <p>More information about this error may be availablein the
> server error log.</p>
>       </body>
>    </html>
> 
> 
> 
> 
> and the line in the error_log is 
> 
>       Use of uninitialized value in concatenation (.) or string at
> /mnt/rinetapp1a/users/paterson/biomart-perl/cgi-bin/martservice line
> 532.
> 
> 
> which corresponds to 
> 
>     $LOGGER->warn("RECEIVED QUERY:$xml\n");
> 
> as i said i don't know perl but i guess this means that the  xml is
> undefined
> 
> 
> Trevor Paterson
> 
> Bioinformatics
> Roslin Institute
> 
> -----Original Message-----
> From: Richard Holland [mailto:[EMAIL PROTECTED] 
> Sent: 21 February 2007 13:17
> To: trevor paterson (RI)
> Cc: [email protected]; andy law (RI)
> Subject: Re: [mart-dev] Webservice querying problem
> 
> Not sure if this is your email client formatting it wrong, but it seems
> that you have spaces around the equals signs in your XML query. This is
> not valid XML syntax so is likely to be one potential cause of the
> problem. Your Query XML should read like this (note no spaces!):
> 
> <?xml version='1.0' encoding='UTF-8'?>
>     <!DOCTYPE Query>
>        <Query  virtualSchemaName='biomartmaps'  count=''
>  softwareVersion='0.5'>
>           <Dataset name='maps' interface='default' >
>              <Attribute name='map_id' />
>              <Attribute name='name' />
>              <Filter name='map_id' value='ARKLGP90000001'/>
>           </Dataset>
>        </Query>
> 
> (spaces around the equals sign is not valid syntax in all forms of XML,
> not just ours.)
> 
> cheers,
> Richard
> 
> trevor paterson (RI) wrote:
>>> I am trying to play with webservices for a mart that i am running 
>>> locally - so trying to test the basic get and post requests before 
>>> using programmatically, however
>>>  
>>> I can do a get() metadata request
>>>  
>>>  e.g.
>>>  
>>> http://ribinflx03:9060/biomart/martservice?type=registry
>>>
>>> <MartRegistry>
>>>   <virtualSchema default="1" name="biomartmaps">
>>>     <MartURLLocation database="CGView" default="" displayName="Maps
> Test" host="ribinflx03" includeDatasets="maps" martUser="default"
> name="biomartmaps" path="/biomart/martservice" port="9060"
> serverVirtualSchema="biomartmaps" visible="1" />
>>>   </virtualSchema>
>>> </MartRegistry>
>>>
>>> and
>>>  
>>> http://ribinflx03:9060/biomart/martservice?type=attributes&dataset=map
>>> s 
>>> <http://ribinflx03:9060/biomart/martservice?type=attributes&dataset=ma
>>> ps>
>>>  
>>>
>>> binomial    Binomial        
>>> map_id      Map id  
>>> name        Name    
>>> name_chromosomes    Name chromosomes        
>>> etc.....
>>>
>>>  
>>> but i cant get a post() query to work.....the script parsing the Query
> 
>>> is throwing an error and as a java programmer i can't see exactly what
> 
>>> the problem is ;)
>>>  
>>> the request is
>>>  
>>> POST /biomart/martservice HTTP/1.1
>>> Host: 127.0.0.1:9060
>>> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10)
>>> Gecko/20050909 Red Hat/1.7.10-1.1.3.2
>>> Accept:
>>> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/pl
>>> ain;q=0.8,image/png,*/*;q=0.5
>>> Accept-Language: en-us,en;q=0.5
>>> Accept-Encoding: gzip,deflate
>>> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>>> Keep-Alive: 300
>>> Connection: keep-alive
>>> Content-Type: text/xml
>>> Content-Length: 304
>>> Pragma: no-cache
>>> Cache-Control: no-cache
>>>  
>>> <?xml version='1.0' encoding='UTF-8'?>
>>>    <!DOCTYPE Query>
>>>       <Query  virtualSchemaName = 'biomartmaps'  count = ''
>>> softwareVersion = '0.5'>
>>>          <Dataset name = 'maps' interface = 'default' >
>>>             <Attribute name = 'map_id' />
>>>             <Attribute name = 'name' />
>>>             <Filter name = 'map_id' value = 'ARKLGP90000001'/>
>>>          </Dataset>
>>>       </Query>
>>>  
>>>  
>>> which gives the response
>>>  
>>> HTTP/1.1 200 OK
>>> Date: Wed, 21 Feb 2007 12:17:58 GMT
>>> Server: Apache/2.2.4 (Unix) mod_perl/2.0.3 Perl/v5.8.8
>>> Keep-Alive: timeout=15, max=100
>>> Connection: Keep-Alive
>>> Transfer-Encoding: chunked
>>> Content-Type: text/plain
>>>  
>>> bd
>>> Query ERROR: caught BioMart::Exception: non-BioMart die(): Can't use 
>>> an undefined value as an ARRAY reference at 
>>> /mnt/rinetapp1a/users/paterson/biomart-perl/lib/BioMart/Query.pm line
> 1645.
>>>  
>>> 0
>>>  
>>>  
>>> Can anyone help me to see where the problem lies? - obviously I am 
>>> hitting the correct serverside script - buut there would appear to be 
>>> either an error in my XML Query - or an error in my registry settings
>>>  
>>> many thanks
>>>  
>>> ps I take it their isnt a wsdl publisher for the services?
>>>  
>>>
>>> Trevor Paterson
>>>
>>> Bioinformatics
>>> Roslin Institute
>>> Scotland EH25 9PS
>>> phone  +44 (0) 131 5274477
>>> http://www.roslin.ac.uk/
>>> http://www.thearkdb.org/
>>> http://www.comparagrid.org/
>>>
>>>
>>> Roslin Institute is a company limited by guarantee, registered in 
>>> Scotland (registered number SC157100) and a Scottish Charity 
>>> (registered number SC023592). Our registered office is at Roslin, 
>>> Midlothian, EH25 9PS. VAT registration number 847380013.
>>>
>>> The information contained in this e-mail (including any attachments)
> is
>>> confidential and is intended for the use of the addressee only.   The
>>> opinions expressed within this e-mail (including any attachments) are 
>>> the opinions of the sender and do not necessarily constitute those of 
>>> Roslin Institute (Edinburgh) ("the Institute") unless specifically 
>>> stated by a sender who is duly authorised to do so on behalf of the 
>>> Institute
>>>
>>>  
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF3FKJ4C5LeMEKA/QRAiy5AKCiWpunTB1C8gvkQemWzkKbSnzIagCdFPui
dp1s8Xd45tXTEwTQadDqbMs=
=4fTZ
-----END PGP SIGNATURE-----

Reply via email to