SOAP Simple Object Access Protocol
SCGAP Introduction • Central Gene Expression Query at scgap.org • Source data at 7 member organizations • Varying architectures, data stores www.scgap.org Member Member Member Member Member ... Site Site Site Site Site
SOAP Introduction • Protocol for the exchange of information in heterogeneous environments • Lightweight: XML Based • Simple: No code modification needed • Ubiquitous: Over 41 Implementations • Not a new idea: CORBA, DCOM, XML-RPC
Bad News, Good News • SOAP , and web services in general, are a huge, hot, topic. • But it is called the SIMPLE object access protocol for a reason...
SOAP::Lite • Primary Perl Implementation • Public Beta, September 2000 • Both Server and Client code • “Don’t be misled by the ‘Lite’ suffix-- this refers to the effort it takes to use the module, not its capabilities”
SOAP::Lite Client • #!perl -w use SOAP::Lite; my $server = SOAP::Lite -> uri('http://www.cbil.upenn.edu/Demo') -> proxy('http://www.cbil.upenn.edu/webservices/labdemo.cgi'); print $server->hi()->result; • <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance” xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > <SOAP-ENV:Body> <namesp1:hi xmlns:namesp1="http://www.cbil.upenn.edu/Demo"/> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
SOAP::Lite Server • #!perl -w use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI -> dispatch_to('Demo') -> handle; package Demo; sub hi { return "hello, world"; } • <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope ... > <SOAP-ENV:Body> <namesp1:hiResponse xmlns:namesp1="http://www.cbil.upenn.edu/Demo"> <s-gensym3 xsi:type="xsd:string"> Hello from CBIL </s-gensym3> </namesp1:hiResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
SCGAP Overview • Request: • GeneType name genome_build_id genomiccoordinateType chromosome start_coord end_coord strand * • Response: • GeneType gene_expression expressed * evidence population population_id population_link image ** link ** source
Getting Complicated • Perl Model: XML Model: • GeneType -> Gene.pm GeneType name • Response -> genome_build_id GeneExpressionResponse.pm genomiccoordinateType chromosome • start_coord Gene Expression -> end_coord Expression.pm strand * • GeneExpression.pm GeneType gene_expression • expressed * Query Information evidence • population Results population_id population_link • Abstract Class image ** link ** source
Resolving Complexity • Overrode Serialization • WSDL: Web Services Description Language • XML • Used to describe the services offered by a web service, as well as the location of the service.
Keeping in Simple • All but two files are common to all groups • WSDL-- One line change • GeneExpression -- Implement search • Second look at the client and server...
More... • Error Handling • Dynamic Dispatch • Security (SSL, Tickets, Cookies, ACL, etc.)
Recommend
More recommend