Soaplab SOAP-based Analysis Web Services Martin Senger

Slides:



Advertisements
Similar presentations
1 Applets Programming Enabling Application Delivery Via the Web.
Advertisements

Building Portals to access Grid Middleware National Technical University of Athens Konstantinos Dolkas, On behalf of Andreas Menychtas.
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
April 05 Prof. Ismael H. F. Santos - 1 Modulo II WebServices Prof. Ismael H F Santos.
Feature requests for Case Manager By Spar Nord Bank A/S IBM Insight 2014 Spar Nord Bank A/S1.
J.Sant Servlets Joseph Sant Sheridan Institute of Technology.
Servlets and a little bit of Web Services Russell Beale.
Assignment 1 “Deploying a Simple Web Service” Mark Holliday Department of Mathematics and Computer Science Western Carolina University.
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
Hello Vaadin! CS 3130 Summer 2015.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
Java web development Servlet & Java server pages.
1 Java Server Programming zLecture 1 focuses on: yIntroduction to web services y Web Services using Axis y The bigger Picture: Introduction to J2EE y Java.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
PHP Programming. Topics Background and History of PHP Installation Comments in PHP Variables Conditions Loops Functions File Handling Database Handling.
Using Opal to deploy a real scientific application as a Web service Sriram Krishnan
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Servlets Environment Setup. Agenda:  Setting up Java Development Kit  Setting up Web Server: Tomcat  Setting up CLASSPATH.
CS 157B: Database Management Systems II February 27 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
INTERNET APPLICATION DEVELOPMENT For More visit:
Presentation: SOAP in a distributed object framework, Application Servers & AXIS SOAP.
COP 4991 Component Based Software Development Lecture #4 Java Web Services Onyeka Ezenwoye.
Arc: AddIns Dr Andy Evans. Java Direct access to ArcObjects Framework inside and outside Arc. Ability to add components to the GUI. Ability to communicate.
Guidelines for Homework 6. Getting Started Homework 6 requires that you complete Homework 5. –All of HW5 must run on the GridFarm. –HW6 may run elsewhere.
Working With Apache Axis. Axis Information See guide.html for the basic user guide.
An Introduction to Designing and Executing Workflows with Taverna Katy Wolstencroft University of Manchester.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
Building PERL Scripts on a Windows system* *and running those scripts on an Apache server!
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
Taverna and SoapLab Elda Rossi – CINECA (Italy)
Application portlets within the PROGRESS HPC Portal Michał Kosiedowski
SOAP Web Services Tim Carver MRC HGMP-RC Hinxton Cambridge, UK.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
CGI Common Gateway Interface. CGI is the scheme to interface other programs to the Web Server.
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
Topic Java EE installation (Eclipse, glassfish, etc.) Eclipse configuration for EE Creating a Java Web Dynamic Project Creating your first servlet.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
Introduction to PHP Advanced Database System Lab no.1.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
PHP Open source language for server-side scripting Works well with many databases (e.g., MySQL) Files end in.php,.php3 or.phtml Runs on all major platforms.
SIR and the WEB By Dave Doulton University of Southampton.
1 Creating Web Services from a existing tool Presented by Ashraf Memon Hands-on Ashraf Memon, Ghulam Memon.
CSE 154 LECTURE 5: INTRO TO PHP. URLs and web servers usually when you type a URL in your browser: your computer looks up the.
IT ELECTIVE 2.  Web server Can refer to either the hardware (the computer) or the software (the computer application) that helps to deliver content that.
Deploying a service. Talk titledate2 Talk titledate3 Section SOAP Deployment.
Middleware 3/29/2001 Kang, Seungwoo Lee, Jinwon. Description of Topics 1. CGI, Servlets, JSPs 2. Sessions/Cookies 3. Database Connection(JDBC, Connection.
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 1COMP9321, 15s2, Week.
EGEE is a project funded by the European Union under contract IST SOAP Simple Object Access Protocol 3 – 4 June
SOAP 2. SOAP Example POST /StockQuote HTTP/1.1 Host: Content-Type: text/xml; charset="utf-8"Content-Length: nnnn SOAPAction:"Some-URI"
1 G52IWS: Example Web-services Chris Greenhalgh. 2 Contents Software requirements AXIS web service run-time components Getting started with Jetty & AXIS.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Outline Server side Dependencies Installing it Configuring it Client side coding Browser setup.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Net-centric Computing Web Services. Lecture Outline  What is Web Service  Web Service Architecture  Creating and using Java Web Services  Apache Axis.
Topics to be covered (ni) Client side validation JSF (free tools as well) Webservices Tell Resources e.g. sites Packaging and deploying web applications.
The Java API for XML-Based Web Services. A Web Service example in Java SOAP-awareServlet (e.g. Apache Axis2) SOAP-awareServlet Any class processing the.
PHP stands for …….. “PHP Hypertext Pre-processor” and is a server-side scripting language like ASP. PHP scripts are executed on the server PHP supports.
Convert generic gUSE Portal into a science gateway Akos Balasko.
University of Kansas Department of Electrical Engineering and Computer Science Dr. Susan Gauch April 21, 2005 I T T C Introduction to Web Technologies.
Soaplab - overview SOAP-based Analysis Web Services Martin Senger
Soaplab - overview SOAP-based Analysis Web Services
Chapter 5 Remote Procedure Call
Outline SOAP and Web Services in relation to Distributed Objects
Outline SOAP and Web Services in relation to Distributed Objects
CS 240 – Advanced Programming Concepts
Presentation transcript:

Soaplab SOAP-based Analysis Web Services Martin Senger

What is the task? 1.You have (or someone else has) one or more command-line analysis tools 2.You want to access them from other computers, eventually over an Internet 3.You want to access them using your (or someone else’s) programs, not just by filling the forms and clicking on web pages

How it fits with the rest of the world Phase 1: Describe your command-line tool (preferable using an ACD file) – Phase 2: Soaplab –this whole presentation is about this phase Phase 3: Write your own programs (GUIs and others) to access tools via Soaplab – part of this presentation is about this –Talisman: an example of a web GUI presenting and using Soaplab (and many more things)

Tomcat (or any servlet engine) Apache Axis (SOAP Toolkit) Soaplab services AppLab server Filesystem with analysis results MySQL with results Command-line driven analysis tools XML (analysis description) XML (analysis description) XML (analysis description) acd2xml (convertor) XML (analysis description) XML (analysis description) ACD (analysis description) Talisman Provided ready clients Your own client programs BioPerl modules (Bio::Tools::Run::Analysis) Files: IOR/analyses/…      Create analysis description  Convert to XML  Start Tomcat server  Start AppLab server  Use existing client, or/and  Deploy Web Services  write your own client This is Soaplab    Downoad: applab-cembalo-soaplab-version (for EMBOSS) Downoad: analysis-interfaces-version Downoad: soaplab-clients-version Graphically… Important: how to write ACD what API to use by the clients Binary distribution myGrid clients

ACD – An EMBOSS Application application: seqret [ documentation: "Reads and writes (returns) sequences" groups: "Edit" ] section: input [ info: "input Section" type: page ] boolean: feature [ information: "Use feature information" ] seqall: sequence [ parameter: "Y" features: "$(feature)" ] endsection: input section: advanced [ info: "advanced Section" type: page ] boolean: firstonly [ information: "Read one sequence and stop" ] endsection: advanced section: output [ info: "output Section" type: page ] seqoutall: outseq [ parameter: "Y" features: "$(feature)" ] endsection: output

ACD – Non-EMBOSS Application application: HelloWorld [ documentation: "Classic greeting from the beginning of the UNIX epoch" groups: "Classic" comment: "non-emboss" comment: "exe echo" ] string: greeting [ parameter: "Y" default: "Hello World" comment: "defaults" ] outfile: output [ optional: "Y" default: "stdout" ]

What Web Services? Analysis Factory Service (misnomer) –produces a list of all available services Analysis Service –represents one analysis tools and allows to start it, to control it, and to exploit it –does it in loosely typed manner using the same API for all analyses Derived Analysis Service –does the same as the Analysis Service above but in a strongly typed manner having individual API for any individual analysis tool

A. Client developer Needs to know the Soaplab API Can develop in any programming language Needs to know a place (an endpoint) with a running Soaplab services – (EMBOSS) Can use the ready, pre-prepared Java and Perl clients Downoad: soaplab-clients-version

Soaplab API createJob (inputs) run() waitFor() getResults() destroy() getSomeResults() createAndRun (inputs) runAndWaitFor (inputs) The main methods for running an analysis The methods for asking what is happening getStatus() getLastEvent() getCreated() getStarted() getEnded() getElapsed() getCharacteristics() getAnalysisType() getInputSpec() getResultSpec() describe() The methods for asking about the whole analysis createEmptyJob() set_sequence_usa (datum) set_format (datum) set_firstonly (datum) … get_report() get_outseq() An example of (additional)example methods for a derived service getAvailableAnalyses() getAvailableCategories() getAvailableAnalysesInCategory() getServiceLocation() The List (factory) service

Once you know the API… import org.apache.axis.client.*; import javax.xml.namespace.QName; import org.apache.axis.AxisFault; import java.util.*; Call call = null; try { // specify what service to use call = (Call) new Service().createCall(); call.setTargetEndpointAddress (" // start the underlying analysis (without any input data) call.setOperationName (new QName ("createAndRun")); String jobId = (String)call.invoke (new Object[] { new Hashtable() }); // wait until it is completed call.setOperationName (new QName ("waitFor")); call.invoke (new Object[] { jobId }); // ask for result 'outfile' call.setOperationName (new QName ("getSomeResults")); Map result = (Map)call.invoke (new Object[] { jobId, new String[] { "outfile" } }); //..and print it out System.out.println (result.get ("outfile")); } catch (AxisFault e) { AxisUtils.formatFault (e, System.err, target.toString(), (call == null ? null : call.getOperationName())); System.exit (1); } catch (Exception e) { System.err.println (e.toString()); System.exit (1); } import org.apache.axis.client.*; import javax.xml.namespace.QName; import org.apache.axis.AxisFault; import java.util.*; Call call = null; try { // specify what service to use call = (Call) new Service().createCall(); call.setTargetEndpointAddress (" // start the underlying analysis (without any input data) call.setOperationName (new QName ("createAndRun")); String jobId = (String)call.invoke (new Object[] { new Hashtable() }); // wait until it is completed call.setOperationName (new QName ("waitFor")); call.invoke (new Object[] { jobId }); // ask for result 'outfile' call.setOperationName (new QName ("getSomeResults")); Map result = (Map)call.invoke (new Object[] { jobId, new String[] { "outfile" } }); //..and print it out System.out.println (result.get ("outfile")); } catch (AxisFault e) { AxisUtils.formatFault (e, System.err, target.toString(), (call == null ? null : call.getOperationName())); System.exit (1); } catch (Exception e) { System.err.println (e.toString()); System.exit (1); }

Once you know the API… use SOAP::Lite; my ($soap) = new SOAP::Lite -> proxy (' my $job_id = $soap->createAndRun()->result; $soap->waitFor ($job_id); my $results = $soap->getSomeResults ($job_id, ['outfile'])->result; print $results->{'outfile'}. "\n"; use SOAP::Lite; my ($soap) = new SOAP::Lite -> proxy (' my $job_id = $soap->createAndRun()->result; $soap->waitFor ($job_id); my $results = $soap->getSomeResults ($job_id, ['outfile'])->result; print $results->{'outfile'}. "\n"; use Bio::Tools::Run::Analysis; print new Bio::Tools::Run::Analysis (-name => 'display::showdb') ->wait_for ( {} ) ->result ('outfile'); use Bio::Tools::Run::Analysis; print new Bio::Tools::Run::Analysis (-name => 'display::showdb') ->wait_for ( {} ) ->result ('outfile'); …or using BioPerl modules Direct usage of the Soaplab API…

What names to use for inputs? Ask getInputSpec() –some inputs are mutually exclusive (but Soaplab does not tell you  ) –supported types: basic types And the results? Ask getResultSpec() –expected types: basic types, byte[ ], byte[ ][ ] –better check org.embl.ebi.SoaplabClient.AxisUtils.aa2bb()

What else… Code examples at: – Play also with existing clients: java AnalysisClient –h java FactoryClient –h java RegistryAdmin –h java TutorialTest Downoad: soaplab-clients-version

B. Service provider EMBOSS provider –contains pre-generated XML files for all EMBOSS analysis (but not EMBOSS itself) Provider of your own analysis tools –contains for creating XML files Downoad: analysis-interfaces-version Downoad: applab-cembalo-soaplab-version (for EMBOSS) acd2xml (convertor)

Installation Run perl INSTALL.pl –and you will be asked many questions –or prepare your answers in environment variables and run: perl INSTALL.pl –q To add your own analyses? –write an ACD file (e.g. metadata/bigdeal.acd ) –run: generator/acd2xml –d –l MyApps.xml bigdeal –see generator/README for details

What questions to expect? basics JAVA_HOMEwhere is Java installed PROJECT_HOMEwhere is everything unpacked RESULTS_URLURL pointing to the server-side results tomcat and axis locations TOMCAT_HOMEdirectory where is a Tomcat servlet engine TOMCAT_URLURL accessing Tomcat (e.g. AXIS_LIBdirectory with jar files of the Apache Axis toolkit AXIS_IN_TOMCATdirectory where Axis is installed under TOMCAT mySQL locations (the whole mySQL stuff is, however, optional) MYSQL_URLlocation of mySQL Soaplab database MYSQL_USERusername of mySQL Soaplab database MYSQL_PASSWDpassword for mySQL Soaplab database rarely needed, only for your own analyses ADD_TO_PATHwill be added to PATH before the AppLab server starts nothing to do with web-services (so ignore it…) ALWEB_SCRIPTS_URLwhere are alweb cgi-bin scripts ALWEB_DOCS_URLwhere are alweb related documents basics JAVA_HOMEwhere is Java installed PROJECT_HOMEwhere is everything unpacked RESULTS_URLURL pointing to the server-side results tomcat and axis locations TOMCAT_HOMEdirectory where is a Tomcat servlet engine TOMCAT_URLURL accessing Tomcat (e.g. AXIS_LIBdirectory with jar files of the Apache Axis toolkit AXIS_IN_TOMCATdirectory where Axis is installed under TOMCAT mySQL locations (the whole mySQL stuff is, however, optional) MYSQL_URLlocation of mySQL Soaplab database MYSQL_USERusername of mySQL Soaplab database MYSQL_PASSWDpassword for mySQL Soaplab database rarely needed, only for your own analyses ADD_TO_PATHwill be added to PATH before the AppLab server starts nothing to do with web-services (so ignore it…) ALWEB_SCRIPTS_URLwhere are alweb cgi-bin scripts ALWEB_DOCS_URLwhere are alweb related documents

And run it!./run-AppLab-server –check AppLabServer.log (start your Tomcat)./ws/deploy-web-services try any client –check soaplab.log …complain to

Deploying services That can be tricky…because it includes many things: –move your classes to Tomcat –create service descriptors (files *.wsdd) –generate and compile code for the derived services –etc. Therefore, use a Soaplab admin client: –java AAdmin –help –which is used by ws/deploy-web-services, anyway