ARCHIVED: How do I access CLSD using WSRF?
The Indiana University Centralized Life Sciences Data (CLSD) service was retired June 18, 2010.
You can access the Centralized Life Sciences Data (CLSD)
service at Indiana University through the QueryCLSD resource running
on the Web Services Resource Framework (WSRF) container at
discern.uits.iu.edu:8422.
Note: This container was built over WSRF::Lite and may not be entirely compatible with Java-based WSRF.
Accessing CLSD via this WSRF container does not require authentication, but it does require three parameters and returns a single string containing data arranged as line-feed separated rows in a comma-separated value (CSV) format. The parameters are the SQL query to be relayed to CLSD, the first row of the returned set to display, and the total number of rows to display.
To use CLSD via WSRF, write a Perl program using WSRF::Lite to
interact with the WSRF service running on the WSRF container on
discern.uits.iu.edu. An example Perl
program shows how to use WSRF::Lite to send an SQL query to
CLSD.
Below is a portion of the code showing the call to the remote resource:
$QueryCLSD_host = "discern.uits.iu.edu"; $QueryCLSD_port = "8422"; $QueryCLSD_target = "http://$QueryCLSD_host:$QueryCLSD_port/Session/QueryCLSD/QueryCLSD"; $QueryCLSD_uri = "http://$CSLD_update_host/QueryCLSD"; $arg_list_query = "<Query>select snp_id, allele from b126_SNPContigLocusId_36_1</Query>"; $arg_list_start = "<Starting_row>$starting_row</Starting_row>"; $arg_list_number = "<Number_of_rows>$number_of_rows</Number_of_rows>"; $arg_list = $arg_list_query . $arg_list_start . $arg_list_number; eval { $ans = WSRF::Lite -> uri( $WSRF::Constants::WSRP ) -> wsaddress( WSRF::WS_Address->new()->Address( $QueryCLSD_target ) ) # location of service -> QueryCLSD( SOAP::Data->value( $arg_list )->type( 'xml' ) ); # invoke function( args ) };Rows in the CSV format are separated by line feed characters, and
embedded &, <, >,
line feed, and comma characters have been escaped using
&, <, >,
, and ". In addition, fields
holding a non-digit, or DB2 data types CHAR, VARCHAR, CLOB, or
TIMESTAMP, will be surrounded by double-quotes.
This document was developed with support from the National Science Foundation (NSF) under Grant No. 0503697 to the University of Chicago and subcontracted to Indiana University. Additional support was provided by IU through its participation in the TeraGrid, which is supported by the NSF under Grants No. 0833618, SCI451237, SCI535258, and SCI504075. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF.
Last modified on June 18, 2010.







