#!/usr/local/bin/perl -w use SOAP::Lite; my $soap = SOAP::Lite -> proxy('http://services.informatics.jax.org/mgiws') -> autotype(0); # create an IDSet element containing multiple ids # set the IDType attribute to symbol # nset the namespace prefixes appropriately $idSet = SOAP::Data->name("IDSet" => \SOAP::Data->value( SOAP::Data->name('id' => 'Pax6')->prefix('bt'), SOAP::Data->name('id' => 'Trp53')->prefix('bt'))) ->attr({"IDType" => 'symbol'}) ->prefix('req'); # add the IDSet to a batchMarkerRequest element my $request = SOAP::Data->name('batchMarkerRequest' => \$idSet) ->attr({'xmlns:bt' => 'http://ws.mgi.jax.org/xsd/batchType'}) ->prefix('req') ->uri('http://ws.mgi.jax.org/xsd/request'); # submit the request to the submitDocument method $result = $soap->submitDocument($request); # print the results, or the fault unless ($result->fault) { #print the results # get the summary element, which is the first element # and print the contents $res = $result->result; print "Result Summary\n"; while( my ($k, $v) = each %$res ) { print "\t$k= $v\n"; } # get the data results elements # and print the contents print "Result Data\n"; $count =1; foreach $h_res ($result->paramsout){ print "row $count"; $count++; while( my ($k, $v) = each %$h_res ) { print "\t$k = $v\n"; } } } else { # print the fault details print join ', ', $result->faultcode, $result->faultstring; }