BiBiServ Logo
Attention:
Due to technical maintenance some tools might be unavailable.
See maintenance information.
BiBiServ -
                                    Bielefeld         University Bioinformatic Service
Tools
Education
Administration
Tools
Genome Comparison
Gecko
REPuter
...more
Alignments
PoSSuMsearch2
ChromA
...more
Primer Design
GeneFisher2
RNA Studio
RNAshapes
KnotInFrame
RNAhybrid
...more
Evolutionary Relationship
ROSE
...more
Others
XenDB
jPREdictor
...more

KnotInFrame - WebService

This is a short introduction of the KnotinFrame WebServices offered by the BiBiServ. If you're not familiar with webservices in general you should have a closer look at our webservice related linklist.

WSDL - methods, parameters and datatypes

If you have a closer look at the WSDL file describing the KnotInFrame webservice, you can see two methods belonging together.

request_orig and response_orig

Bioinformatic programs often perform computation on large data sets and therefore require much CPU time. This can cause problems such as http connection timeouts (usually after 5 minutes) during online usage. To avoid such problems when using knotinframe WebService we use a technique called Request and Reply with polling based on BiBiWS. First the client side (e.g. your program) requests a knotinframe job submitting the necessary data (parameter and data) and gets an id after the job is started. Afterwards the client can request the result by calling the corresponding response method with the id returned earlier. If the knotinframe job is not finished, the user gets a status code with an enhanced description of current status back (see HOBIT status codes for more information).

request_orig
The request_orig method ... (see table below for an example param array - default values in bold) and returns either a unique id or in case of an error a fault message.

key value description
inputdata string in fasta format fasta containing at least one DNA or RNA sequence
option1 1 < 10 < 50 Number of predictions

response_orig
The response_orig method gets the id returned by the request_orig method as input parameter and returns the calculated result as string on STDOUT

Example Perl client

The example perl client implementation for all methods is based on SOAP::Lite.
Request_orig:
 
                #!/usr/bin/env perl 
                use SOAP::Lite;

                my $wsdlurl = "http://bibiserv.techfak.uni-bielefeld.de/wsdl/knotinframe.wsdl";

                if(!defined $ARGV[1]) {
                        print "usage: request_orig.pl fastafile\n";
                        exit 1;
                }

                my $sequences = "";
                open(FILE, $ARGV[1]);
                while (FILE){
                        $sequences .= $_;
                }
                close FILE;

                print "Submitting your request ...\n";

                my @params = ("n", SOAP::Data->type(int => $ARGV[0]));

                my $result = SOAP::Lite->service($wsdlurl)
                                ->on_fault(sub {soapFaultHandler(@_)})
                                ->request_orig($sequences,\@params);

                print "got id: '$result'\n";

                sub soapFaultHandler {
                        my($soap, $res) = @_;
                    
                        if (ref $res) {
                                my $detail = $res->faultdetail;
                                if(defined($detail->{"hobitStatuscode"})) {
                                        print $detail->{"hobitStatuscode"}->{"description"};
                                        print "(".$detail->{"hobitStatuscode"}->{"statuscode"}.")\n";
                                } else {
                                        print "Servlet Error - no Hobit Statuscode\n";
                                }
                        } else {
                                print "HTTP Layer Error: ";
                                print $soap->transport->status."\n";
                        }
                        exit 1;
                }
          
Response_orig:
   
                #!/usr/bin/env perl 
                use SOAP::Lite;

                my $wsdlurl = "http://bibiserv.techfak.uni-bielefeld.de/wsdl/knotinframe.wsdl";

                if(!defined $ARGV[0]) {
                        print "usage: response_orig.pl bibiid\n";
                        exit 1;
                }

                print "Submitting your id...\n";

                my $result = SOAP::Lite->service($wsdlurl)
                                        ->on_fault(sub {soapFaultHandler(@_)})
                                        ->response_orig($ARGV[0]);

                print $result;

                sub soapFaultHandler {
                        my($soap, $res) = @_;

                        if (ref $res) {
                                my $detail = $res->faultdetail;
                                if(defined($detail->{"hobitStatuscode"})) {
                                        print $detail->{"hobitStatuscode"}->{"description"};
                                        print "(".$detail->{"hobitStatuscode"}->{"statuscode"}.")\n";
                                } else {
                                        print "Sevlet Error - no Hobit Statuscode\n";
                                }
                        } else {
                                print "HTTP layer Error: ";
                                print $soap->transport->status."\n";
                        }
                        exit 1;
                }
          
Welcome
Submission
WebService
References
Manual
Contact
Fri Dec 14 12:54:13 2012