From kawas at dev.open-bio.org Tue Apr 1 12:56:36 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 1 Apr 2008 12:56:36 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804011656.m31GuaKb010086@dev.open-bio.org> kawas Tue Apr 1 12:56:35 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY In directory dev.open-bio.org:/tmp/cvs-serv10050/Perl/MOSES-MOBY Modified Files: Changes Log Message: updated the changes file to mention the namespace checking moby-live/Perl/MOSES-MOBY Changes,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2008/04/01 16:56:35 1.4 @@ -3,6 +3,9 @@ .84 Date here .... - fixed a bug in Parser.pm that created xrefs and called non-existent method isSimpleXref. + - added namespace checking for inputs. It is + inserted into impl code that is generated, but + is commented out. .83 Tue Dec 11 7:52:35 2007 - updated the default moby url to be the From kawas at dev.open-bio.org Tue Apr 1 14:26:19 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 1 Apr 2008 14:26:19 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804011826.m31IQJnG010298@dev.open-bio.org> kawas Tue Apr 1 14:26:19 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies In directory dev.open-bio.org:/tmp/cvs-serv10263/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Modified Files: Services.pm Log Message: added file checking for isAlive.xml and put the isalive block in an eval because isalive information shouldnt kill rdf generation moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Services.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/02/21 17:15:41 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/04/01 18:26:19 1.3 @@ -315,42 +315,42 @@ new RDF::Core::Literal( $SI->name ) ) ); + eval{ + do { + # add is alive information if necessary + if ( $self->{is_alive_path} and -e $self->{is_alive_path} and -r $self->{is_alive_path} ."/isAliveStats.xml") { + my $parser = XML::LibXML->new(); + my $doc = + $parser->parse_file( + $self->{is_alive_path} . '/isAliveStats.xml' ); + my $value = "true"; + my $id = $SI->authority . "," . $SI->name; + my @nodelist = $doc->getElementsByTagName("service"); + for my $node (@nodelist) { + next unless ( $node->getAttribute('id') eq $id ); + $value = $node->textContent; + last; + } + $model->addStmt( + new RDF::Core::Statement( + $resource, + $resource->new( MOBY::RDF::Predicates::FETA->isAlive ), + new RDF::Core::Literal($value) + ) + ); + } else { - do { - # add is alive information if necessary - if ( $self->{is_alive_path} and -e $self->{is_alive_path} ) { - my $parser = XML::LibXML->new(); - my $doc = - $parser->parse_file( - $self->{is_alive_path} . '/isAliveStats.xml' ); - my $value = "true"; - my $id = $SI->authority . "," . $SI->name; - my @nodelist = $doc->getElementsByTagName("service"); - for my $node (@nodelist) { - next unless ( $node->getAttribute('id') eq $id ); - $value = $node->textContent; - last; + # by default, state the service is alive ... + $model->addStmt( + new RDF::Core::Statement( + $resource, + $resource->new( MOBY::RDF::Predicates::FETA->isAlive ), + new RDF::Core::Literal('true') + ) + ); } - $model->addStmt( - new RDF::Core::Statement( - $resource, - $resource->new( MOBY::RDF::Predicates::FETA->isAlive ), - new RDF::Core::Literal($value) - ) - ); - } else { - - # by default, state the service is alive ... - $model->addStmt( - new RDF::Core::Statement( - $resource, - $resource->new( MOBY::RDF::Predicates::FETA->isAlive ), - new RDF::Core::Literal('true') - ) - ); - } - } unless $addIsAlive =~ /no/i; - + } unless $addIsAlive =~ /no/i; + }; # add the authoring statements my $bnode = $node_factory->newResource; $model->addStmt( From kawas at dev.open-bio.org Fri Apr 4 09:51:50 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 4 Apr 2008 09:51:50 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804041351.m34Dpo5Z025794@dev.open-bio.org> kawas Fri Apr 4 09:51:49 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/t In directory dev.open-bio.org:/tmp/cvs-serv25759/Perl/MOBY-Server/t Modified Files: Client-Central.t Log Message: added a test for service type registration that checks for empty ISA relationships. Previously, servicetypes with relationship type "" were registered into the registry. moby-live/Perl/MOBY-Server/t Client-Central.t,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/t/Client-Central.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/t/Client-Central.t 2008/02/21 00:21:28 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/t/Client-Central.t 2008/04/04 13:51:49 1.2 @@ -71,6 +71,7 @@ $r = $C->deregisterObjectClass( objectType => "Rubbish" ); $r = $C->deregisterNamespace( namespaceType => 'RubbishNamespace' ); $r = $C->deregisterServiceType( serviceType => 'RubbishyService' ); + $r = $C->deregisterServiceType( serviceType => 'RubbishyServiceNoParent' ); }; # Can we connect to the registry? @@ -179,7 +180,18 @@ or diag("Name space registration failure: " . $r->message) ; ############ SERVICE-TYPE REGISTRATION ############# -my %ServiceType = ( serviceType => "RubbishyService", +#this registration should fail => empty relationship type +my %ServiceType = ( serviceType => "RubbishyServiceNoParent", + description => "a human-readable description of the service", + contactEmail => 'your at email.address', + authURI => "test.suite.com", + Relationships => { ISA => [''] } + ); +$r = $C->registerServiceType( %ServiceType ); +ok($r->success == 0, "\nService Type registration unsuccessful when no parent specified!") + or diag("\nService Type registration was successful when no parent type was specified:\n" . $r->message) ; + +%ServiceType = ( serviceType => "RubbishyService", description => "a human-readable description of the service", contactEmail => 'your at email.address', authURI => "test.suite.com", @@ -189,7 +201,6 @@ ok($r->success, "Service Type registration successful") or diag("Service Type registration failure: " . $r->message) ; - $r = $C->Relationships(objectType => $Obj{objectType}); isa_ok($r, "HASH", "Relationship types hash") or diag("Object Relationships didn't return a hashref for object types") ; From kawas at dev.open-bio.org Fri Apr 4 09:52:24 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 4 Apr 2008 09:52:24 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804041352.m34DqOSr025854@dev.open-bio.org> kawas Fri Apr 4 09:52:24 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY In directory dev.open-bio.org:/tmp/cvs-serv25819/Perl/MOBY-Server/lib/MOBY Modified Files: Central.pm Log Message: Previously, servicetypes with relationship type "" were registered into the registry. this should be fixed now moby-live/Perl/MOBY-Server/lib/MOBY Central.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm 2008/02/21 17:15:40 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm 2008/04/04 13:52:24 1.3 @@ -793,6 +793,10 @@ && &_LOG( "got $type, $desc, \%relationships, $email, $auth from registerServiceTypePayload\n" ); + + return + "FAILED! a service type '$type' was found to have no relationships\n" if keys( %relationships ) == 0 ; + return ( $type, $desc, \%relationships, $email, $auth ); } From mwilkinson at dev.open-bio.org Fri Apr 11 19:29:53 2008 From: mwilkinson at dev.open-bio.org (Mark Wilkinson) Date: Fri, 11 Apr 2008 19:29:53 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804112329.m3BNTrZG016869@dev.open-bio.org> mwilkinson Fri Apr 11 19:29:53 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY In directory dev.open-bio.org:/tmp/cvs-serv16850 Modified Files: Config.pm Log Message: trying to make the configuration a class variable rather than an instance variable moby-live/Perl/MOBY-Server/lib/MOBY Config.pm,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm 2008/02/21 00:21:27 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm 2008/04/11 23:29:53 1.2 @@ -50,11 +50,11 @@ #ATTRIBUTES my %_attr_data = # DEFAULT ACCESSIBILITY ( - mobycentral => [ undef, 'read/write' ], - mobyobject => [ undef, 'read/write' ], - mobynamespace => [ undef, 'read/write' ], - mobyservice => [ undef, 'read/write' ], - mobyrelationship => [ undef, 'read/write' ], + mobycentral => [ [], 'read/write' ], + mobyobject => [ [], 'read/write' ], + mobynamespace => [ [], 'read/write' ], + mobyservice => [ [], 'read/write' ], + mobyrelationship => [ [], 'read/write' ], valid_secondary_datatypes => [["String", "Integer", "DateTime", "Float", "Boolean"], 'read'], primitive_datatypes => [["String", "Integer", "DateTime", "Float", "Boolean"], 'read'], @@ -99,6 +99,7 @@ $self->{$attrname} = $self->_default_for($attrname); } } + return $self if $self->mobycentral->{'dbname'}; # if it has been set, then just return it my $file = $ENV{MOBY_CENTRAL_CONFIG}; ( -e $file ) || die "MOBY Configuration file $file doesn't exist $!\n"; chomp $file; From mwilkinson at dev.open-bio.org Fri Apr 11 19:35:34 2008 From: mwilkinson at dev.open-bio.org (Mark Wilkinson) Date: Fri, 11 Apr 2008 19:35:34 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804112335.m3BNZYZp016943@dev.open-bio.org> mwilkinson Fri Apr 11 19:35:34 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY In directory dev.open-bio.org:/tmp/cvs-serv16924 Modified Files: Config.pm Log Message: trying to make the configuration a class variable rather than an instance variable moby-live/Perl/MOBY-Server/lib/MOBY Config.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm 2008/04/11 23:29:53 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm 2008/04/11 23:35:34 1.3 @@ -50,11 +50,11 @@ #ATTRIBUTES my %_attr_data = # DEFAULT ACCESSIBILITY ( - mobycentral => [ [], 'read/write' ], - mobyobject => [ [], 'read/write' ], - mobynamespace => [ [], 'read/write' ], - mobyservice => [ [], 'read/write' ], - mobyrelationship => [ [], 'read/write' ], + mobycentral => [ {}, 'read/write' ], + mobyobject => [ {}, 'read/write' ], + mobynamespace => [ {}, 'read/write' ], + mobyservice => [ {}, 'read/write' ], + mobyrelationship => [ {}, 'read/write' ], valid_secondary_datatypes => [["String", "Integer", "DateTime", "Float", "Boolean"], 'read'], primitive_datatypes => [["String", "Integer", "DateTime", "Float", "Boolean"], 'read'], From mwilkinson at dev.open-bio.org Mon Apr 14 20:26:29 2008 From: mwilkinson at dev.open-bio.org (Mark Wilkinson) Date: Mon, 14 Apr 2008 20:26:29 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804150026.m3F0QTEd030465@dev.open-bio.org> mwilkinson Mon Apr 14 20:26:29 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY In directory dev.open-bio.org:/tmp/cvs-serv30446 Modified Files: Config.pm Log Message: trying to reduce number of file accesses to read the config file. Should speed-up MOBY considerably moby-live/Perl/MOBY-Server/lib/MOBY Config.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm 2008/04/11 23:35:34 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm 2008/04/15 00:26:29 1.4 @@ -45,21 +45,45 @@ @EXPORT = ('$CONFIG'); { - #Encapsulated class data - #___________________________________________________________ - #ATTRIBUTES my %_attr_data = # DEFAULT ACCESSIBILITY ( - mobycentral => [ {}, 'read/write' ], - mobyobject => [ {}, 'read/write' ], - mobynamespace => [ {}, 'read/write' ], - mobyservice => [ {}, 'read/write' ], - mobyrelationship => [ {}, 'read/write' ], + mobycentral => [ undef, 'read/write' ], + mobyobject => [ undef, 'read/write' ], + mobynamespace => [ undef, 'read/write' ], + mobyservice => [ undef, 'read/write' ], + mobyrelationship => [ undef, 'read/write' ], valid_secondary_datatypes => [["String", "Integer", "DateTime", "Float", "Boolean"], 'read'], primitive_datatypes => [["String", "Integer", "DateTime", "Float", "Boolean"], 'read'], ); + my $file = $ENV{MOBY_CENTRAL_CONFIG}; + ( -e $file ) || die "MOBY Configuration file $file doesn't exist $!\n"; + chomp $file; + if ( ( -e $file ) && ( !( -d $file ) ) ) { + open IN, $file + or die + "can't open MOBY Configuration file $file for unknown reasons: $!\n"; + } + my @sections = split /(\[\s*\S+\s*\][^\[]*)/s, join "", ; + + #print STDERR "split into @sections\n"; + foreach my $section (@sections) { + + #print STDERR "calling MOBY::dbConfig\n"; + my $dbConfig = + MOBY::dbConfig->new( section => $section ) + ; # this is an object full of strings, no actual connections. It represents the information in the config file + next unless $dbConfig; + my $dbname = $dbConfig->section_title; + next unless $dbname; + $_attr_data{$dbname} = [$dbConfig, 'read']; # something like $_attr_data{mobycentral} = [$config, 'read'] + } + + #Encapsulated class data + #___________________________________________________________ + #ATTRIBUTES + #_____________________________________________________________ # METHODS, to operate on encapsulated class data # Is a specified object attribute accessible in a given mode @@ -99,31 +123,8 @@ $self->{$attrname} = $self->_default_for($attrname); } } - return $self if $self->mobycentral->{'dbname'}; # if it has been set, then just return it - my $file = $ENV{MOBY_CENTRAL_CONFIG}; - ( -e $file ) || die "MOBY Configuration file $file doesn't exist $!\n"; - chomp $file; - if ( ( -e $file ) && ( !( -d $file ) ) ) { - open IN, $file - or die - "can't open MOBY Configuration file $file for unknown reasons: $!\n"; - } - my @sections = split /(\[\s*\S+\s*\][^\[]*)/s, join "", ; - - #print STDERR "split into @sections\n"; - foreach my $section (@sections) { - - #print STDERR "calling MOBY::dbConfig\n"; - my $dbConfig = - MOBY::dbConfig->new( section => $section ) - ; # this is an object full of strings, no actual connections. It represents the information in the config file - next unless $dbConfig; - my $dbname = $dbConfig->section_title; - next unless $dbname; - +# return $self if $self->mobycentral->{'dbname'}; # if it has been set, then just return it #print STDERR "setting the COnfig dbConfig for the title $dbname with object $dbConfig\n\n"; - $self->{$dbname} = $dbConfig; - } $CONFIG = $self; return $self; } From mwilkinson at dev.open-bio.org Mon Apr 14 20:36:23 2008 From: mwilkinson at dev.open-bio.org (Mark Wilkinson) Date: Mon, 14 Apr 2008 20:36:23 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804150036.m3F0aN0u030555@dev.open-bio.org> mwilkinson Mon Apr 14 20:36:23 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/t In directory dev.open-bio.org:/tmp/cvs-serv30536/t Modified Files: Central.t Added Files: mobycentral.config Log Message: MOBY Central triggers a load of the Config.pm module which now tries to read a configuration file as soon as it is loaded, so I just added a fake and empty config file just to silence the test harness moby-live/Perl/MOBY-Server/t mobycentral.config,NONE,1.1 Central.t,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/t/Central.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/t/Central.t 2008/02/21 00:21:28 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/t/Central.t 2008/04/15 00:36:23 1.2 @@ -39,6 +39,7 @@ CLIENT_ONLY + $ENV{MOBY_CENTRAL_CONFIG} = "./t/mobycentral.config"; # Test that modules required ONLY for local MOBY Central are installed. require_ok( "DBI" ) or diag($missing_modules); require_ok( "DBD::mysql" ) or diag($missing_modules); From senger at dev.open-bio.org Wed Apr 16 05:39:55 2008 From: senger at dev.open-bio.org (Martin Senger) Date: Wed, 16 Apr 2008 05:39:55 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804160939.m3G9dtBs001571@dev.open-bio.org> senger Wed Apr 16 05:39:55 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/Clients/help In directory dev.open-bio.org:/tmp/cvs-serv1552/src/Clients/help Modified Files: MosesGenerators_usage.txt Log Message: moby-live/Java/src/Clients/help MosesGenerators_usage.txt,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/help/MosesGenerators_usage.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/Clients/help/MosesGenerators_usage.txt 2008/02/22 09:37:39 1.3 +++ /home/repository/moby/moby-live/Java/src/Clients/help/MosesGenerators_usage.txt 2008/04/16 09:39:55 1.4 @@ -59,7 +59,8 @@ -n ... do NOT generate anything, just show what WOULD be generated -outdir - A directory where the results go to. Default is 'generated'. + A directory where the results go to. + Default is the current directory. -ng ... do NOT include graphs (showing connections to other Biomoby entities) in the generated Java API. This makes generating slightly faster. From kawas at dev.open-bio.org Wed Apr 16 09:52:03 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 16 Apr 2008 09:52:03 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804161352.m3GDq35K002106@dev.open-bio.org> kawas Wed Apr 16 09:52:03 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi In directory dev.open-bio.org:/tmp/cvs-serv2069/Perl/MOBY-Server/share/cgi Modified Files: service_tester.pl Log Message: *modified how IPC::Shareable is used to prevent shared memory from being recycled properly moby-live/Perl/MOBY-Server/share/cgi service_tester.pl,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/service_tester.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/service_tester.pl 2008/02/21 00:21:27 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/service_tester.pl 2008/04/16 13:52:03 1.2 @@ -68,7 +68,7 @@ close OUT; # create some shared variables -my $alive_handle = tie %ALIVE, 'IPC::Shareable', undef, { destroy => 'yes' }; +my $alive_handle = tie %ALIVE, 'IPC::Shareable', undef, { } or die "\n\tCouldn't tie shared variable:\n$!"; # create the central client and get all service providers once my $central = @@ -188,7 +188,14 @@ $root->appendChild($element); } -IPC::Shareable->clean_up_all; +# clean up the shared memory +eval { + warn "Attempting to clean up shared memory ..."; + IPC::Shareable->clean_up_all; + warn "Shared memory cleaned up successfully"; +}; + +warn "There was a problem cleaning up shared memory segments:\n$@\n" if $@; open( OUT, ">$DIRECTORY/$FILENAME" ) || die("Cannot Open File $DIRECTORY/$FILENAME $!"); print OUT $doc->toString(1); From kawas at dev.open-bio.org Wed Apr 16 09:55:28 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 16 Apr 2008 09:55:28 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804161355.m3GDtSTw002184@dev.open-bio.org> kawas Wed Apr 16 09:55:28 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv2149/Perl/MOBY-Server Modified Files: Changes Log Message: added updates that i know about to the changes file moby-live/Perl/MOBY-Server Changes,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Changes,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/02/21 00:21:28 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/04/16 13:55:28 1.2 @@ -1,5 +1,15 @@ Revision history for Perl extension MOBY. -1.00 +1.04 + - fixed bug that allowed service types to be registered + with empty ISA relationships. + - MOBY::Config now only reads the config file once instead + of numerous times. + - Attempted fix of shared memory bugs with service_tester.pl + Shared memory wasn't being recycled properly and led to the + server running the script to run out of memory segments, + causing the script to run, but not to produce any output. + +1.00 - CVS version of MOBY released to the world via CPAN! From senger at dev.open-bio.org Sat Apr 19 15:11:18 2008 From: senger at dev.open-bio.org (Martin Senger) Date: Sat, 19 Apr 2008 15:11:18 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804191911.m3JJBI8j010308@dev.open-bio.org> senger Sat Apr 19 15:11:18 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/Clients In directory dev.open-bio.org:/tmp/cvs-serv10271/src/Clients Modified Files: CreateMobyInput.java Log Message: moby-live/Java/src/Clients CreateMobyInput.java,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java 2007/05/29 03:51:46 1.9 +++ /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java 2008/04/19 19:11:18 1.10 @@ -6,7 +6,7 @@ // Copyright Martin Senger (martin.senger at gmail.com). // -import org.biomoby.shared.CentralAll; +import org.biomoby.shared.CentralCached; import org.biomoby.shared.MobyDataType; import org.biomoby.shared.MobyService; import org.biomoby.shared.event.LogListener; @@ -14,6 +14,7 @@ import org.biomoby.service.dashboard.data.DataTypeTreeTable; import org.biomoby.service.dashboard.data.ServiceInputPanel; import org.biomoby.client.CentralDigestCachedImpl; +import org.biomoby.client.CmdLineHelper; import org.tulsoft.tools.BaseCmdLine; import org.tulsoft.shared.FileUtils; @@ -44,24 +45,8 @@ * @author Martin Senger * @version $Id$ */ -public class CreateMobyInput { - - static boolean verbose; - - /************************************************************************* - * Return a help text how to use this client. - *************************************************************************/ - public static String getUsage() { - String helpFile = "help/CreateMobyInput_usage.txt"; - try { - return new String (FileUtils.findAndGetBinaryFile (helpFile)); - } catch (GException e) { - return - "Sorry but an error occured.\n" + - "I cannot find the help file '" + helpFile + "'.\n" + - e.getMessage(); - } - } +public class CreateMobyInput + extends CmdLineHelper { /************************************************************************* * Create a GUI for a single data type. @@ -128,7 +113,7 @@ if (doc != null) { XMLOutputter xo = new XMLOutputter(); xo.setFormat (Format.getPrettyFormat()); - System.out.println (xo.outputString (doc)); + msgln (xo.outputString (doc)); } } @@ -137,7 +122,7 @@ * an XML document representing complete input for a service. *************************************************************************/ protected void onPrint (ServiceInputPanel inputs) { - System.out.println (inputs.toXML()); + msgln (inputs.toXML()); } /************************************************************************* @@ -149,40 +134,31 @@ try { - BaseCmdLine cmd = new BaseCmdLine (args, true); - if (cmd.hasParam ("-help") || cmd.hasParam ("-h")) { - System.out.print (CreateMobyInput.getUsage()); - System.exit (0); - } + BaseCmdLine cmd = getCmdLine (args, CreateMobyInput.class); // there is not much to do without -data or -service String dataType = cmd.getParam ("-data"); String service = cmd.getParam ("-service"); if (dataType == null && service == null) { - System.err.println + emsgln ("Either '-data ' or '-service ' must be specified."); - System.exit (1); + exit (1); } // where is a Moby registry - String cachedir = cmd.getParam ("-cachedir"); - if (cachedir == null) - System.err.println ("WARNING: parameter -cachedir not given => no cache used."); - CentralAll worker = - new CentralDigestCachedImpl (cmd.getParam ("-e"), - cmd.getParam ("-uri"), - cachedir); - CentralDigestCachedImpl castWorker = (CentralDigestCachedImpl)worker; - - // how much to show - verbose = cmd.hasOption ("-v"); - if (! cmd.hasOption ("-q")) - ((Notifier)castWorker).addNotificationListener (new LogListener()); + CentralCached worker = getCachableRegistryWorker (cmd); - if (cmd.hasOption ("-debug")) { - worker.setDebug (true); + // there is not much to do without -cachedir + String cacheDir = cmd.getParam ("-cachedir"); + if (cacheDir == null) { + emsgln ("Parameter -cachedir must be specified."); + exit (1); } + // how much to show + if (! cmd.hasOption ("-q")) + worker.addNotificationListener (new LogListener()); + // load all data types MobyDataType[] dataTypes = worker.getDataTypes(); @@ -196,7 +172,7 @@ } } if (rootType == null) { - System.err.println ("Parameter -data specifies a non-existing data type."); + emsgln ("Parameter -data specifies a non-existing data type."); } else { new CreateMobyInput (rootType, dataTypes); } @@ -205,32 +181,22 @@ // load a service and show it in a table if (service != null) { MobyService mobyService = null; - if (cachedir == null) { - MobyService pattern = new MobyService (service); - pattern.setCategory (""); - MobyService[] services = worker.findService (pattern); - if (services.length > 0) - mobyService = services[0]; - } else { - MobyService[] services = worker.getServices(); - for (int i = 0; i < services.length; i++) { - if (service.equals (services[i].getName())) { - mobyService = services[i]; - break; - } + MobyService[] services = worker.getServices(); + for (int i = 0; i < services.length; i++) { + if (service.equals (services[i].getName())) { + mobyService = services[i]; + break; } } if (mobyService == null) { - System.err.println ("Parameter -service specifies a non-existing service."); + emsgln ("Parameter -service specifies a non-existing service."); } else { new CreateMobyInput (mobyService, dataTypes); } } - } catch (Exception e) { - System.err.println ("===ERROR==="); - e.printStackTrace(); - System.err.println ("==========="); + } catch (Throwable e) { + processErrorAndExit (e); } } From senger at dev.open-bio.org Sat Apr 19 15:11:18 2008 From: senger at dev.open-bio.org (Martin Senger) Date: Sat, 19 Apr 2008 15:11:18 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804191911.m3JJBIr3010290@dev.open-bio.org> senger Sat Apr 19 15:11:17 EDT 2008 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv10271/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.88,1.89 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.88 retrieving revision 1.89 diff -u -r1.88 -r1.89 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2008/03/28 11:19:02 1.88 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2008/04/19 19:11:17 1.89 @@ -1,3 +1,8 @@ +2008-04-20 Martin Senger + + * Changed CreateMobyInput client - it now requires to use the + local cache. + 2008-03-28 Martin Senger * Fixed a dependency for commons-collection in the project.pom. From senger at dev.open-bio.org Sat Apr 19 15:11:18 2008 From: senger at dev.open-bio.org (Martin Senger) Date: Sat, 19 Apr 2008 15:11:18 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804191911.m3JJBIlC010326@dev.open-bio.org> senger Sat Apr 19 15:11:18 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/Clients/help In directory dev.open-bio.org:/tmp/cvs-serv10271/src/Clients/help Modified Files: CreateMobyInput_usage.txt Log Message: moby-live/Java/src/Clients/help CreateMobyInput_usage.txt,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/help/CreateMobyInput_usage.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/Clients/help/CreateMobyInput_usage.txt 2008/02/22 09:37:39 1.4 +++ /home/repository/moby/moby-live/Java/src/Clients/help/CreateMobyInput_usage.txt 2008/04/19 19:11:18 1.5 @@ -1,11 +1,21 @@ Usage: run-create-input -h[elp] - run-create-input -data [] [] - run-create-input -service [] [] -or (after setting CLASSPATH) - java CreateMobyInput -h[elp] - java CreateMobyInput -data [] [] - java CreateMobyInput -service [] [] + run-create-input -cachedir -data [] [] + run-create-input -cachedir -service [] [] + +where -cachedir + is a mandatory argument; is a directory with local cache + +where specify what Moby registry to connect to + -e + is an endpoint of a Moby registry + -uri + is a URI defining Moby registry's namespace + or + -registry + is a convenient way to specify a known registry; + the list of known registries can be obtained by the -lr option + from the MobyCmdLineClient (run-cmdline-client -lr) where -data @@ -16,14 +26,6 @@ (e.g. -service Mabuhay) One of these parameters must be specified. -where specify what Moby registry to connect to - -cachedir - is a directory with cached entities of a Moby registry - -e - is an endpoint of a Moby registry - -uri - is a URI defining Moby registry's namespace - where are: -q ... quiet mode (prints only errors) From senger at dev.open-bio.org Mon Apr 21 09:44:06 2008 From: senger at dev.open-bio.org (Martin Senger) Date: Mon, 21 Apr 2008 09:44:06 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804211344.m3LDi6NJ007285@dev.open-bio.org> senger Mon Apr 21 09:44:05 EDT 2008 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv7266/xmls Modified Files: maven.xml Log Message: changing to maven-ant-tasks-2.0.9.jar moby-live/Java/xmls maven.xml,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/maven.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/xmls/maven.xml 2008/02/15 03:46:42 1.2 +++ /home/repository/moby/moby-live/Java/xmls/maven.xml 2008/04/21 13:44:05 1.3 @@ -24,8 +24,8 @@ - - + + From jmrc at dev.open-bio.org Wed Apr 23 09:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8Bcl012042@dev.open-bio.org> jmrc Wed Apr 23 09:08:10 EDT 2008 Update of /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test In directory dev.open-bio.org:/tmp/cvs-serv11953/Docs/asyncDocs/async-MOBY-test Modified Files: AsyncService.pm async-MOBY-test.cgi.pl sayHello-description.xml sayHello.wsdl Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Docs/asyncDocs/async-MOBY-test AsyncService.pm,1.1,1.2 async-MOBY-test.cgi.pl,1.1,1.2 sayHello-description.xml,1.1,1.2 sayHello.wsdl,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/AsyncService.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/AsyncService.pm 2008/03/10 12:31:31 1.1 +++ /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/AsyncService.pm 2008/04/23 13:08:10 1.2 @@ -4,7 +4,7 @@ use MOBY::CommonSubs qw(:all); use MOBY::Async::SimpleServer; use vars qw(@ISA); - at ISA = qw(MOBY::Async::SimpleServer); +use base qw(MOBY::Async::SimpleServer); # This variable is a subroutine which carry out the core of the service my $sayHello = sub { =================================================================== RCS file: /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/async-MOBY-test.cgi.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/async-MOBY-test.cgi.pl 2008/03/10 12:31:31 1.1 +++ /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/async-MOBY-test.cgi.pl 2008/04/23 13:08:10 1.2 @@ -9,14 +9,17 @@ my $server = new SOAP::Transport::HTTP::CGI; $server->serializer(WSRF::Serializer->new); $server->deserializer(WSRF::Deserializer->new); + +# Magic! It works! +$server->on_action(sub{}); + $server->dispatch_with({ $WSRF::Constants::MOBY.'#sayHello' => 'AsyncService', $WSRF::Constants::MOBY.'#sayHello_submit' => 'AsyncService', $WSRF::Constants::MOBY.'#sayGoodbye' => 'AsyncService', $WSRF::Constants::MOBY.'#sayGoodbye_submit' => 'AsyncService', - $WSRF::Constants::WSRP => 'AsyncService', - $WSRF::Constants::WSRL => 'AsyncService', - - + $WSRF::Constants::WSRPW.'/GetResourceProperty/GetResourcePropertyRequest' => 'AsyncService', + $WSRF::Constants::WSRPW.'/GetMultipleResourceProperties/GetMultipleResourcePropertiesRequest' => 'AsyncService', + $WSRF::Constants::WSRLW.'/ImmediateResourceTermination/DestroyRequest' => 'AsyncService', }); $server->handle(); =================================================================== RCS file: /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/sayHello-description.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/sayHello-description.xml 2008/03/10 12:31:31 1.1 +++ /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/sayHello-description.xml 2008/04/23 13:08:10 1.2 @@ -3,7 +3,7 @@ Annotations 0 moby-async - + jmrodriguez at cnio.es http://ubio.bioinfo.cnio.es/inb/cgi-bin/async-MOBY-test/async-MOBY-test.cgi @@ -19,4 +19,4 @@ - \ No newline at end of file + =================================================================== RCS file: /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/sayHello.wsdl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/sayHello.wsdl 2008/03/10 12:31:31 1.1 +++ /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/sayHello.wsdl 2008/04/23 13:08:10 1.2 @@ -130,7 +130,7 @@ - + @@ -148,7 +148,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -193,4 +193,4 @@ - \ No newline at end of file + From jmrc at dev.open-bio.org Wed Apr 23 09:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8BKL012012@dev.open-bio.org> jmrc Wed Apr 23 09:08:10 EDT 2008 Update of /home/repository/moby/moby-live/Docs/asyncDocs In directory dev.open-bio.org:/tmp/cvs-serv11953/Docs/asyncDocs Added Files: BioMOBY Asynchronous Service Specification v2.4.2.pdf Removed Files: BioMOBY Asynchronous Service Specification_v2.4.1.pdf Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Docs/asyncDocs BioMOBY Asynchronous Service Specification v2.4.2.pdf,NONE,1.1 BioMOBY Asynchronous Service Specification_v2.4.1.pdf,1.1,NONE rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/BioMOBY,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/Asynchronous,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/Service,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/Specification,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/BioMOBY,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/Asynchronous,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/Service,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/Specification_v2.4.1.pdf,v: No such file or directory From jmrc at dev.open-bio.org Wed Apr 23 09:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8Bos012096@dev.open-bio.org> jmrc Wed Apr 23 09:08:11 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv11953/Perl/MOBY-Server Modified Files: Makefile.PL Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Perl/MOBY-Server Makefile.PL,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL 2008/03/20 17:36:33 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL 2008/04/23 13:08:11 1.5 @@ -63,7 +63,7 @@ } # MOBY::Async requires - requires 'WSRF::Lite' => '0.8.2.2'; + requires 'WSRF::Lite' => '0.008.2.2'; requires 'XML::DOM' => ''; requires 'DateTime::Format::Epoch' => ''; requires 'DateTime::Format::W3CDTF' => ''; From jmrc at dev.open-bio.org Wed Apr 23 09:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8BjX012078@dev.open-bio.org> jmrc Wed Apr 23 09:08:11 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Client In directory dev.open-bio.org:/tmp/cvs-serv11953/Perl/MOBY-Client Modified Files: Makefile.PL Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Perl/MOBY-Client Makefile.PL,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Client/Makefile.PL,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/MOBY-Client/Makefile.PL 2008/03/05 18:38:40 1.5 +++ /home/repository/moby/moby-live/Perl/MOBY-Client/Makefile.PL 2008/04/23 13:08:11 1.6 @@ -55,7 +55,7 @@ } - requires 'WSRF::Lite' => '0.8.2.2'; + requires 'WSRF::Lite' => '0.008.2.2'; requires 'XML::DOM' => ''; requires 'DateTime::Format::Epoch' => ''; requires 'DateTime::Format::W3CDTF' => ''; From jmrc at dev.open-bio.org Wed Apr 23 09:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8B8G012136@dev.open-bio.org> jmrc Wed Apr 23 09:08:11 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY In directory dev.open-bio.org:/tmp/cvs-serv11953/Perl/MOBY-Server/lib/MOBY Modified Files: Async.pm Central.pm Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Perl/MOBY-Server/lib/MOBY Async.pm,1.2,1.3 Central.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async.pm 2008/02/21 17:15:40 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async.pm 2008/04/23 13:08:11 1.3 @@ -8,11 +8,19 @@ This is a set of tools for providing and invoking Asynchronous MOBY Services. -=head1 AUTHORS +=head1 FORMER AUTHORS Enrique de Andres Saiz (enrique.deandres at pcm.uam.es) - INB GNHC-1 (Madrid Science Park, Spain). +=head1 MAINTAINERS + +Jose Manuel Rodriguez Carrasco (jmrodriguez at cnio.es) - +INB GN-2 (Centro Nacional de Investigaciones Oncologicas, Spain). + +Jose Maria Fernandez Gonzalez (jmfernandez at cnio.es) - +INB GN-2 (Centro Nacional de Investigaciones Oncologicas, Spain). + =head1 DESCRIPTION MOBY::Async package provides a set of modules for working with Asynchronous MOBY @@ -22,21 +30,21 @@ =item MOBY::Async::SimpleServer -Provides a simple class that can be extended to build file based asynchronous +It provides a simple class that can be extended to build file based asynchronous services. =item MOBY::Async::Service -Provides a class to invoke asynchronous services. +It provides a class to invoke asynchronous services. =item MOBY::Async::LSAE -Provides functionalities to work with LSAE analysis event blocks. +It provides functionalities to work with LSAE analysis event blocks. =item MOBY::Async::WSRF -Extends WSRF::Lite perl module and provides everything required for -MOBY::Async::SimpleServer class. +It extends L perl module and provides everything required for +L class. =back @@ -47,7 +55,7 @@ From the server side, an asynchronous service is very similar to the traditional synchronous BioMOBY services. It is composed by a cgi (dispatcher.cgi) and a -Perl module wich extends MOBY::Async::SimpleServer class (HelloWorld.pm). +Perl module wich extends L class (HelloWorld.pm). B @@ -61,11 +69,13 @@ my $server = new SOAP::Transport::HTTP::CGI; $server->serializer(WSRF::Serializer->new); $server->deserializer(WSRF::Deserializer->new); + $server->on_action(sub{}); $server->dispatch_with({ $WSRF::Constants::MOBY.'#sayHello' => 'HelloWorld', $WSRF::Constants::MOBY.'#sayHello_submit' => 'HelloWorld', - $WSRF::Constants::WSRL => 'HelloWorld', - $WSRF::Constants::WSRP => 'HelloWorld', + $WSRF::Constants::WSRPW.'/GetResourceProperty/GetResourcePropertyRequest' => 'HelloWorld', + $WSRF::Constants::WSRPW.'/GetMultipleResourceProperties/GetMultipleResourcePropertiesRequest' => 'HelloWorld', + $WSRF::Constants::WSRLW.'/ImmediateResourceTermination/DestroyRequest' => 'HelloWorld', }); $server->handle(); @@ -75,14 +85,13 @@ use strict; use MOBY::CommonSubs qw(:all); use MOBY::Async::SimpleServer; - use vars qw(@ISA); - @ISA = qw(MOBY::Async::SimpleServer); + use base qw(MOBY::Async::SimpleServer); - # This environment variable is necessary - it is used internally + # This environment variable must be set - it is used internally # by MOBY::Async::SimpleServer class $ENV{AUTHURI} = 'your.auth.com'; - # This variable is a subroutine which carry out the core of the service + # This variable is a subroutine which carries out the core of the service my $sayHello = sub { my ($caller, $data) = @_; my $response = ''; @@ -99,7 +108,7 @@ return SOAP::Data->value(responseHeader($ENV{AUTHURI}).$response.responseFooter())->type('string'); }; - # This is the method that answers to synchronous requests + # This is the method which answers to synchronous requests sub sayHello { my $self = shift @_; # Here you can choose between sync or error @@ -107,7 +116,7 @@ #return $self->error(@_); } - # This is the method that answers to asynchronous requests + # This is the method which answers to asynchronous requests sub sayHello_submit { my $self = shift @_; return $self->async($sayHello, @_); @@ -115,7 +124,7 @@ 1; -A client that wishes to run an asynchronous service as HelloWorld must carry out +A client which wishes to run an asynchronous service as HelloWorld must carry out the following steps: 1. First we have a sayHello_submit (servicename_submit) invocation, which @@ -127,7 +136,7 @@ 2. After this, a polling is done by invocating GetMultipleResourceProperties operation. GetMultipleResourceProperties retrieve the content of one or several -properties. In this case, as we are trying to determine if a bach-call has +properties. In this case, as we are trying to determine if a batch-call has finished, we ask all status properties (status_queryID). The status returned for each status property is in LSAE format. Unless all status properties represent that execution for its respective query identifier is finished, we @@ -140,7 +149,7 @@ 4. The client also explicitly calls the WSRF Destroy operation to clean the results at the service side. -To do this, a client relies on MOBY::Async::Service class, whoose use is very +To do this, a client relies on MOBY::Async::Service class, whose use is very similar to MOBY::Client::Service class available for synchronous services: # By default, silent is true, then no messages about the progress are reported @@ -153,7 +162,7 @@ print "$response\n"; Additionally, MOBY::Async::Service class provides methods to carry out -individually the steps described previously: +individually the steps previously described: my $S = MOBY::Async::Service->new(service => $wsdl); my ($EPR, @queryIDs) = $S->submit(XMLinputlist => [ @@ -169,9 +178,13 @@ =head1 FURTHER READING -MOBY::Async::SimpleServer, MOBY::Async::Service, MOBY::Async::LSAE and -MOBY::Async::WSRF Perl module documentation. +L, L, L and +L Perl modules documentation. + +Asynchronous BioMOBY Services Specification: +L -Asynchronous BioMOBY Services Specification. +WSRF Specifications: +L =cut =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm 2008/04/04 13:52:24 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm 2008/04/23 13:08:11 1.4 @@ -4264,7 +4264,7 @@ - + @@ -4282,7 +4282,7 @@ - + @@ -4300,7 +4300,7 @@ - + From jmrc at dev.open-bio.org Wed Apr 23 09:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8Brj012060@dev.open-bio.org> jmrc Wed Apr 23 09:08:11 EDT 2008 Update of /home/repository/moby/moby-live/Perl In directory dev.open-bio.org:/tmp/cvs-serv11953/Perl Modified Files: INSTALL Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Perl INSTALL,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/INSTALL,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/INSTALL 2008/02/22 17:25:12 1.4 +++ /home/repository/moby/moby-live/Perl/INSTALL 2008/04/23 13:08:11 1.5 @@ -14,6 +14,7 @@ ###INSTALLATION OF CLIENT### cd MOBY-Client +perl populate_libs.pl perl Makefile.PL make make install From jmrc at dev.open-bio.org Wed Apr 23 09:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8BgO012170@dev.open-bio.org> jmrc Wed Apr 23 09:08:11 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async In directory dev.open-bio.org:/tmp/cvs-serv11953/Perl/MOBY-Server/lib/MOBY/Async Modified Files: LSAE.pm Service.pm SimpleServer.pm WSRF.pm Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Perl/MOBY-Server/lib/MOBY/Async LSAE.pm,1.1,1.2 Service.pm,1.1,1.2 SimpleServer.pm,1.1,1.2 WSRF.pm,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/LSAE.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/LSAE.pm 2008/02/21 00:21:27 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/LSAE.pm 2008/04/23 13:08:11 1.2 @@ -199,7 +199,7 @@ use XML::LibXML; use Exporter; -our @ISA = qw(Exporter); +use base qw(Exporter); our @EXPORT = qw( LSAE_BASE_EVENT =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/Service.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/Service.pm 2008/02/21 00:21:27 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/Service.pm 2008/04/23 13:08:11 1.2 @@ -17,7 +17,7 @@ =head1 DESCRIPTION -Provides a class to invoke asynchronous services. Its use is very similar to +It provides a class to invoke asynchronous services. Its use is very similar to MOBY::Client::Service, but it also provides additional methods in order to have more control over the asynchronous service execution. @@ -133,8 +133,7 @@ use MOBY::Async::LSAE; use MOBY::CommonSubs qw(:all); use MOBY::Client::Service; -use vars qw(@ISA); - at ISA = qw(MOBY::Client::Service); +use base qw(MOBY::Client::Service); sub new { @@ -428,14 +427,22 @@ my $searchTerm = ""; foreach my $queryID (@queryIDs) { - $searchTerm .= ""; - $searchTerm .= "status_".$queryID; + #$searchTerm .= ""; + #$searchTerm .= "mobyws:status_".$queryID; + #$searchTerm .= ""; + $searchTerm .= ""; + $searchTerm .= "mobyws:status_".$queryID; $searchTerm .= ""; } +# my $ans = WSRF::Lite +# -> uri($WSRF::Constants::WSRPW) +# -> on_action( sub {sprintf '%s/%s', @_} ) +# -> wsaddress($EPR) +# -> GetMultipleResourceProperties(SOAP::Data->value($searchTerm)->type('xml')); my $ans = WSRF::Lite -> uri($WSRF::Constants::WSRP) - -> on_action( sub {sprintf '%s/%s', @_} ) + -> on_action( sub {sprintf '%s/%s/%sRequest', $WSRF::Constants::WSRPW,$_[1],$_[1]} ) -> wsaddress($EPR) -> GetMultipleResourceProperties(SOAP::Data->value($searchTerm)->type('xml')); die "ERROR: ".$ans->faultstring if ($ans->fault); @@ -464,14 +471,14 @@ my $searchTerm = ""; foreach my $queryID (@queryIDs) { - $searchTerm .= ""; - $searchTerm .= "result_".$queryID; + $searchTerm .= ""; + $searchTerm .= "mobyws:result_".$queryID; $searchTerm .= ""; } my $ans = WSRF::Lite -> uri($WSRF::Constants::WSRP) - -> on_action( sub {sprintf '%s/%s', @_} ) + -> on_action( sub {sprintf '%s/%s/%sRequest', $WSRF::Constants::WSRPW,$_[1],$_[1]} ) -> wsaddress($EPR) -> GetMultipleResourceProperties(SOAP::Data->value($searchTerm)->type('xml')); die "ERROR: ".$ans->faultstring if ($ans->fault); @@ -499,7 +506,7 @@ my $ans = WSRF::Lite -> uri($WSRF::Constants::WSRL) - -> on_action( sub {sprintf '%s/%s', @_} ) + -> on_action( sub {sprintf '%s/ImmediateResourceTermination/%sRequest', $WSRF::Constants::WSRLW,$_[1]} ) -> wsaddress($EPR) -> Destroy(); die "ERROR: ".$ans->faultstring if ($ans->fault); =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/SimpleServer.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/SimpleServer.pm 2008/02/21 00:21:27 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/SimpleServer.pm 2008/04/23 13:08:11 1.2 @@ -90,13 +90,14 @@ package MOBY::Async::SimpleServer; use strict; +use CGI; use XML::LibXML; use POSIX qw(setsid); use MOBY::CommonSubs qw(:all); use MOBY::Async::LSAE; use MOBY::Async::WSRF; -use vars qw(@ISA); - at ISA = qw(WSRF::FileBasedMobyResourceLifetimes); + +use base qw(WSRF::FileBasedMobyResourceLifetimes); #=============================================================================== # async_create @@ -114,7 +115,24 @@ # Create an EndpointReference for the resource my $EPR = WSRF::WS_Address->new(); - $EPR->Address("http://".$ENV{SERVER_NAME}.$ENV{SCRIPT_NAME}); + + my($query)=CGI->new(); + my($proto)=($query->https())?'https':'http'; + my($host)=$query->virtual_host(); + my($port)=$query->virtual_port(); + if(($proto eq 'http' && $port eq '80') || ($proto eq 'https' && $port eq '443')) { + $port=''; + } else { + $port = ':'.$port; + } + my($relpath)=$query->script_name(); + my($virtualrel)=$ENV{'HTTP_VIA'} || $ENV{'HTTP_FORWARDED'} || $ENV{'HTTP_X_FORWARDED_FOR'}; + if(defined($virtualrel) && $virtualrel =~ /^(?:https?:\/\/[^:\/]+)?(?::[0-9]+)?(\/.*)/) { + $relpath=$1; + } + + $EPR->Address("$proto://$host$port$relpath?asyncId=$ID"); + #$EPR->Address("http://".$ENV{SERVER_NAME}.$ENV{SCRIPT_NAME}); $EPR->ReferenceParameters(''.$ENV{ID}.''); $EPR = XML::LibXML->new->parse_string($EPR->XML)->getDocumentElement->toString; @@ -141,7 +159,8 @@ my ($func, $data) = @_; # Get input queryIDs and store them - my $lock = WSRF::MobyFile->new($envelope); + my $ID=$ENV{ID}; + my $lock = WSRF::MobyFile->new($envelope,$ID); my $inputs = serviceInputParser($data); my @queryIDs = keys %$inputs; $WSRF::WSRP::Private{queryIDs} = \@queryIDs; @@ -167,7 +186,7 @@ my $property_result = "result_$queryID"; # Check if service is running or not - my $lock = WSRF::MobyFile->new($envelope); + my $lock = WSRF::MobyFile->new($envelope,$ID); if ($WSRF::WSRP::Private{$property_pid}) { $lock->toFile(); } else { @@ -265,7 +284,7 @@ $status->id($queryID); # New properties values - my $lock = WSRF::MobyFile->new($envelope); + $lock = WSRF::MobyFile->new($envelope,$ID); $WSRF::WSRP::Private{$property_pid} = $$; $WSRF::WSRP::ResourceProperties{$property_status} = $status->XML(); $WSRF::WSRP::ResourceProperties{$property_result} = ''; @@ -275,12 +294,10 @@ my $result; eval { my $xml = $func->($class, $input); - if(UNIVERSAL::isa($xml,'XML::LibXML::Node')) { - if(UNIVERSAL::isa($xml,'XML::LibXML::Document')) { - $result=$xml->getDocumentElement()->toString(); - } else { - $result=$xml->toString(); - } + if(UNIVERSAL::isa($xml,'XML::LibXML::Document')) { + $result=$xml->getDocumentElement()->toString(); + } elsif(UNIVERSAL::isa($xml,'XML::LibXML::Node')) { + $result=$xml->toString(); } else { my $parser = XML::LibXML->new(); my $toparse; @@ -331,7 +348,7 @@ } # New properties values - $lock = WSRF::MobyFile->new($envelope); + $lock = WSRF::MobyFile->new($envelope,$ID); $WSRF::WSRP::Private{$property_pid} = ''; $WSRF::WSRP::ResourceProperties{$property_status} = $status->XML(); $WSRF::WSRP::ResourceProperties{$property_result} = $result; @@ -344,7 +361,7 @@ } # Compose response using the status properties - $lock = WSRF::MobyFile->new($envelope); + $lock = WSRF::MobyFile->new($envelope,$ID); my $ans = ''; foreach my $queryID (@queryIDs) { my $property_status = "status_$queryID"; @@ -469,7 +486,6 @@ sub Destroy { my ($class, $envelope) = ($_[0], $_[$#_]); - $ENV{ID} = $envelope->valueof("/{$SOAP::Constants::NS_ENV}Envelope/{$SOAP::Constants::NS_ENV}Header/{$WSRF::Constants::MOBY}ServiceInvocationId"); my $lock = WSRF::MobyFile->new($envelope); $lock->toFile(); =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/WSRF.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/WSRF.pm 2008/02/21 00:21:27 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/WSRF.pm 2008/04/23 13:08:11 1.2 @@ -11,17 +11,17 @@ INB GNHC-1 (Madrid Science Park, Spain) (2006-2007). Maintainers -Jose Maria Fernandez (jmfernandez at cnio.es), -Jose Manuel Rodriguez (jmrodriguez at cnio.es) - +Jose Manuel Rodriguez (jmrodriguez at cnio.es), +Jose Maria Fernandez (jmfernandez at cnio.es) - INB GN2 (CNIO, Spain). =head1 DESCRIPTION -Extends WSRF::Lite perl module and provides everything required for -MOBY::Async::SimpleServer class. +It extends L Perl module and provides everything required for +L class. It is not intendeed to be used directly unless you want to create a new class -as WSRF::Async::SimpleServer +as L. =cut @@ -42,6 +42,8 @@ #$WSRF::Constants::WSSG = 'http://docs.oasis-open.org/wsrf/sg-2'; #$WSRF::Constants::WSBF = 'http://docs.oasis-open.org/wsrf/bf-2'; #$WSRF::Constants::WSA_ANON = 'http://www.w3.org/2005/08/addressing/anonymous'; +$WSRF::Constants::WSRPW = 'http://docs.oasis-open.org/wsrf/rpw-2'; +$WSRF::Constants::WSRLW = 'http://docs.oasis-open.org/wsrf/rlw-2'; #=============================================================================== # WSRF::Serializer @@ -50,63 +52,63 @@ # CAN INSERT HEADERS WHEN A FAULT OCCURS # package WSRF::Serializer; -use vars qw(@ISA); - at ISA = qw(WSRF::WSRFSerializer); +use base qw(WSRF::WSRFSerializer); my $WSRF_HEADER; sub std_envelope { - SOAP::Trace::trace('()'); - my $self = shift->new; - my $type = shift; - - $self->autotype(0); - $self->attr ({'xmlns:wsa' => $WSRF::Constants::WSA, - 'xmlns:wsrl' => $WSRF::Constants::WSRL, - 'xmlns:wsrp' => $WSRF::Constants::WSRP, - 'xmlns:wsu' => $WSRF::Constants::WSU, - 'xmlns:wsse' => $WSRF::Constants::WSSE - } ); - - - my(@parameters, @header); - for (@_) { - # Find all the SOAP Headers - if (defined($_) && ref($_) && UNIVERSAL::isa($_ => 'SOAP::Header')) { - push(@header, $_); - - # Find all the SOAP Message Parts (attachments) - } elsif (defined($_) && ref($_) && - $self->context && $self->context->packager->is_supported_part($_)) { - $self->context->packager->push_part($_); - - # Find all the SOAP Body elements - } else { - push(@parameters, $_); - } - } - my $header = @header ? SOAP::Data->set_value(@header) : undef; - $header = $WSRF_HEADER unless ($header); ########## THIS IS THE LINE I HAVE ADDED ########## - my($body,$parameters); - if ($type eq 'method' || $type eq 'response') { - SOAP::Trace::method(@parameters); - - my $method = shift(@parameters); -# or die "Unspecified method for SOAP call\n"; - - $parameters = @parameters ? SOAP::Data->set_value(@parameters) : undef; - if (!defined($method)) { - } elsif (UNIVERSAL::isa($method => 'SOAP::Data')) { - $body = $method; - } elsif ($self->use_default_ns) { - if ($self->{'_ns_uri'}) { - $body = SOAP::Data->name($method)->attr( { - 'xmlns' => $self->{'_ns_uri'}, - } ); - } else { - $body = SOAP::Data->name($method); - } - } else { + SOAP::Trace::trace('()'); + my $self = shift->new; + my $type = shift; + + $self->autotype(0); + $self->attr ({'xmlns:wsa' => $WSRF::Constants::WSA, + 'xmlns:wsrl' => $WSRF::Constants::WSRL, + 'xmlns:wsrp' => $WSRF::Constants::WSRP, + 'xmlns:wsu' => $WSRF::Constants::WSU, + 'xmlns:wsse' => $WSRF::Constants::WSSE + } ); + + + my(@parameters, @header); + for (@_) { + # Find all the SOAP Headers + if (defined($_) && ref($_) && UNIVERSAL::isa($_ => 'SOAP::Header')) { + push(@header, $_); + + # Find all the SOAP Message Parts (attachments) + } elsif (defined($_) && ref($_) && + $self->context && $self->context->packager->is_supported_part($_) + ) { + $self->context->packager->push_part($_); + + # Find all the SOAP Body elements + } else { + push(@parameters, $_); + } + } + my $header = @header ? SOAP::Data->set_value(@header) : undef; + $header = $WSRF_HEADER unless ($header); ########## THIS IS THE LINE I HAVE ADDED ########## + my($body,$parameters); + if ($type eq 'method' || $type eq 'response') { + SOAP::Trace::method(@parameters); + + my $method = shift(@parameters); + # or die "Unspecified method for SOAP call\n"; + + $parameters = @parameters ? SOAP::Data->set_value(@parameters) : undef; + if (!defined($method)) { + } elsif (UNIVERSAL::isa($method => 'SOAP::Data')) { + $body = $method; + } elsif ($self->use_default_ns) { + if ($self->{'_ns_uri'}) { + $body = SOAP::Data->name($method)->attr( { + 'xmlns' => $self->{'_ns_uri'}, + } ); + } else { + $body = SOAP::Data->name($method); + } + } else { # Commented out by Byrne on 1/4/2006 - to address default namespace problems # $body = SOAP::Data->name($method)->uri($self->{'_ns_uri'}); # $body = $body->prefix($self->{'_ns_prefix'}) if ($self->{'_ns_prefix'}); @@ -114,75 +116,80 @@ # Added by Byrne on 1/4/2006 - to avoid the unnecessary creation of a new # namespace # Begin New Code (replaces code commented out above) - $body = SOAP::Data->name($method); - my $pre = $self->find_prefix($self->{'_ns_uri'}); - $body = $body->prefix($pre) if ($self->{'_ns_prefix'}); + $body = SOAP::Data->name($method); + my $pre = $self->find_prefix($self->{'_ns_uri'}); + $body = $body->prefix($pre) if ($self->{'_ns_prefix'}); # End new code - } - # This is breaking a unit test right now... - $body->set_value(SOAP::Utils::encode_data($parameters ? \$parameters : ())) - if $body; - } elsif ($type eq 'fault') { - SOAP::Trace::fault(@parameters); - $body = SOAP::Data - -> name(SOAP::Utils::qualify($self->envprefix => 'Fault')) - # parameters[1] needs to be escaped - thanks to aka_hct at gmx dot de - # commented on 2001/03/28 because of failing in ApacheSOAP - # need to find out more about it - # -> attr({'xmlns' => ''}) - -> value(\SOAP::Data->set_value( - SOAP::Data->name(faultcode => SOAP::Utils::qualify($self->envprefix => $parameters[0]))->type(""), - SOAP::Data->name(faultstring => SOAP::Utils::encode_data($parameters[1]))->type(""), - defined($parameters[2]) ? SOAP::Data->name(detail => do{my $detail = $parameters[2]; ref $detail ? \$detail : $detail}) : (), - defined($parameters[3]) ? SOAP::Data->name(faultactor => $parameters[3])->type("") : (), - )); - } elsif ($type eq 'freeform') { - SOAP::Trace::freeform(@parameters); - $body = SOAP::Data->set_value(@parameters); - } elsif (!defined($type)) { - # This occurs when the Body is intended to be null. When no method has been - # passed in of any kind. - } else { - die "Wrong type of envelope ($type) for SOAP call\n"; - } - - $self->seen({}); # reinitialize multiref table - # Build the envelope - # Right now it is possible for $body to be a SOAP::Data element that has not - # XML escaped any values. How do you remedy this? - my($encoded) = $self->encode_object( - SOAP::Data->name(SOAP::Utils::qualify($self->envprefix => 'Envelope') => \SOAP::Data->value( - ($header ? SOAP::Data->name(SOAP::Utils::qualify($self->envprefix => 'Header') => \$header) : ()), - ($body ? SOAP::Data->name(SOAP::Utils::qualify($self->envprefix => 'Body') => \$body) - ->attr( { - 'wsu:Id' => 'myBody' - } ) : - SOAP::Data->name(SOAP::Utils::qualify($self->envprefix => 'Body')) - ->attr( { - 'wsu:Id' => 'myBody' - } ) - ), - ))->attr($self->attr) - ); - $self->signature($parameters->signature) if ref $parameters; - - # IMHO multirefs should be encoded after Body, but only some - # toolkits understand this encoding, so we'll keep them for now (04/15/2001) - # as the last element inside the Body - # v -------------- subelements of Envelope - # vv -------- last of them (Body) - # v --- subelements - push(@{$encoded->[2]->[-1]->[2]}, $self->encode_multirefs) if ref $encoded->[2]->[-1]->[2]; - - # Sometimes SOAP::Serializer is invoked statically when there is no context. - # So first check to see if a context exists. - # TODO - a context needs to be initialized by a constructor? - if ($self->context && $self->context->packager->parts) { - # TODO - this needs to be called! Calling it though wraps the payload twice! - # return $self->context->packager->package($self->xmlize($encoded)); - } - return $self->xmlize($encoded); + } + # This is breaking a unit test right now... + $body->set_value(SOAP::Utils::encode_data($parameters ? \$parameters : ())) + if $body; + } elsif ($type eq 'fault') { + SOAP::Trace::fault(@parameters); + $body = SOAP::Data + ->name(SOAP::Utils::qualify($self->envprefix => 'Fault')) + # parameters[1] needs to be escaped - thanks to aka_hct at gmx dot de + # commented on 2001/03/28 because of failing in ApacheSOAP + # need to find out more about it + # -> attr({'xmlns' => ''}) + ->value(\SOAP::Data->set_value( + SOAP::Data->name(faultcode => SOAP::Utils::qualify($self->envprefix => $parameters[0]))->type(""), + SOAP::Data->name(faultstring => SOAP::Utils::encode_data($parameters[1]))->type(""), + defined($parameters[2]) ? SOAP::Data->name(detail => do{my $detail = $parameters[2]; ref $detail ? \$detail : $detail}) : (), + defined($parameters[3]) ? SOAP::Data->name(faultactor => $parameters[3])->type("") : (), + )); + } elsif ($type eq 'freeform') { + SOAP::Trace::freeform(@parameters); + $body = SOAP::Data->set_value(@parameters); + } elsif (!defined($type)) { + # This occurs when the Body is intended to be null. When no method has been + # passed in of any kind. + } else { + die "Wrong type of envelope ($type) for SOAP call\n"; + } + + $self->seen({}); # reinitialize multiref table + # Build the envelope + # Right now it is possible for $body to be a SOAP::Data element that has not + # XML escaped any values. How do you remedy this? + my($encoded) = $self->encode_object( + SOAP::Data->name( + SOAP::Utils::qualify($self->envprefix => 'Envelope') => \SOAP::Data->value( + ($header ? SOAP::Data->name(SOAP::Utils::qualify($self->envprefix => 'Header') => \$header) : ()), + ($body ? SOAP::Data + ->name(SOAP::Utils::qualify($self->envprefix => 'Body') => \$body) + ->attr( { + 'wsu:Id' => 'myBody' + } ) + : + SOAP::Data + ->name(SOAP::Utils::qualify($self->envprefix => 'Body')) + ->attr( { + 'wsu:Id' => 'myBody' + } ) + ), + ) + )->attr($self->attr) + ); + $self->signature($parameters->signature) if ref $parameters; + + # IMHO multirefs should be encoded after Body, but only some + # toolkits understand this encoding, so we'll keep them for now (04/15/2001) + # as the last element inside the Body + # v -------------- subelements of Envelope + # vv -------- last of them (Body) + # v --- subelements + push(@{$encoded->[2]->[-1]->[2]}, $self->encode_multirefs) if ref $encoded->[2]->[-1]->[2]; + + # Sometimes SOAP::Serializer is invoked statically when there is no context. + # So first check to see if a context exists. + # TODO - a context needs to be initialized by a constructor? + if ($self->context && $self->context->packager->parts) { + # TODO - this needs to be called! Calling it though wraps the payload twice! + # return $self->context->packager->package($self->xmlize($encoded)); + } + return $self->xmlize($encoded); } @@ -198,8 +205,8 @@ # package WSRF::FileBasedMobyResourceProperties; use strict; -use vars qw(@ISA); - at ISA = qw(WSRF::WSRP); +use XML::LibXML; +use base qw(WSRF::WSRP); # Load the ResourceProperties from the file into the ResourceProperties hash # then call the super operation. @@ -207,15 +214,51 @@ my $self = shift @_; my $envelope = pop @_; - $ENV{ID} = $envelope->valueof("/{$SOAP::Constants::NS_ENV}Envelope/{$SOAP::Constants::NS_ENV}Header/{$WSRF::Constants::MOBY}ServiceInvocationId"); my $lock = WSRF::MobyFile->new($envelope); $lock->toFile(); + + my($isValidQName)=1; + my($search)=undef; + my($localsearch)=undef; + eval { + my($parser)=XML::LibXML->new(); + my($context)=XML::LibXML::XPathContext->new(); + $context->registerNs('wsrf-rp',$WSRF::Constants::WSRP); + my($envxml)=$parser->parse_string($envelope->raw_xml()); + foreach my $searchnode ($context->findnodes('//wsrf-rp:GetResourceProperty',$envxml)) { + $search=$searchnode->textContent(); + + $localsearch=$search; + my($prefix)=''; + my($icolon)=index($search,':'); + if($icolon!=-1) { + $prefix=substr($search,0,$icolon); + $localsearch=substr($search,$icolon+1); + } + my($nsnode)=$searchnode->lookupNamespaceURI($prefix); + unless(defined($nsnode) && $nsnode eq $WSRF::Constants::MOBY) { + $isValidQName=undef; + } + + last; + } + }; + + if($@) { + $search = $envelope->valueof("//{$WSRF::Constants::WSRP}GetResourceProperty/"); + $localsearch=$search; + my($prefix)=''; + my($icolon)=index($search,':'); + if($icolon!=-1) { + $prefix=substr($search,0,$icolon); + $localsearch=substr($search,$icolon+1); + } + } - my $search = $envelope->valueof("//{$WSRF::Constants::WSRP}GetResourceProperty/"); WSRF::BaseFaults::die_with_fault( $envelope, ( BaseFault => "InvalidResourcePropertyQNameFault", Description => "Property $search does not exist" - ) ) unless (defined($WSRF::WSRP::ResourceProperties{$search})); + ) ) unless(defined($isValidQName) && exists($WSRF::WSRP::ResourceProperties{$localsearch}) && defined($WSRF::WSRP::ResourceProperties{$localsearch})); my @resp = $self->SUPER::GetResourceProperty($envelope); return @resp; @@ -226,14 +269,49 @@ sub GetMultipleResourceProperties { my $self = shift @_; my $envelope = pop @_; - - $ENV{ID} = $envelope->valueof("/{$SOAP::Constants::NS_ENV}Envelope/{$SOAP::Constants::NS_ENV}Header/{$WSRF::Constants::MOBY}ServiceInvocationId"); + my $lock = WSRF::MobyFile->new($envelope); $lock->toFile(); my @notfound; - foreach my $search ($envelope->valueof("//{$WSRF::Constants::WSRP}ResourceProperty/")) { - push(@notfound, $search) unless (defined($WSRF::WSRP::ResourceProperties{$search})); + eval { + my($parser)=XML::LibXML->new(); + my($context)=XML::LibXML::XPathContext->new(); + $context->registerNs('wsrf-rp',$WSRF::Constants::WSRP); + my($envxml)=$parser->parse_string($envelope->raw_xml()); + foreach my $searchnode ($context->findnodes('//wsrf-rp:ResourceProperty',$envxml)) { + my($search)=$searchnode->textContent(); + + my($localsearch)=$search; + my($prefix)=''; + my($icolon)=index($search,':'); + if($icolon!=-1) { + $prefix=substr($search,0,$icolon); + $localsearch=substr($search,$icolon+1); + } + my($isValidQName)=undef; + my($nsnode)=$searchnode->lookupNamespaceURI($prefix); + if(defined($nsnode) && $nsnode eq $WSRF::Constants::MOBY) { + $isValidQName=1; + } + + push(@notfound, $search) unless(defined($isValidQName) && exists($WSRF::WSRP::ResourceProperties{$localsearch}) && defined($WSRF::WSRP::ResourceProperties{$localsearch})); + + } + }; + + if($@) { + foreach my $search ($envelope->valueof("//{$WSRF::Constants::WSRP}ResourceProperty/")) { + my($localsearch)=$search; + my($prefix)=''; + my($icolon)=index($search,':'); + if($icolon!=-1) { + $prefix=substr($search,0,$icolon); + $localsearch=substr($search,$icolon+1); + } + + push(@notfound, $search) unless(exists($WSRF::WSRP::ResourceProperties{$localsearch}) && defined($WSRF::WSRP::ResourceProperties{$localsearch})); + } } WSRF::BaseFaults::die_with_fault( $envelope, ( BaseFault => "InvalidResourcePropertyQNameFault", @@ -244,6 +322,57 @@ return @resp; } +#sub GetMultipleResourcePropertiesRequest { +# my $self = shift @_; +# my $envelope = pop @_; +# my $methodname = (caller(0))[3]; +# $methodname = substr($methodname,rindex($methodname,':')+1); +# eval { +# my $parser=XML::LibXML->new(); +# my $envxml = $parser->parse_string($envelope->raw_xml); +# my $context=XML::LibXML::XPathContext->new(); +# $context->registerNs('s11',$SOAP::Constants::NS_ENV); +# $context->registerNs('wsa',$WSRF::Constants::WSA); +# my(@actions)=$context->findnodes('/s11:Envelope/s11:Header/wsa:Action[1]',$envxml); +# if(scalar(@actions)>0) { +# my($action)=$actions[0]; +# my $acturi = $action->textContent(); +# my $newacturi= $acturi; +# $newacturi =~ s/Request$//; +# if( $acturi ne $newacturi) { +# foreach my $child ($action->childNodes) { +# $action->removeChild($child); +# } +# $action->appendChild($envxml->createTextNode($newacturi)); +# +# +# my(@query)=$context->findnodes("/s11:Envelope/s11:Body/wsa:$methodname".'[1]',$envxml); +# if(scalar(@query)>0) { +# my($prefix)=$query[0]->prefix(); +# if(defined($prefix) && $prefix ne '') { +# $prefix.=':'; +# } else { +# $prefix=''; +# } +# $methodname =~ s/Request$//; +# $query[0]->setNodeName($prefix.$methodname); +# } +# +# # Last, craete new SOM object +# my $sparser = WSRF::Deserializer->new(); +# my($manistring)=$envxml->toString(); +# $manistring =~ s/[\r\n]+//g; +# print STDERR "ENVELOPE ",$manistring,"\n"; +# $envelope = $sparser->deserialize($manistring); +# } +# } +# }; +# +# if($@) { +# print STDERR "FALLACANALLA $@\n"; +# } +# return $self->GetMultipleResourceProperties(@_,$envelope); +#} #=============================================================================== # WSRF::FileBasedMobyResourceLifetimes @@ -257,8 +386,7 @@ # package WSRF::FileBasedMobyResourceLifetimes; use strict; -use vars qw(@ISA); - at ISA = qw(WSRF::FileBasedMobyResourceProperties); +use base qw(WSRF::FileBasedMobyResourceProperties); # Add resource property TerminationTime - initalise to nothing (infinity). $WSRF::WSRP::ResourceProperties{'TerminationTime'} = ''; @@ -280,7 +408,6 @@ sub Destroy { my $self = shift @_; my $envelope = pop @_; - $ENV{ID} = $envelope->valueof("/{$SOAP::Constants::NS_ENV}Envelope/{$SOAP::Constants::NS_ENV}Header/{$WSRF::Constants::MOBY}ServiceInvocationId"); my $lock = WSRF::MobyFile->new($envelope); my $file = $WSRF::Constants::Data.$lock->ID(); unlink $file or WSRF::BaseFaults::die_with_fault( $envelope, ( @@ -382,6 +509,11 @@ package WSRF::Header; use strict; +my(%URI2ACTION)=( + $WSRF::Constants::WSRP => [$WSRF::Constants::WSRPW,undef], + $WSRF::Constants::WSRL => [$WSRF::Constants::WSRLW,'ImmediateResourceTermination'] +); + sub header { my ($envelope, %args) = @_; my $myHeader; @@ -417,6 +549,10 @@ my $data = $envelope->match("/{$SOAP::Constants::NS_ENV}Envelope/{$SOAP::Constants::NS_ENV}Body/[1]")->dataof; my $method = $data->name; my $uri = $data->uri; + if(exists($URI2ACTION{$uri})) { + $uri = $URI2ACTION{$uri}[0].'/'.(defined($URI2ACTION{$uri}[1])?$URI2ACTION{$uri}[1]:$method); + } + print STDERR "GURI $uri\n"; $myHeader .= "".$uri."/".$method."Response"; } @@ -449,16 +585,21 @@ # package WSRF::MobyFile; use strict; -use vars qw(@ISA); - at ISA = qw(WSRF::File); + +use base qw(WSRF::File); sub new { - my( $class, $envelope) = @_; + my( $class, $envelope, $ID) = @_; + + unless(defined($ID)) { + $ID = $envelope->valueof("/{$SOAP::Constants::NS_ENV}Envelope/{$SOAP::Constants::NS_ENV}Header/{$WSRF::Constants::MOBY}ServiceInvocationId"); + $ENV{ID} = $ID; + } + # Check the ID is safe - we do not accept dots, # All paths will be relative to $ENV{WRF_MODULES} # Only allow alphanumeric, underscore and hyphen - my $ID = $ENV{ID}; if( $ID =~ /^([-\w]+)$/ ) { $ID = $1; } else { @@ -509,7 +650,6 @@ ($WSRF::WSRP::ResourceProperties{'TerminationTime'} ne "") ) { if ( WSRF::Time::ConvertStringToEpochTime($WSRF::WSRP::ResourceProperties{'TerminationTime'}) < time ) { - print STDERR "$$ Resource $ID expired\n"; unlink $path or die SOAP::Fault->faultcode("Container Failure") ->faultstring("Container Failure: Could not remove file"); rmdir $lock or die SOAP::Fault->faultcode("Container Failure") From kawas at dev.open-bio.org Tue Apr 29 14:59:43 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 14:59:43 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291859.m3TIxhWe009526@dev.open-bio.org> kawas Tue Apr 29 14:59:42 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache In directory dev.open-bio.org:/tmp/cvs-serv9491/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Modified Files: Central.pm Log Message: intial crack at adding a version number that changes with the cvs revision moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Central.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2008/04/29 18:59:42 1.4 @@ -21,7 +21,7 @@ use XML::LibXML; use File::Spec; use strict; -use vars qw ($DEFAULT_REGISTRY_URL); +use vars qw ($DEFAULT_REGISTRY_URL $VERSION); # names of cache directories/files use constant LIST_FILE => '__L__I__S__T__'; @@ -30,6 +30,9 @@ use constant NAMESPACES_CACHE => 'namespaces'; use constant SERVICETYPES_CACHE => 'serviceTypes'; +# the version of this file: +$VERSION = sprintf "%d.%03d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Cache::Central - access to locally cached Moby entities From kawas at dev.open-bio.org Tue Apr 29 15:02:37 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:02:37 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291902.m3TJ2bdn009568@dev.open-bio.org> kawas Tue Apr 29 15:02:37 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache In directory dev.open-bio.org:/tmp/cvs-serv9533/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Modified Files: Central.pm Log Message: making the $VERSION have 2 decimal spots instead of 3. moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Central.pm,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2008/04/29 18:59:42 1.4 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2008/04/29 19:02:37 1.5 @@ -31,7 +31,7 @@ use constant SERVICETYPES_CACHE => 'serviceTypes'; # the version of this file: -$VERSION = sprintf "%d.%03d", q$Revision$ =~ /: (\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; =head1 NAME From kawas at dev.open-bio.org Tue Apr 29 15:29:54 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:29:54 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291929.m3TJTsZo009687@dev.open-bio.org> kawas Tue Apr 29 15:29:54 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache In directory dev.open-bio.org:/tmp/cvs-serv9652/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Modified Files: Registries.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Registries.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Registries.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Registries.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Registries.pm 2008/04/29 19:29:54 1.4 @@ -11,6 +11,10 @@ use base qw ( MOSES::MOBY::Base); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # A hard-coded list of the known registries. # From kawas at dev.open-bio.org Tue Apr 29 15:35:57 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:35:57 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291935.m3TJZvSH009814@dev.open-bio.org> kawas Tue Apr 29 15:35:57 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data In directory dev.open-bio.org:/tmp/cvs-serv9751/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data Modified Files: String.pm DateTime.pm Boolean.pm Integer.pm Xref.pm ProvisionInformation.pm Object.pm Float.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data String.pm,1.3,1.4 DateTime.pm,1.3,1.4 Boolean.pm,1.3,1.4 Integer.pm,1.3,1.4 Xref.pm,1.3,1.4 ProvisionInformation.pm,1.3,1.4 Object.pm,1.3,1.4 Float.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/String.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/String.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/String.pm 2008/04/29 19:35:57 1.4 @@ -11,6 +11,10 @@ use base ("MOSES::MOBY::Data::Object"); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::String - A primite Moby data type for strings =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/DateTime.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/DateTime.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/DateTime.pm 2008/04/29 19:35:57 1.4 @@ -11,6 +11,10 @@ use base ("MOSES::MOBY::Data::Object"); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::DateTime - A primite Moby data type for dates/times =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Boolean.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Boolean.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Boolean.pm 2008/04/29 19:35:57 1.4 @@ -11,6 +11,10 @@ use base ("MOSES::MOBY::Data::Object"); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::Boolean - A primite Moby data type for booleans =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Integer.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Integer.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Integer.pm 2008/04/29 19:35:57 1.4 @@ -11,6 +11,10 @@ use base ("MOSES::MOBY::Data::Object"); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::Integer - A primite Moby data type for integers =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Xref.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Xref.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Xref.pm 2008/04/29 19:35:57 1.4 @@ -12,6 +12,10 @@ use MOSES::MOBY::Tags; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::Xref - a Moby cross-reference =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/ProvisionInformation.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/ProvisionInformation.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/ProvisionInformation.pm 2008/04/29 19:35:57 1.4 @@ -12,6 +12,10 @@ use MOSES::MOBY::Tags; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::ProvisionInformation - a provision information block (PIB) =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Object.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Object.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Object.pm 2008/04/29 19:35:57 1.4 @@ -12,6 +12,10 @@ use MOSES::MOBY::Tags; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # load all modules needed for my attributes #----------------------------------------------------------------- =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Float.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Float.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Float.pm 2008/04/29 19:35:57 1.4 @@ -11,6 +11,10 @@ use base ("MOSES::MOBY::Data::Object"); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::Float - A primite Moby data type for float numbers From kawas at dev.open-bio.org Tue Apr 29 15:41:10 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:41:10 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291941.m3TJfAIP009894@dev.open-bio.org> kawas Tue Apr 29 15:41:09 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def In directory dev.open-bio.org:/tmp/cvs-serv9859/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Modified Files: Data.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Data.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Data.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Data.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Data.pm 2008/04/29 19:41:09 1.4 @@ -17,6 +17,10 @@ use XML::LibXML; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Def::Data - a BioMoby definition of a service input/output From kawas at dev.open-bio.org Tue Apr 29 15:41:17 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:41:17 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291941.m3TJfHnW009934@dev.open-bio.org> kawas Tue Apr 29 15:41:17 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def In directory dev.open-bio.org:/tmp/cvs-serv9899/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Modified Files: DataType.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def DataType.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/DataType.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/DataType.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/DataType.pm 2008/04/29 19:41:17 1.4 @@ -13,6 +13,10 @@ use XML::LibXML; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Def::DataType - a definition of BioMoby data type From kawas at dev.open-bio.org Tue Apr 29 15:41:25 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:41:25 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291941.m3TJfPnR009974@dev.open-bio.org> kawas Tue Apr 29 15:41:25 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def In directory dev.open-bio.org:/tmp/cvs-serv9939/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Modified Files: Namespace.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Namespace.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Namespace.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Namespace.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Namespace.pm 2008/04/29 19:41:25 1.4 @@ -11,6 +11,10 @@ use XML::LibXML; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Def::Namespace - a definition of a BioMoby Namespace From kawas at dev.open-bio.org Tue Apr 29 15:41:31 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:41:31 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291941.m3TJfVWR010014@dev.open-bio.org> kawas Tue Apr 29 15:41:31 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def In directory dev.open-bio.org:/tmp/cvs-serv9979/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Modified Files: Relationship.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Relationship.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Relationship.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Relationship.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Relationship.pm 2008/04/29 19:41:31 1.4 @@ -12,6 +12,10 @@ use strict; use vars qw( @EXPORT %ALLOWED_TYPES ); +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + # relationship types use constant ISA => 'ISA'; use constant HASA => 'HASA'; From kawas at dev.open-bio.org Tue Apr 29 15:41:38 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:41:38 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291941.m3TJfcVO010054@dev.open-bio.org> kawas Tue Apr 29 15:41:38 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def In directory dev.open-bio.org:/tmp/cvs-serv10019/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Modified Files: Service.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Service.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Service.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Service.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Service.pm 2008/04/29 19:41:38 1.4 @@ -11,6 +11,10 @@ use XML::LibXML; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Def::Service - a BioMoby service definition From kawas at dev.open-bio.org Tue Apr 29 15:41:46 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:41:46 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291941.m3TJfk62010094@dev.open-bio.org> kawas Tue Apr 29 15:41:46 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def In directory dev.open-bio.org:/tmp/cvs-serv10059/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Modified Files: ServiceType.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def ServiceType.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/ServiceType.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/ServiceType.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/ServiceType.pm 2008/04/29 19:41:46 1.4 @@ -11,6 +11,10 @@ use XML::LibXML; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Def::ServiceType - a BioMoby service type definition From kawas at dev.open-bio.org Tue Apr 29 15:42:56 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:42:56 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291942.m3TJguLG010134@dev.open-bio.org> kawas Tue Apr 29 15:42:56 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators In directory dev.open-bio.org:/tmp/cvs-serv10099/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators Modified Files: GenTypes.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators GenTypes.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenTypes.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenTypes.pm 2008/02/21 00:12:56 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenTypes.pm 2008/04/29 19:42:56 1.4 @@ -20,6 +20,10 @@ use vars qw( %PRIMITIVE_TYPES ); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # A list of allowed attribute names. See MOSES::MOBY::Base for details. #----------------------------------------------------------------- From kawas at dev.open-bio.org Tue Apr 29 15:43:18 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:43:18 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291943.m3TJhIYU010174@dev.open-bio.org> kawas Tue Apr 29 15:43:18 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY In directory dev.open-bio.org:/tmp/cvs-serv10139/Perl/MOSES-MOBY/lib/MOSES/MOBY Modified Files: Base.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY Base.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Base.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Base.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Base.pm 2008/04/29 19:43:18 1.4 @@ -31,7 +31,7 @@ @ISA = qw( Exporter ); @EXPORT = qw( $LOG ); - $VERSION = 0.8; + $VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; $Revision = '$Id$'; # initiate error handling From kawas at dev.open-bio.org Tue Apr 29 15:43:44 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:43:44 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291943.m3TJhi3v010214@dev.open-bio.org> kawas Tue Apr 29 15:43:44 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Service In directory dev.open-bio.org:/tmp/cvs-serv10179/Perl/MOSES-MOBY/lib/MOSES/MOBY/Service Modified Files: ServiceBase.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Service ServiceBase.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Service/ServiceBase.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Service/ServiceBase.pm 2008/02/21 00:12:56 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Service/ServiceBase.pm 2008/04/29 19:43:44 1.4 @@ -16,6 +16,10 @@ use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # prepare_output #----------------------------------------------------------------- From kawas at dev.open-bio.org Tue Apr 29 15:45:01 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:45:01 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291945.m3TJj1aD010270@dev.open-bio.org> kawas Tue Apr 29 15:45:01 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY In directory dev.open-bio.org:/tmp/cvs-serv10219/Perl/MOSES-MOBY/lib/MOSES/MOBY Modified Files: Parser.pm Package.pm Tags.pm Config.pm ServiceException.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY Parser.pm,1.3,1.4 Package.pm,1.3,1.4 Tags.pm,1.3,1.4 Config.pm,1.3,1.4 ServiceException.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Parser.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Parser.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Parser.pm 2008/04/29 19:45:01 1.4 @@ -23,6 +23,10 @@ use MOSES::MOBY::Generators::GenTypes; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # A list of allowed attribute names. See MOSES::MOBY::Base for details. #----------------------------------------------------------------- =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Package.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Package.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Package.pm 2008/04/29 19:45:01 1.4 @@ -19,6 +19,10 @@ use MOSES::MOBY::ServiceException; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # A list of allowed attribute names. See MOSES::MOBY::Base for details. #----------------------------------------------------------------- =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Tags.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Tags.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Tags.pm 2008/04/29 19:45:01 1.4 @@ -1,6 +1,11 @@ package MOSES::MOBY::Tags; use strict; use vars qw( @ISA @EXPORT ); + +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + BEGIN { @ISA = qw( Exporter ); @EXPORT = qw( =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm 2008/04/29 19:45:01 1.4 @@ -13,6 +13,10 @@ use vars qw( $DEFAULT_CONFIG_FILE $ENV_CONFIG_DIR ); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + my %Config = (); # here are all configuration parameters my %Unsuccess = (); # here are names (and reasons) of failed files my %Success = (); # here are names of successfully read files =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/ServiceException.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/ServiceException.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/ServiceException.pm 2008/04/29 19:45:01 1.4 @@ -13,6 +13,10 @@ use strict; use vars qw( @EXPORT ); +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + my %severityNames = (); my %codeNames = (); From kawas at dev.open-bio.org Tue Apr 29 15:45:10 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:45:10 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291945.m3TJjAu0010310@dev.open-bio.org> kawas Tue Apr 29 15:45:10 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators In directory dev.open-bio.org:/tmp/cvs-serv10275/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators Modified Files: Utils.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators Utils.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm 2008/02/21 00:12:56 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm 2008/04/29 19:45:10 1.4 @@ -11,6 +11,10 @@ use File::Spec; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Utils - what does not fit elsewhere From kawas at dev.open-bio.org Tue Apr 29 15:58:38 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:58:38 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291958.m3TJwckw010425@dev.open-bio.org> kawas Tue Apr 29 15:58:37 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts In directory dev.open-bio.org:/tmp/cvs-serv10354/Perl/MOSES-MOBY/bin/scripts Modified Files: moses-testing-service.pl moses-generate-services.pl Log Message: added support for biomoby services of category cgi moby-live/Perl/MOSES-MOBY/bin/scripts moses-testing-service.pl,1.3,1.4 moses-generate-services.pl,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2008/04/29 19:58:37 1.4 @@ -9,15 +9,17 @@ BEGIN { # some command-line options use Getopt::Std; - use vars qw/ $opt_h $opt_d $opt_v $opt_l $opt_e /; - getopts ('hdvl:e:'); + use vars qw/ $opt_h $opt_d $opt_v $opt_l $opt_e $opt_c /; + getopts ('hdvl:e:c:'); # usage - if ($opt_h or @ARGV == 0) { + if ($opt_h or (@ARGV == 0 and (not $opt_c))) { print STDOUT <<'END_OF_USAGE'; Calling a BioMoby services (without using SOAP, just locally). Usage: # calling a local module representing a service, without using SOAP [-vd] [-l ] [] + or + [-vd] -c [] It also needs a location of a local cache (and potentially a BioMoby registry endpoint). It takes it from the @@ -26,6 +28,9 @@ # calling a real service, using SOAP -e [] + # calling a real service, using cgi + -c [] + is a full name of a called module (service) e.g. Service::Mabuhay @@ -37,6 +42,10 @@ A service endpoint (e.g. http://localhost/cgi-bin/MobyServer.cgi) + -c + A cgi biomoby service url + (e.g. http://localhost/cgi-bin/HelloBiomobyWorld.cgi) + A BioMoby XML file with input data. Default: an empty BioMoby request @@ -55,7 +64,13 @@ eval "use SOAP::Lite; 1;" or die "$@\n"; - } else { + } elsif ($opt_c) { + # calling a real service, using cgi + eval "use HTTP::Request::Common qw(POST); 1;" + or die "$@\n"; + eval "use LWP::UserAgent; 1;" + or die "$@\n"; + }else { # calling a local service module, without SOAP eval "use MOSES::MOBY::Base; 1;"; # take the lib location from the config file @@ -83,7 +98,7 @@ # --- what service to call my $module = shift; # eg. Service::Mabuhay, or just Mabuhay my $service; -($service = $module) =~ s/.*:://; +($service = $module) =~ s/.*::// unless $opt_c; # --- call the service if ($opt_e) { @@ -115,6 +130,24 @@ -> $service (SOAP::Data->type('string' => "$input")) -> result; +} elsif ($opt_c) { + # calling a real service, using cgi + my $ua = LWP::UserAgent->new; + + my $input = ''; + if (@ARGV > 0) { + my $data = shift; # a file name + open INPUT, "<$data" + or die "Cannot read '$data': $!\n"; + while () { $input .= $_; } + close INPUT; + } else { + $input = _empty_input; + } + + my $req = POST $opt_c, [ data => $input]; + print "\n" . $ua->request($req)->as_string . "\n"; + } else { # calling a local service module, without SOAP my $data; =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-generate-services.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-generate-services.pl 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-generate-services.pl 2008/04/29 19:58:37 1.4 @@ -8,7 +8,7 @@ # some command-line options use Getopt::Std; -use vars qw/ $opt_h $opt_d $opt_v $opt_a $opt_s $opt_b $opt_f $opt_u $opt_F $opt_S $opt_t/; +use vars qw/ $opt_h $opt_d $opt_v $opt_a $opt_s $opt_b $opt_f $opt_u $opt_F $opt_S $opt_t $opt_c /; getopt; # usage if (not($opt_u or $opt_f)) { @@ -31,11 +31,13 @@ -S ... generate implementation and the base of service[s], the implementation module has enabled option to read the base statically (that is why it is also generated here) + -i ... generate an implementation of the given service + -c ... generate a cgi based implementation of the given service -t ... update dispatch table of services (a table used by the cgi-bin script and SOAP::Lite to dispatch requests); this table is also updated automatically when options -i or -S are given - If none of -b, -S, -t is given, it generates/show implementation + If none of -b, -S, -t, -c is given, it generates/show implementation (not a base) of service[s]. -s ... show generated code on STDOUT @@ -99,6 +101,9 @@ $generator->generate_impl (static_impl => 1); $generator->generate_base; $generator->update_table; + } elsif ($opt_c) { + $generator->generate_impl; + $generator->generate_cgi; } elsif ($opt_t) { $generator->update_table; } else { @@ -114,7 +119,14 @@ $generator->generate_base (service_names => [@ARGV], authority => $authority, outcode => \$code); - } else { + } elsif ($opt_c) { + $generator->generate_impl(service_names => [@ARGV], + authority => $authority, + outcode => \$code); + $generator->generate_cgi(service_names => [@ARGV], + authority => $authority, + outcode => \$code); + } else { $generator->generate_impl (service_names => [@ARGV], authority => $authority, outcode => \$code); @@ -133,7 +145,14 @@ authority => $authority); $generator->update_table (service_names => [@ARGV], authority => $authority); - } elsif ($opt_t) { + } elsif ($opt_c) { + $generator->generate_impl( + service_names => [@ARGV], + authority => $authority, + force_over => $opt_F); + $generator->generate_cgi(service_names => [@ARGV], + authority => $authority); + } elsif ($opt_t) { $generator->update_table (service_names => [@ARGV], authority => $authority); } else { From kawas at dev.open-bio.org Tue Apr 29 15:58:37 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:58:37 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291958.m3TJwbCa010389@dev.open-bio.org> kawas Tue Apr 29 15:58:37 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators In directory dev.open-bio.org:/tmp/cvs-serv10354/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators Modified Files: GenServices.pm Log Message: added support for biomoby services of category cgi moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators GenServices.pm,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenServices.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenServices.pm 2008/03/31 18:04:47 1.4 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenServices.pm 2008/04/29 19:58:37 1.5 @@ -21,6 +21,10 @@ use MOSES::MOBY::Def::Relationship; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # A list of allowed attribute names. See MOSES::MOBY::Base for details. #----------------------------------------------------------------- @@ -268,6 +272,83 @@ } #----------------------------------------------------------------- +# generate_cgi +#----------------------------------------------------------------- +sub generate_cgi { + my ($self, @args) = @_; + my %args = + ( # some default values + outdir => $self->outdir . "/../cgi", + cachedir => $self->cachedir, + registry => $self->registry, + service_names => [], + + # other args, with no default values + # authority => 'authority' + # outcode => ref SCALAR + + # and the real parameters + @args ); + $self->_check_outcode (%args); + + my $outdir = File::Spec->rel2abs ($args{outdir}); + $LOG->debug ("Arguments for generating cgi services: " . $self->toString (\%args)) + if ($LOG->is_debug); + $LOG->info ("CGI Services will be generated into: '$outdir'") + unless $args{outcode}; + + # get objects from a local cache + my $cache = MOSES::MOBY::Cache::Central->new (cachedir => $args{cachedir}, registry => $args{registry}); + my @names = (); + push (@names, $args{authority}, @{ $args{service_names} }) + if $args{authority}; + my @services = $cache->get_services (@names); + + # generate from template + my $tt = Template->new ( ABSOLUTE => 1 ); + my $input = File::Spec->rel2abs ( MOSES::MOBY::Generators::Utils->find_file + ($Bin, + 'MOSES', 'MOBY', 'Generators', 'templates', + 'service-cgi.tt') ); + + foreach my $obj (@services) { + my $name = $obj->name; + $LOG->debug ("$name\n"); + if ($args{outcode}) { + # check if the same service is already loaded + # (it can happen when this subroutine is called several times) + next if eval '%' . $obj->module_name . '::'; + $tt->process ( + $input, + { + obj => $obj, + pmoses_home => $MOBYCFG::USER_REGISTRIES_USER_REGISTRIES_DIR, + generated_dir => $MOBYCFG::GENERATORS_OUTDIR, + services_dir => $MOBYCFG::GENERATORS_IMPL_OUTDIR, + }, + $args{outcode} ) + || $LOG->logdie ($tt->error()); + } else { + # we cannot easily check whether the same file was already + # generated - so we don't + my $outfile = + File::Spec->catfile ( $outdir, split (/\./, $obj->authority), $obj->name ) + . '.cgi'; + $tt->process ( $input, + { + obj => $obj, + pmoses_home => $MOBYCFG::USER_REGISTRIES_USER_REGISTRIES_DIR, + generated_dir => $MOBYCFG::GENERATORS_OUTDIR, + services_dir => $MOBYCFG::GENERATORS_IMPL_OUTDIR, + }, + $outfile ) || $LOG->logdie ($tt->error()); + chmod 0755, $outfile; + } + } +} + + +#----------------------------------------------------------------- # update_table #----------------------------------------------------------------- sub update_table { From kawas at dev.open-bio.org Tue Apr 29 15:58:37 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:58:37 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291958.m3TJwb8E010403@dev.open-bio.org> kawas Tue Apr 29 15:58:37 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates In directory dev.open-bio.org:/tmp/cvs-serv10354/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates Added Files: service-cgi.tt Log Message: added support for biomoby services of category cgi moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates service-cgi.tt,NONE,1.1 From kawas at dev.open-bio.org Tue Apr 29 15:59:43 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:59:43 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291959.m3TJxhGc010509@dev.open-bio.org> kawas Tue Apr 29 15:59:43 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts In directory dev.open-bio.org:/tmp/cvs-serv10474/Perl/MOSES-MOBY/bin/scripts Modified Files: moses-install.pl Log Message: added support for biomoby services of category cgi moby-live/Perl/MOSES-MOBY/bin/scripts moses-install.pl,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-install.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-install.pl 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-install.pl 2008/04/29 19:59:43 1.4 @@ -182,6 +182,18 @@ # create install directory if necessary eval { + my ($v, $d, $f) = File::Spec->splitpath( $pmoses_home . "/cgi" ); + my $dir = File::Spec->catdir($v); + foreach my $part ( File::Spec->splitdir( ($d.$f ) ) ) { + $dir = File::Spec->catdir($dir, $part); + next if -d $dir or -e $dir; + mkdir( $dir ) || die("Error creating installation directory directory '".$dir."':\n$!"); + } +}; +say $@ ? $@ : "Created install directory '$pmoses_home/cgi'."; + +# create install directory if necessary +eval { my ($v, $d, $f) = File::Spec->splitpath( $samples_home ); my $dir = File::Spec->catdir($v); foreach my $part ( File::Spec->splitdir( ($d.$f ) ) ) { From kawas at dev.open-bio.org Tue Apr 29 16:07:50 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 16:07:50 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804292007.m3TK7oJJ010594@dev.open-bio.org> kawas Tue Apr 29 16:07:50 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY In directory dev.open-bio.org:/tmp/cvs-serv10559/Perl/MOSES-MOBY Modified Files: MANIFEST Log Message: updated the manifest to include files needed for cgi services moby-live/Perl/MOSES-MOBY MANIFEST,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/MANIFEST,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/MANIFEST 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/MANIFEST 2008/04/29 20:07:50 1.4 @@ -49,6 +49,7 @@ lib/MOSES/MOBY/Generators/GenTypes.pm lib/MOSES/MOBY/Generators/templates/datatype.tt lib/MOSES/MOBY/Generators/templates/service-base.tt +lib/MOSES/MOBY/Generators/templates/service-cgi.tt lib/MOSES/MOBY/Generators/templates/service.tt lib/MOSES/MOBY/Generators/Utils.pm lib/MOSES/MOBY/Package.pm From kawas at dev.open-bio.org Tue Apr 29 16:09:36 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 16:09:36 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804292009.m3TK9a7s010652@dev.open-bio.org> kawas Tue Apr 29 16:09:35 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY In directory dev.open-bio.org:/tmp/cvs-serv10617/Perl/MOSES-MOBY Modified Files: README Log Message: moby-live/Perl/MOSES-MOBY README,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/README,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/README 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/README 2008/04/29 20:09:35 1.4 @@ -1,4 +1,4 @@ -MOSES-MOBY version .82 +MOSES-MOBY version .84 ====================== OVERVIEW @@ -49,6 +49,7 @@ Unicode::String File::HomeDir File::ShareDir +IO::Prompt - unless you are using Windows COPYRIGHT AND LICENCE @@ -57,5 +58,3 @@ This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This software is provided "as is" without warranty of any kind. - - From kawas at dev.open-bio.org Tue Apr 29 16:10:07 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 16:10:07 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804292010.m3TKA7AE010692@dev.open-bio.org> kawas Tue Apr 29 16:10:06 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY In directory dev.open-bio.org:/tmp/cvs-serv10657/Perl/MOSES-MOBY Modified Files: META.yml Log Message: moby-live/Perl/MOSES-MOBY META.yml,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/META.yml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/META.yml 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/META.yml 2008/04/29 20:10:06 1.4 @@ -27,7 +27,7 @@ Template: 1.11 Unicode::String: 2.09 XML::LibXML: 1.62 - IO::Template: .99 + IO::Prompt: 0.99 Want: 0 version: 0 -version: 0.82 +version: 0.85 From kawas at dev.open-bio.org Wed Apr 30 12:52:26 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 12:52:26 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301652.m3UGqQ7Z013357@dev.open-bio.org> kawas Wed Apr 30 12:52:25 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF In directory dev.open-bio.org:/tmp/cvs-serv13322/Perl/MOBY-Server/lib/MOBY/RDF Modified Files: Utils.pm Log Message: added a method called empty_rdf that returns a string of RDF with no statements in it moby-live/Perl/MOBY-Server/lib/MOBY/RDF Utils.pm,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Utils.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Utils.pm 2008/03/05 17:39:43 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Utils.pm 2008/04/30 16:52:25 1.5 @@ -151,5 +151,22 @@ } } +=head2 empty_rdf + +returns a string of RDF that represents a syntactically correct RDF file + +=cut + +sub empty_rdf { + return <<'END_OF_RDF'; + + + +END_OF_RDF +} + 1; __END__ From kawas at dev.open-bio.org Wed Apr 30 12:53:19 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 12:53:19 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301653.m3UGrJq7013397@dev.open-bio.org> kawas Wed Apr 30 12:53:19 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache In directory dev.open-bio.org:/tmp/cvs-serv13362/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache Modified Files: NamespaceCache.pm Log Message: added a check for situations when there is nothing in the ontology. This was causing an error before and now empty rdf is returned. moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache NamespaceCache.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/NamespaceCache.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/NamespaceCache.pm 2008/02/21 17:15:40 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/NamespaceCache.pm 2008/04/30 16:53:19 1.3 @@ -20,6 +20,7 @@ use Fcntl ':flock'; +use MOBY::RDF::Utils; use MOBY::RDF::Ontologies::Namespaces; use MOBY::RDF::Ontologies::Cache::CacheUtils; use MOBY::Client::Central; @@ -446,7 +447,8 @@ } } - $xml = $doc->toString(); + $xml = $doc->toString() if $doc; + $xml = new MOBY::RDF::Utils->empty_rdf unless $doc; # save new RDF file open( FILE, ">$file" ) From kawas at dev.open-bio.org Wed Apr 30 12:53:26 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 12:53:26 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301653.m3UGrQpu013437@dev.open-bio.org> kawas Wed Apr 30 12:53:26 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache In directory dev.open-bio.org:/tmp/cvs-serv13402/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache Modified Files: ObjectCache.pm Log Message: added a check for situations when there is nothing in the ontology. This was causing an error before and now empty rdf is returned. moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache ObjectCache.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ObjectCache.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ObjectCache.pm 2008/02/21 17:43:13 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ObjectCache.pm 2008/04/30 16:53:26 1.4 @@ -20,6 +20,7 @@ use Fcntl ':flock'; +use MOBY::RDF::Utils; use MOBY::RDF::Ontologies::Objects; use MOBY::RDF::Ontologies::Cache::CacheUtils; use MOBY::Client::Central; @@ -447,7 +448,8 @@ } } - $xml = $doc->toString(); + $xml = $doc->toString() if $doc; + $xml = new MOBY::RDF::Utils->empty_rdf unless $doc; # save new RDF file open( FILE, ">$file" ) From kawas at dev.open-bio.org Wed Apr 30 12:53:37 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 12:53:37 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301653.m3UGrbAs013477@dev.open-bio.org> kawas Wed Apr 30 12:53:36 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache In directory dev.open-bio.org:/tmp/cvs-serv13442/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache Modified Files: ServiceCache.pm Log Message: added a check for situations when there is nothing in the ontology. This was causing an error before and now empty rdf is returned. moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache ServiceCache.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceCache.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceCache.pm 2008/02/21 17:15:40 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceCache.pm 2008/04/30 16:53:36 1.3 @@ -20,6 +20,7 @@ use Fcntl ':flock'; +use MOBY::RDF::Utils; use MOBY::RDF::Ontologies::Services; use MOBY::RDF::Ontologies::Cache::CacheUtils; use MOBY::Client::Central; @@ -430,6 +431,8 @@ File::Spec->catfile( $dir, $RDF ) ); }; warn $@ if $@; + # if it didnt parse correctly, reset to null + $doc = undef if $@; next; } unless $doc; my $temp_doc = eval { @@ -447,7 +450,8 @@ } } - $xml = $doc->toString(); + $xml = $doc->toString() if $doc; + $xml = new MOBY::RDF::Utils->empty_rdf unless $doc; # save new RDF file open( FILE, ">$file" ) From kawas at dev.open-bio.org Wed Apr 30 12:53:45 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 12:53:45 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301653.m3UGrjlw013517@dev.open-bio.org> kawas Wed Apr 30 12:53:45 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache In directory dev.open-bio.org:/tmp/cvs-serv13482/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache Modified Files: ServiceTypeCache.pm Log Message: added a check for situations when there is nothing in the ontology. This was causing an error before and now empty rdf is returned. moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache ServiceTypeCache.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceTypeCache.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceTypeCache.pm 2008/02/21 17:15:40 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceTypeCache.pm 2008/04/30 16:53:45 1.3 @@ -20,6 +20,7 @@ use Fcntl ':flock'; +use MOBY::RDF::Utils; use MOBY::RDF::Ontologies::ServiceTypes; use MOBY::RDF::Ontologies::Cache::CacheUtils; use MOBY::Client::Central; @@ -447,7 +448,8 @@ } } - $xml = $doc->toString(); + $xml = $doc->toString() if $doc; + $xml = new MOBY::RDF::Utils->empty_rdf unless $doc; # save new RDF file open( FILE, ">$file" ) From kawas at dev.open-bio.org Wed Apr 30 13:02:54 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 13:02:54 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301702.m3UH2stY013595@dev.open-bio.org> kawas Wed Apr 30 13:02:54 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv13560/Perl/MOBY-Server Modified Files: Changes Log Message: updated change log with the changes that i am aware of moby-live/Perl/MOBY-Server Changes,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Changes,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/04/16 13:55:28 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/04/30 17:02:54 1.3 @@ -1,14 +1,25 @@ Revision history for Perl extension MOBY. 1.04 + - fixed bug that allowed service types to be registered with empty ISA relationships. + - MOBY::Config now only reads the config file once instead of numerous times. + - Attempted fix of shared memory bugs with service_tester.pl Shared memory wasn't being recycled properly and led to the server running the script to run out of memory segments, causing the script to run, but not to produce any output. + + - MOBY WSRF implementation was not WSRF compliant in some + points, and the same happened with sample code. Both the + libraries and the generated WSDL have been fixed. + + - Added checks for those cases where RDF is wanted for a + particular ontology that is empty. Instead of dying, + we now return an empty document (as should be expected). 1.00 - CVS version of MOBY released to the world via CPAN! From kawas at dev.open-bio.org Wed Apr 30 13:08:30 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 13:08:30 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301708.m3UH8UjM013783@dev.open-bio.org> kawas Wed Apr 30 13:08:30 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts In directory dev.open-bio.org:/tmp/cvs-serv13748/Perl/MOBY-Server/bin/scripts Modified Files: moby-s-install.pl Log Message: instead of checking for WSRF and its dependencies, we now prompt the user if they would like to use those libraries and then check. This saves you the hassle of having to try and install the dependencies for WSRF when you dont plan on using those libraries. moby-live/Perl/MOBY-Server/bin/scripts moby-s-install.pl,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/03/19 16:55:35 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/04/30 17:08:30 1.4 @@ -57,14 +57,6 @@ File::HomeDir File::ShareDir Class::Inspector - XML::DOM - DateTime::Format::Epoch - DateTime::Format::W3CDTF - HTTP::Daemon - MIME::Base64 - Digest::SHA1 - Crypt::OpenSSL::RSA - Sys::Hostname::Long RDF::Core XML::XPath Text::Shellwords @@ -87,9 +79,28 @@ check_module('IO::Prompt'); require IO::Prompt; import IO::Prompt; - check_module('WSRF::Lite'); - check_module('Crypt::OpenSSL::X509'); + # module required for service_tester.pl check_module('IPC::Shareable'); + # check for async libraries if user wants to .... + do { + foreach $module ( + qw / WSRF::Lite + XML::DOM + DateTime::Format::Epoch + DateTime::Format::W3CDTF + HTTP::Daemon + Crypt::OpenSSL::X509 + MIME::Base64 + Digest::SHA1 + Crypt::OpenSSL::RSA + Sys::Hostname::Long + HTTP::Daemon::SSL + XML::CanonicalizeXML + / ) { + check_module($module); + + } + } if prompt( "Shall we check for the moby-async libraries\n\t(do this only if you plan on creating async moby services)? ", -yn ); } if ($errors_found) { From kawas at dev.open-bio.org Tue Apr 1 16:56:36 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 1 Apr 2008 12:56:36 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804011656.m31GuaKb010086@dev.open-bio.org> kawas Tue Apr 1 12:56:35 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY In directory dev.open-bio.org:/tmp/cvs-serv10050/Perl/MOSES-MOBY Modified Files: Changes Log Message: updated the changes file to mention the namespace checking moby-live/Perl/MOSES-MOBY Changes,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/Changes 2008/04/01 16:56:35 1.4 @@ -3,6 +3,9 @@ .84 Date here .... - fixed a bug in Parser.pm that created xrefs and called non-existent method isSimpleXref. + - added namespace checking for inputs. It is + inserted into impl code that is generated, but + is commented out. .83 Tue Dec 11 7:52:35 2007 - updated the default moby url to be the From kawas at dev.open-bio.org Tue Apr 1 18:26:19 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 1 Apr 2008 14:26:19 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804011826.m31IQJnG010298@dev.open-bio.org> kawas Tue Apr 1 14:26:19 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies In directory dev.open-bio.org:/tmp/cvs-serv10263/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Modified Files: Services.pm Log Message: added file checking for isAlive.xml and put the isalive block in an eval because isalive information shouldnt kill rdf generation moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies Services.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/02/21 17:15:41 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Services.pm 2008/04/01 18:26:19 1.3 @@ -315,42 +315,42 @@ new RDF::Core::Literal( $SI->name ) ) ); + eval{ + do { + # add is alive information if necessary + if ( $self->{is_alive_path} and -e $self->{is_alive_path} and -r $self->{is_alive_path} ."/isAliveStats.xml") { + my $parser = XML::LibXML->new(); + my $doc = + $parser->parse_file( + $self->{is_alive_path} . '/isAliveStats.xml' ); + my $value = "true"; + my $id = $SI->authority . "," . $SI->name; + my @nodelist = $doc->getElementsByTagName("service"); + for my $node (@nodelist) { + next unless ( $node->getAttribute('id') eq $id ); + $value = $node->textContent; + last; + } + $model->addStmt( + new RDF::Core::Statement( + $resource, + $resource->new( MOBY::RDF::Predicates::FETA->isAlive ), + new RDF::Core::Literal($value) + ) + ); + } else { - do { - # add is alive information if necessary - if ( $self->{is_alive_path} and -e $self->{is_alive_path} ) { - my $parser = XML::LibXML->new(); - my $doc = - $parser->parse_file( - $self->{is_alive_path} . '/isAliveStats.xml' ); - my $value = "true"; - my $id = $SI->authority . "," . $SI->name; - my @nodelist = $doc->getElementsByTagName("service"); - for my $node (@nodelist) { - next unless ( $node->getAttribute('id') eq $id ); - $value = $node->textContent; - last; + # by default, state the service is alive ... + $model->addStmt( + new RDF::Core::Statement( + $resource, + $resource->new( MOBY::RDF::Predicates::FETA->isAlive ), + new RDF::Core::Literal('true') + ) + ); } - $model->addStmt( - new RDF::Core::Statement( - $resource, - $resource->new( MOBY::RDF::Predicates::FETA->isAlive ), - new RDF::Core::Literal($value) - ) - ); - } else { - - # by default, state the service is alive ... - $model->addStmt( - new RDF::Core::Statement( - $resource, - $resource->new( MOBY::RDF::Predicates::FETA->isAlive ), - new RDF::Core::Literal('true') - ) - ); - } - } unless $addIsAlive =~ /no/i; - + } unless $addIsAlive =~ /no/i; + }; # add the authoring statements my $bnode = $node_factory->newResource; $model->addStmt( From kawas at dev.open-bio.org Fri Apr 4 13:51:50 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 4 Apr 2008 09:51:50 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804041351.m34Dpo5Z025794@dev.open-bio.org> kawas Fri Apr 4 09:51:49 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/t In directory dev.open-bio.org:/tmp/cvs-serv25759/Perl/MOBY-Server/t Modified Files: Client-Central.t Log Message: added a test for service type registration that checks for empty ISA relationships. Previously, servicetypes with relationship type "" were registered into the registry. moby-live/Perl/MOBY-Server/t Client-Central.t,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/t/Client-Central.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/t/Client-Central.t 2008/02/21 00:21:28 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/t/Client-Central.t 2008/04/04 13:51:49 1.2 @@ -71,6 +71,7 @@ $r = $C->deregisterObjectClass( objectType => "Rubbish" ); $r = $C->deregisterNamespace( namespaceType => 'RubbishNamespace' ); $r = $C->deregisterServiceType( serviceType => 'RubbishyService' ); + $r = $C->deregisterServiceType( serviceType => 'RubbishyServiceNoParent' ); }; # Can we connect to the registry? @@ -179,7 +180,18 @@ or diag("Name space registration failure: " . $r->message) ; ############ SERVICE-TYPE REGISTRATION ############# -my %ServiceType = ( serviceType => "RubbishyService", +#this registration should fail => empty relationship type +my %ServiceType = ( serviceType => "RubbishyServiceNoParent", + description => "a human-readable description of the service", + contactEmail => 'your at email.address', + authURI => "test.suite.com", + Relationships => { ISA => [''] } + ); +$r = $C->registerServiceType( %ServiceType ); +ok($r->success == 0, "\nService Type registration unsuccessful when no parent specified!") + or diag("\nService Type registration was successful when no parent type was specified:\n" . $r->message) ; + +%ServiceType = ( serviceType => "RubbishyService", description => "a human-readable description of the service", contactEmail => 'your at email.address', authURI => "test.suite.com", @@ -189,7 +201,6 @@ ok($r->success, "Service Type registration successful") or diag("Service Type registration failure: " . $r->message) ; - $r = $C->Relationships(objectType => $Obj{objectType}); isa_ok($r, "HASH", "Relationship types hash") or diag("Object Relationships didn't return a hashref for object types") ; From kawas at dev.open-bio.org Fri Apr 4 13:52:24 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Fri, 4 Apr 2008 09:52:24 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804041352.m34DqOSr025854@dev.open-bio.org> kawas Fri Apr 4 09:52:24 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY In directory dev.open-bio.org:/tmp/cvs-serv25819/Perl/MOBY-Server/lib/MOBY Modified Files: Central.pm Log Message: Previously, servicetypes with relationship type "" were registered into the registry. this should be fixed now moby-live/Perl/MOBY-Server/lib/MOBY Central.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm 2008/02/21 17:15:40 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm 2008/04/04 13:52:24 1.3 @@ -793,6 +793,10 @@ && &_LOG( "got $type, $desc, \%relationships, $email, $auth from registerServiceTypePayload\n" ); + + return + "FAILED! a service type '$type' was found to have no relationships\n" if keys( %relationships ) == 0 ; + return ( $type, $desc, \%relationships, $email, $auth ); } From mwilkinson at dev.open-bio.org Fri Apr 11 23:29:53 2008 From: mwilkinson at dev.open-bio.org (Mark Wilkinson) Date: Fri, 11 Apr 2008 19:29:53 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804112329.m3BNTrZG016869@dev.open-bio.org> mwilkinson Fri Apr 11 19:29:53 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY In directory dev.open-bio.org:/tmp/cvs-serv16850 Modified Files: Config.pm Log Message: trying to make the configuration a class variable rather than an instance variable moby-live/Perl/MOBY-Server/lib/MOBY Config.pm,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm 2008/02/21 00:21:27 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm 2008/04/11 23:29:53 1.2 @@ -50,11 +50,11 @@ #ATTRIBUTES my %_attr_data = # DEFAULT ACCESSIBILITY ( - mobycentral => [ undef, 'read/write' ], - mobyobject => [ undef, 'read/write' ], - mobynamespace => [ undef, 'read/write' ], - mobyservice => [ undef, 'read/write' ], - mobyrelationship => [ undef, 'read/write' ], + mobycentral => [ [], 'read/write' ], + mobyobject => [ [], 'read/write' ], + mobynamespace => [ [], 'read/write' ], + mobyservice => [ [], 'read/write' ], + mobyrelationship => [ [], 'read/write' ], valid_secondary_datatypes => [["String", "Integer", "DateTime", "Float", "Boolean"], 'read'], primitive_datatypes => [["String", "Integer", "DateTime", "Float", "Boolean"], 'read'], @@ -99,6 +99,7 @@ $self->{$attrname} = $self->_default_for($attrname); } } + return $self if $self->mobycentral->{'dbname'}; # if it has been set, then just return it my $file = $ENV{MOBY_CENTRAL_CONFIG}; ( -e $file ) || die "MOBY Configuration file $file doesn't exist $!\n"; chomp $file; From mwilkinson at dev.open-bio.org Fri Apr 11 23:35:34 2008 From: mwilkinson at dev.open-bio.org (Mark Wilkinson) Date: Fri, 11 Apr 2008 19:35:34 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804112335.m3BNZYZp016943@dev.open-bio.org> mwilkinson Fri Apr 11 19:35:34 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY In directory dev.open-bio.org:/tmp/cvs-serv16924 Modified Files: Config.pm Log Message: trying to make the configuration a class variable rather than an instance variable moby-live/Perl/MOBY-Server/lib/MOBY Config.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm 2008/04/11 23:29:53 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm 2008/04/11 23:35:34 1.3 @@ -50,11 +50,11 @@ #ATTRIBUTES my %_attr_data = # DEFAULT ACCESSIBILITY ( - mobycentral => [ [], 'read/write' ], - mobyobject => [ [], 'read/write' ], - mobynamespace => [ [], 'read/write' ], - mobyservice => [ [], 'read/write' ], - mobyrelationship => [ [], 'read/write' ], + mobycentral => [ {}, 'read/write' ], + mobyobject => [ {}, 'read/write' ], + mobynamespace => [ {}, 'read/write' ], + mobyservice => [ {}, 'read/write' ], + mobyrelationship => [ {}, 'read/write' ], valid_secondary_datatypes => [["String", "Integer", "DateTime", "Float", "Boolean"], 'read'], primitive_datatypes => [["String", "Integer", "DateTime", "Float", "Boolean"], 'read'], From mwilkinson at dev.open-bio.org Tue Apr 15 00:26:29 2008 From: mwilkinson at dev.open-bio.org (Mark Wilkinson) Date: Mon, 14 Apr 2008 20:26:29 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804150026.m3F0QTEd030465@dev.open-bio.org> mwilkinson Mon Apr 14 20:26:29 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY In directory dev.open-bio.org:/tmp/cvs-serv30446 Modified Files: Config.pm Log Message: trying to reduce number of file accesses to read the config file. Should speed-up MOBY considerably moby-live/Perl/MOBY-Server/lib/MOBY Config.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm 2008/04/11 23:35:34 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Config.pm 2008/04/15 00:26:29 1.4 @@ -45,21 +45,45 @@ @EXPORT = ('$CONFIG'); { - #Encapsulated class data - #___________________________________________________________ - #ATTRIBUTES my %_attr_data = # DEFAULT ACCESSIBILITY ( - mobycentral => [ {}, 'read/write' ], - mobyobject => [ {}, 'read/write' ], - mobynamespace => [ {}, 'read/write' ], - mobyservice => [ {}, 'read/write' ], - mobyrelationship => [ {}, 'read/write' ], + mobycentral => [ undef, 'read/write' ], + mobyobject => [ undef, 'read/write' ], + mobynamespace => [ undef, 'read/write' ], + mobyservice => [ undef, 'read/write' ], + mobyrelationship => [ undef, 'read/write' ], valid_secondary_datatypes => [["String", "Integer", "DateTime", "Float", "Boolean"], 'read'], primitive_datatypes => [["String", "Integer", "DateTime", "Float", "Boolean"], 'read'], ); + my $file = $ENV{MOBY_CENTRAL_CONFIG}; + ( -e $file ) || die "MOBY Configuration file $file doesn't exist $!\n"; + chomp $file; + if ( ( -e $file ) && ( !( -d $file ) ) ) { + open IN, $file + or die + "can't open MOBY Configuration file $file for unknown reasons: $!\n"; + } + my @sections = split /(\[\s*\S+\s*\][^\[]*)/s, join "", ; + + #print STDERR "split into @sections\n"; + foreach my $section (@sections) { + + #print STDERR "calling MOBY::dbConfig\n"; + my $dbConfig = + MOBY::dbConfig->new( section => $section ) + ; # this is an object full of strings, no actual connections. It represents the information in the config file + next unless $dbConfig; + my $dbname = $dbConfig->section_title; + next unless $dbname; + $_attr_data{$dbname} = [$dbConfig, 'read']; # something like $_attr_data{mobycentral} = [$config, 'read'] + } + + #Encapsulated class data + #___________________________________________________________ + #ATTRIBUTES + #_____________________________________________________________ # METHODS, to operate on encapsulated class data # Is a specified object attribute accessible in a given mode @@ -99,31 +123,8 @@ $self->{$attrname} = $self->_default_for($attrname); } } - return $self if $self->mobycentral->{'dbname'}; # if it has been set, then just return it - my $file = $ENV{MOBY_CENTRAL_CONFIG}; - ( -e $file ) || die "MOBY Configuration file $file doesn't exist $!\n"; - chomp $file; - if ( ( -e $file ) && ( !( -d $file ) ) ) { - open IN, $file - or die - "can't open MOBY Configuration file $file for unknown reasons: $!\n"; - } - my @sections = split /(\[\s*\S+\s*\][^\[]*)/s, join "", ; - - #print STDERR "split into @sections\n"; - foreach my $section (@sections) { - - #print STDERR "calling MOBY::dbConfig\n"; - my $dbConfig = - MOBY::dbConfig->new( section => $section ) - ; # this is an object full of strings, no actual connections. It represents the information in the config file - next unless $dbConfig; - my $dbname = $dbConfig->section_title; - next unless $dbname; - +# return $self if $self->mobycentral->{'dbname'}; # if it has been set, then just return it #print STDERR "setting the COnfig dbConfig for the title $dbname with object $dbConfig\n\n"; - $self->{$dbname} = $dbConfig; - } $CONFIG = $self; return $self; } From mwilkinson at dev.open-bio.org Tue Apr 15 00:36:23 2008 From: mwilkinson at dev.open-bio.org (Mark Wilkinson) Date: Mon, 14 Apr 2008 20:36:23 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804150036.m3F0aN0u030555@dev.open-bio.org> mwilkinson Mon Apr 14 20:36:23 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/t In directory dev.open-bio.org:/tmp/cvs-serv30536/t Modified Files: Central.t Added Files: mobycentral.config Log Message: MOBY Central triggers a load of the Config.pm module which now tries to read a configuration file as soon as it is loaded, so I just added a fake and empty config file just to silence the test harness moby-live/Perl/MOBY-Server/t mobycentral.config,NONE,1.1 Central.t,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/t/Central.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/t/Central.t 2008/02/21 00:21:28 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/t/Central.t 2008/04/15 00:36:23 1.2 @@ -39,6 +39,7 @@ CLIENT_ONLY + $ENV{MOBY_CENTRAL_CONFIG} = "./t/mobycentral.config"; # Test that modules required ONLY for local MOBY Central are installed. require_ok( "DBI" ) or diag($missing_modules); require_ok( "DBD::mysql" ) or diag($missing_modules); From senger at dev.open-bio.org Wed Apr 16 09:39:55 2008 From: senger at dev.open-bio.org (Martin Senger) Date: Wed, 16 Apr 2008 05:39:55 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804160939.m3G9dtBs001571@dev.open-bio.org> senger Wed Apr 16 05:39:55 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/Clients/help In directory dev.open-bio.org:/tmp/cvs-serv1552/src/Clients/help Modified Files: MosesGenerators_usage.txt Log Message: moby-live/Java/src/Clients/help MosesGenerators_usage.txt,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/help/MosesGenerators_usage.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Java/src/Clients/help/MosesGenerators_usage.txt 2008/02/22 09:37:39 1.3 +++ /home/repository/moby/moby-live/Java/src/Clients/help/MosesGenerators_usage.txt 2008/04/16 09:39:55 1.4 @@ -59,7 +59,8 @@ -n ... do NOT generate anything, just show what WOULD be generated -outdir - A directory where the results go to. Default is 'generated'. + A directory where the results go to. + Default is the current directory. -ng ... do NOT include graphs (showing connections to other Biomoby entities) in the generated Java API. This makes generating slightly faster. From kawas at dev.open-bio.org Wed Apr 16 13:52:03 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 16 Apr 2008 09:52:03 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804161352.m3GDq35K002106@dev.open-bio.org> kawas Wed Apr 16 09:52:03 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi In directory dev.open-bio.org:/tmp/cvs-serv2069/Perl/MOBY-Server/share/cgi Modified Files: service_tester.pl Log Message: *modified how IPC::Shareable is used to prevent shared memory from being recycled properly moby-live/Perl/MOBY-Server/share/cgi service_tester.pl,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/service_tester.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/service_tester.pl 2008/02/21 00:21:27 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/share/cgi/service_tester.pl 2008/04/16 13:52:03 1.2 @@ -68,7 +68,7 @@ close OUT; # create some shared variables -my $alive_handle = tie %ALIVE, 'IPC::Shareable', undef, { destroy => 'yes' }; +my $alive_handle = tie %ALIVE, 'IPC::Shareable', undef, { } or die "\n\tCouldn't tie shared variable:\n$!"; # create the central client and get all service providers once my $central = @@ -188,7 +188,14 @@ $root->appendChild($element); } -IPC::Shareable->clean_up_all; +# clean up the shared memory +eval { + warn "Attempting to clean up shared memory ..."; + IPC::Shareable->clean_up_all; + warn "Shared memory cleaned up successfully"; +}; + +warn "There was a problem cleaning up shared memory segments:\n$@\n" if $@; open( OUT, ">$DIRECTORY/$FILENAME" ) || die("Cannot Open File $DIRECTORY/$FILENAME $!"); print OUT $doc->toString(1); From kawas at dev.open-bio.org Wed Apr 16 13:55:28 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 16 Apr 2008 09:55:28 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804161355.m3GDtSTw002184@dev.open-bio.org> kawas Wed Apr 16 09:55:28 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv2149/Perl/MOBY-Server Modified Files: Changes Log Message: added updates that i know about to the changes file moby-live/Perl/MOBY-Server Changes,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Changes,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/02/21 00:21:28 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/04/16 13:55:28 1.2 @@ -1,5 +1,15 @@ Revision history for Perl extension MOBY. -1.00 +1.04 + - fixed bug that allowed service types to be registered + with empty ISA relationships. + - MOBY::Config now only reads the config file once instead + of numerous times. + - Attempted fix of shared memory bugs with service_tester.pl + Shared memory wasn't being recycled properly and led to the + server running the script to run out of memory segments, + causing the script to run, but not to produce any output. + +1.00 - CVS version of MOBY released to the world via CPAN! From senger at dev.open-bio.org Sat Apr 19 19:11:18 2008 From: senger at dev.open-bio.org (Martin Senger) Date: Sat, 19 Apr 2008 15:11:18 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804191911.m3JJBI8j010308@dev.open-bio.org> senger Sat Apr 19 15:11:18 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/Clients In directory dev.open-bio.org:/tmp/cvs-serv10271/src/Clients Modified Files: CreateMobyInput.java Log Message: moby-live/Java/src/Clients CreateMobyInput.java,1.9,1.10 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java 2007/05/29 03:51:46 1.9 +++ /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java 2008/04/19 19:11:18 1.10 @@ -6,7 +6,7 @@ // Copyright Martin Senger (martin.senger at gmail.com). // -import org.biomoby.shared.CentralAll; +import org.biomoby.shared.CentralCached; import org.biomoby.shared.MobyDataType; import org.biomoby.shared.MobyService; import org.biomoby.shared.event.LogListener; @@ -14,6 +14,7 @@ import org.biomoby.service.dashboard.data.DataTypeTreeTable; import org.biomoby.service.dashboard.data.ServiceInputPanel; import org.biomoby.client.CentralDigestCachedImpl; +import org.biomoby.client.CmdLineHelper; import org.tulsoft.tools.BaseCmdLine; import org.tulsoft.shared.FileUtils; @@ -44,24 +45,8 @@ * @author Martin Senger * @version $Id$ */ -public class CreateMobyInput { - - static boolean verbose; - - /************************************************************************* - * Return a help text how to use this client. - *************************************************************************/ - public static String getUsage() { - String helpFile = "help/CreateMobyInput_usage.txt"; - try { - return new String (FileUtils.findAndGetBinaryFile (helpFile)); - } catch (GException e) { - return - "Sorry but an error occured.\n" + - "I cannot find the help file '" + helpFile + "'.\n" + - e.getMessage(); - } - } +public class CreateMobyInput + extends CmdLineHelper { /************************************************************************* * Create a GUI for a single data type. @@ -128,7 +113,7 @@ if (doc != null) { XMLOutputter xo = new XMLOutputter(); xo.setFormat (Format.getPrettyFormat()); - System.out.println (xo.outputString (doc)); + msgln (xo.outputString (doc)); } } @@ -137,7 +122,7 @@ * an XML document representing complete input for a service. *************************************************************************/ protected void onPrint (ServiceInputPanel inputs) { - System.out.println (inputs.toXML()); + msgln (inputs.toXML()); } /************************************************************************* @@ -149,40 +134,31 @@ try { - BaseCmdLine cmd = new BaseCmdLine (args, true); - if (cmd.hasParam ("-help") || cmd.hasParam ("-h")) { - System.out.print (CreateMobyInput.getUsage()); - System.exit (0); - } + BaseCmdLine cmd = getCmdLine (args, CreateMobyInput.class); // there is not much to do without -data or -service String dataType = cmd.getParam ("-data"); String service = cmd.getParam ("-service"); if (dataType == null && service == null) { - System.err.println + emsgln ("Either '-data ' or '-service ' must be specified."); - System.exit (1); + exit (1); } // where is a Moby registry - String cachedir = cmd.getParam ("-cachedir"); - if (cachedir == null) - System.err.println ("WARNING: parameter -cachedir not given => no cache used."); - CentralAll worker = - new CentralDigestCachedImpl (cmd.getParam ("-e"), - cmd.getParam ("-uri"), - cachedir); - CentralDigestCachedImpl castWorker = (CentralDigestCachedImpl)worker; - - // how much to show - verbose = cmd.hasOption ("-v"); - if (! cmd.hasOption ("-q")) - ((Notifier)castWorker).addNotificationListener (new LogListener()); + CentralCached worker = getCachableRegistryWorker (cmd); - if (cmd.hasOption ("-debug")) { - worker.setDebug (true); + // there is not much to do without -cachedir + String cacheDir = cmd.getParam ("-cachedir"); + if (cacheDir == null) { + emsgln ("Parameter -cachedir must be specified."); + exit (1); } + // how much to show + if (! cmd.hasOption ("-q")) + worker.addNotificationListener (new LogListener()); + // load all data types MobyDataType[] dataTypes = worker.getDataTypes(); @@ -196,7 +172,7 @@ } } if (rootType == null) { - System.err.println ("Parameter -data specifies a non-existing data type."); + emsgln ("Parameter -data specifies a non-existing data type."); } else { new CreateMobyInput (rootType, dataTypes); } @@ -205,32 +181,22 @@ // load a service and show it in a table if (service != null) { MobyService mobyService = null; - if (cachedir == null) { - MobyService pattern = new MobyService (service); - pattern.setCategory (""); - MobyService[] services = worker.findService (pattern); - if (services.length > 0) - mobyService = services[0]; - } else { - MobyService[] services = worker.getServices(); - for (int i = 0; i < services.length; i++) { - if (service.equals (services[i].getName())) { - mobyService = services[i]; - break; - } + MobyService[] services = worker.getServices(); + for (int i = 0; i < services.length; i++) { + if (service.equals (services[i].getName())) { + mobyService = services[i]; + break; } } if (mobyService == null) { - System.err.println ("Parameter -service specifies a non-existing service."); + emsgln ("Parameter -service specifies a non-existing service."); } else { new CreateMobyInput (mobyService, dataTypes); } } - } catch (Exception e) { - System.err.println ("===ERROR==="); - e.printStackTrace(); - System.err.println ("==========="); + } catch (Throwable e) { + processErrorAndExit (e); } } From senger at dev.open-bio.org Sat Apr 19 19:11:18 2008 From: senger at dev.open-bio.org (Martin Senger) Date: Sat, 19 Apr 2008 15:11:18 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804191911.m3JJBIr3010290@dev.open-bio.org> senger Sat Apr 19 15:11:17 EDT 2008 Update of /home/repository/moby/moby-live/Java/docs In directory dev.open-bio.org:/tmp/cvs-serv10271/docs Modified Files: ChangeLog Log Message: moby-live/Java/docs ChangeLog,1.88,1.89 =================================================================== RCS file: /home/repository/moby/moby-live/Java/docs/ChangeLog,v retrieving revision 1.88 retrieving revision 1.89 diff -u -r1.88 -r1.89 --- /home/repository/moby/moby-live/Java/docs/ChangeLog 2008/03/28 11:19:02 1.88 +++ /home/repository/moby/moby-live/Java/docs/ChangeLog 2008/04/19 19:11:17 1.89 @@ -1,3 +1,8 @@ +2008-04-20 Martin Senger + + * Changed CreateMobyInput client - it now requires to use the + local cache. + 2008-03-28 Martin Senger * Fixed a dependency for commons-collection in the project.pom. From senger at dev.open-bio.org Sat Apr 19 19:11:18 2008 From: senger at dev.open-bio.org (Martin Senger) Date: Sat, 19 Apr 2008 15:11:18 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804191911.m3JJBIlC010326@dev.open-bio.org> senger Sat Apr 19 15:11:18 EDT 2008 Update of /home/repository/moby/moby-live/Java/src/Clients/help In directory dev.open-bio.org:/tmp/cvs-serv10271/src/Clients/help Modified Files: CreateMobyInput_usage.txt Log Message: moby-live/Java/src/Clients/help CreateMobyInput_usage.txt,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Java/src/Clients/help/CreateMobyInput_usage.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Java/src/Clients/help/CreateMobyInput_usage.txt 2008/02/22 09:37:39 1.4 +++ /home/repository/moby/moby-live/Java/src/Clients/help/CreateMobyInput_usage.txt 2008/04/19 19:11:18 1.5 @@ -1,11 +1,21 @@ Usage: run-create-input -h[elp] - run-create-input -data [] [] - run-create-input -service [] [] -or (after setting CLASSPATH) - java CreateMobyInput -h[elp] - java CreateMobyInput -data [] [] - java CreateMobyInput -service [] [] + run-create-input -cachedir -data [] [] + run-create-input -cachedir -service [] [] + +where -cachedir + is a mandatory argument; is a directory with local cache + +where specify what Moby registry to connect to + -e + is an endpoint of a Moby registry + -uri + is a URI defining Moby registry's namespace + or + -registry + is a convenient way to specify a known registry; + the list of known registries can be obtained by the -lr option + from the MobyCmdLineClient (run-cmdline-client -lr) where -data @@ -16,14 +26,6 @@ (e.g. -service Mabuhay) One of these parameters must be specified. -where specify what Moby registry to connect to - -cachedir - is a directory with cached entities of a Moby registry - -e - is an endpoint of a Moby registry - -uri - is a URI defining Moby registry's namespace - where are: -q ... quiet mode (prints only errors) From senger at dev.open-bio.org Mon Apr 21 13:44:06 2008 From: senger at dev.open-bio.org (Martin Senger) Date: Mon, 21 Apr 2008 09:44:06 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804211344.m3LDi6NJ007285@dev.open-bio.org> senger Mon Apr 21 09:44:05 EDT 2008 Update of /home/repository/moby/moby-live/Java/xmls In directory dev.open-bio.org:/tmp/cvs-serv7266/xmls Modified Files: maven.xml Log Message: changing to maven-ant-tasks-2.0.9.jar moby-live/Java/xmls maven.xml,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Java/xmls/maven.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Java/xmls/maven.xml 2008/02/15 03:46:42 1.2 +++ /home/repository/moby/moby-live/Java/xmls/maven.xml 2008/04/21 13:44:05 1.3 @@ -24,8 +24,8 @@ - - + + From jmrc at dev.open-bio.org Wed Apr 23 13:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8Bcl012042@dev.open-bio.org> jmrc Wed Apr 23 09:08:10 EDT 2008 Update of /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test In directory dev.open-bio.org:/tmp/cvs-serv11953/Docs/asyncDocs/async-MOBY-test Modified Files: AsyncService.pm async-MOBY-test.cgi.pl sayHello-description.xml sayHello.wsdl Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Docs/asyncDocs/async-MOBY-test AsyncService.pm,1.1,1.2 async-MOBY-test.cgi.pl,1.1,1.2 sayHello-description.xml,1.1,1.2 sayHello.wsdl,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/AsyncService.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/AsyncService.pm 2008/03/10 12:31:31 1.1 +++ /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/AsyncService.pm 2008/04/23 13:08:10 1.2 @@ -4,7 +4,7 @@ use MOBY::CommonSubs qw(:all); use MOBY::Async::SimpleServer; use vars qw(@ISA); - at ISA = qw(MOBY::Async::SimpleServer); +use base qw(MOBY::Async::SimpleServer); # This variable is a subroutine which carry out the core of the service my $sayHello = sub { =================================================================== RCS file: /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/async-MOBY-test.cgi.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/async-MOBY-test.cgi.pl 2008/03/10 12:31:31 1.1 +++ /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/async-MOBY-test.cgi.pl 2008/04/23 13:08:10 1.2 @@ -9,14 +9,17 @@ my $server = new SOAP::Transport::HTTP::CGI; $server->serializer(WSRF::Serializer->new); $server->deserializer(WSRF::Deserializer->new); + +# Magic! It works! +$server->on_action(sub{}); + $server->dispatch_with({ $WSRF::Constants::MOBY.'#sayHello' => 'AsyncService', $WSRF::Constants::MOBY.'#sayHello_submit' => 'AsyncService', $WSRF::Constants::MOBY.'#sayGoodbye' => 'AsyncService', $WSRF::Constants::MOBY.'#sayGoodbye_submit' => 'AsyncService', - $WSRF::Constants::WSRP => 'AsyncService', - $WSRF::Constants::WSRL => 'AsyncService', - - + $WSRF::Constants::WSRPW.'/GetResourceProperty/GetResourcePropertyRequest' => 'AsyncService', + $WSRF::Constants::WSRPW.'/GetMultipleResourceProperties/GetMultipleResourcePropertiesRequest' => 'AsyncService', + $WSRF::Constants::WSRLW.'/ImmediateResourceTermination/DestroyRequest' => 'AsyncService', }); $server->handle(); =================================================================== RCS file: /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/sayHello-description.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/sayHello-description.xml 2008/03/10 12:31:31 1.1 +++ /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/sayHello-description.xml 2008/04/23 13:08:10 1.2 @@ -3,7 +3,7 @@ Annotations 0 moby-async - + jmrodriguez at cnio.es http://ubio.bioinfo.cnio.es/inb/cgi-bin/async-MOBY-test/async-MOBY-test.cgi @@ -19,4 +19,4 @@ - \ No newline at end of file + =================================================================== RCS file: /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/sayHello.wsdl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/sayHello.wsdl 2008/03/10 12:31:31 1.1 +++ /home/repository/moby/moby-live/Docs/asyncDocs/async-MOBY-test/sayHello.wsdl 2008/04/23 13:08:10 1.2 @@ -130,7 +130,7 @@ - + @@ -148,7 +148,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -193,4 +193,4 @@ - \ No newline at end of file + From jmrc at dev.open-bio.org Wed Apr 23 13:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8BKL012012@dev.open-bio.org> jmrc Wed Apr 23 09:08:10 EDT 2008 Update of /home/repository/moby/moby-live/Docs/asyncDocs In directory dev.open-bio.org:/tmp/cvs-serv11953/Docs/asyncDocs Added Files: BioMOBY Asynchronous Service Specification v2.4.2.pdf Removed Files: BioMOBY Asynchronous Service Specification_v2.4.1.pdf Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Docs/asyncDocs BioMOBY Asynchronous Service Specification v2.4.2.pdf,NONE,1.1 BioMOBY Asynchronous Service Specification_v2.4.1.pdf,1.1,NONE rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/BioMOBY,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/Asynchronous,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/Service,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/Specification,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/BioMOBY,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/Asynchronous,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/Service,v: No such file or directory rcsdiff: /home/repository/moby/moby-live/Docs/asyncDocs/RCS/Specification_v2.4.1.pdf,v: No such file or directory From jmrc at dev.open-bio.org Wed Apr 23 13:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8Bos012096@dev.open-bio.org> jmrc Wed Apr 23 09:08:11 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv11953/Perl/MOBY-Server Modified Files: Makefile.PL Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Perl/MOBY-Server Makefile.PL,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL 2008/03/20 17:36:33 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Makefile.PL 2008/04/23 13:08:11 1.5 @@ -63,7 +63,7 @@ } # MOBY::Async requires - requires 'WSRF::Lite' => '0.8.2.2'; + requires 'WSRF::Lite' => '0.008.2.2'; requires 'XML::DOM' => ''; requires 'DateTime::Format::Epoch' => ''; requires 'DateTime::Format::W3CDTF' => ''; From jmrc at dev.open-bio.org Wed Apr 23 13:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8BjX012078@dev.open-bio.org> jmrc Wed Apr 23 09:08:11 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Client In directory dev.open-bio.org:/tmp/cvs-serv11953/Perl/MOBY-Client Modified Files: Makefile.PL Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Perl/MOBY-Client Makefile.PL,1.5,1.6 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Client/Makefile.PL,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- /home/repository/moby/moby-live/Perl/MOBY-Client/Makefile.PL 2008/03/05 18:38:40 1.5 +++ /home/repository/moby/moby-live/Perl/MOBY-Client/Makefile.PL 2008/04/23 13:08:11 1.6 @@ -55,7 +55,7 @@ } - requires 'WSRF::Lite' => '0.8.2.2'; + requires 'WSRF::Lite' => '0.008.2.2'; requires 'XML::DOM' => ''; requires 'DateTime::Format::Epoch' => ''; requires 'DateTime::Format::W3CDTF' => ''; From jmrc at dev.open-bio.org Wed Apr 23 13:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8B8G012136@dev.open-bio.org> jmrc Wed Apr 23 09:08:11 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY In directory dev.open-bio.org:/tmp/cvs-serv11953/Perl/MOBY-Server/lib/MOBY Modified Files: Async.pm Central.pm Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Perl/MOBY-Server/lib/MOBY Async.pm,1.2,1.3 Central.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async.pm 2008/02/21 17:15:40 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async.pm 2008/04/23 13:08:11 1.3 @@ -8,11 +8,19 @@ This is a set of tools for providing and invoking Asynchronous MOBY Services. -=head1 AUTHORS +=head1 FORMER AUTHORS Enrique de Andres Saiz (enrique.deandres at pcm.uam.es) - INB GNHC-1 (Madrid Science Park, Spain). +=head1 MAINTAINERS + +Jose Manuel Rodriguez Carrasco (jmrodriguez at cnio.es) - +INB GN-2 (Centro Nacional de Investigaciones Oncologicas, Spain). + +Jose Maria Fernandez Gonzalez (jmfernandez at cnio.es) - +INB GN-2 (Centro Nacional de Investigaciones Oncologicas, Spain). + =head1 DESCRIPTION MOBY::Async package provides a set of modules for working with Asynchronous MOBY @@ -22,21 +30,21 @@ =item MOBY::Async::SimpleServer -Provides a simple class that can be extended to build file based asynchronous +It provides a simple class that can be extended to build file based asynchronous services. =item MOBY::Async::Service -Provides a class to invoke asynchronous services. +It provides a class to invoke asynchronous services. =item MOBY::Async::LSAE -Provides functionalities to work with LSAE analysis event blocks. +It provides functionalities to work with LSAE analysis event blocks. =item MOBY::Async::WSRF -Extends WSRF::Lite perl module and provides everything required for -MOBY::Async::SimpleServer class. +It extends L perl module and provides everything required for +L class. =back @@ -47,7 +55,7 @@ From the server side, an asynchronous service is very similar to the traditional synchronous BioMOBY services. It is composed by a cgi (dispatcher.cgi) and a -Perl module wich extends MOBY::Async::SimpleServer class (HelloWorld.pm). +Perl module wich extends L class (HelloWorld.pm). B @@ -61,11 +69,13 @@ my $server = new SOAP::Transport::HTTP::CGI; $server->serializer(WSRF::Serializer->new); $server->deserializer(WSRF::Deserializer->new); + $server->on_action(sub{}); $server->dispatch_with({ $WSRF::Constants::MOBY.'#sayHello' => 'HelloWorld', $WSRF::Constants::MOBY.'#sayHello_submit' => 'HelloWorld', - $WSRF::Constants::WSRL => 'HelloWorld', - $WSRF::Constants::WSRP => 'HelloWorld', + $WSRF::Constants::WSRPW.'/GetResourceProperty/GetResourcePropertyRequest' => 'HelloWorld', + $WSRF::Constants::WSRPW.'/GetMultipleResourceProperties/GetMultipleResourcePropertiesRequest' => 'HelloWorld', + $WSRF::Constants::WSRLW.'/ImmediateResourceTermination/DestroyRequest' => 'HelloWorld', }); $server->handle(); @@ -75,14 +85,13 @@ use strict; use MOBY::CommonSubs qw(:all); use MOBY::Async::SimpleServer; - use vars qw(@ISA); - @ISA = qw(MOBY::Async::SimpleServer); + use base qw(MOBY::Async::SimpleServer); - # This environment variable is necessary - it is used internally + # This environment variable must be set - it is used internally # by MOBY::Async::SimpleServer class $ENV{AUTHURI} = 'your.auth.com'; - # This variable is a subroutine which carry out the core of the service + # This variable is a subroutine which carries out the core of the service my $sayHello = sub { my ($caller, $data) = @_; my $response = ''; @@ -99,7 +108,7 @@ return SOAP::Data->value(responseHeader($ENV{AUTHURI}).$response.responseFooter())->type('string'); }; - # This is the method that answers to synchronous requests + # This is the method which answers to synchronous requests sub sayHello { my $self = shift @_; # Here you can choose between sync or error @@ -107,7 +116,7 @@ #return $self->error(@_); } - # This is the method that answers to asynchronous requests + # This is the method which answers to asynchronous requests sub sayHello_submit { my $self = shift @_; return $self->async($sayHello, @_); @@ -115,7 +124,7 @@ 1; -A client that wishes to run an asynchronous service as HelloWorld must carry out +A client which wishes to run an asynchronous service as HelloWorld must carry out the following steps: 1. First we have a sayHello_submit (servicename_submit) invocation, which @@ -127,7 +136,7 @@ 2. After this, a polling is done by invocating GetMultipleResourceProperties operation. GetMultipleResourceProperties retrieve the content of one or several -properties. In this case, as we are trying to determine if a bach-call has +properties. In this case, as we are trying to determine if a batch-call has finished, we ask all status properties (status_queryID). The status returned for each status property is in LSAE format. Unless all status properties represent that execution for its respective query identifier is finished, we @@ -140,7 +149,7 @@ 4. The client also explicitly calls the WSRF Destroy operation to clean the results at the service side. -To do this, a client relies on MOBY::Async::Service class, whoose use is very +To do this, a client relies on MOBY::Async::Service class, whose use is very similar to MOBY::Client::Service class available for synchronous services: # By default, silent is true, then no messages about the progress are reported @@ -153,7 +162,7 @@ print "$response\n"; Additionally, MOBY::Async::Service class provides methods to carry out -individually the steps described previously: +individually the steps previously described: my $S = MOBY::Async::Service->new(service => $wsdl); my ($EPR, @queryIDs) = $S->submit(XMLinputlist => [ @@ -169,9 +178,13 @@ =head1 FURTHER READING -MOBY::Async::SimpleServer, MOBY::Async::Service, MOBY::Async::LSAE and -MOBY::Async::WSRF Perl module documentation. +L, L, L and +L Perl modules documentation. + +Asynchronous BioMOBY Services Specification: +L -Asynchronous BioMOBY Services Specification. +WSRF Specifications: +L =cut =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm 2008/04/04 13:52:24 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Central.pm 2008/04/23 13:08:11 1.4 @@ -4264,7 +4264,7 @@ - + @@ -4282,7 +4282,7 @@ - + @@ -4300,7 +4300,7 @@ - + From jmrc at dev.open-bio.org Wed Apr 23 13:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8Brj012060@dev.open-bio.org> jmrc Wed Apr 23 09:08:11 EDT 2008 Update of /home/repository/moby/moby-live/Perl In directory dev.open-bio.org:/tmp/cvs-serv11953/Perl Modified Files: INSTALL Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Perl INSTALL,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/INSTALL,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/INSTALL 2008/02/22 17:25:12 1.4 +++ /home/repository/moby/moby-live/Perl/INSTALL 2008/04/23 13:08:11 1.5 @@ -14,6 +14,7 @@ ###INSTALLATION OF CLIENT### cd MOBY-Client +perl populate_libs.pl perl Makefile.PL make make install From jmrc at dev.open-bio.org Wed Apr 23 13:08:11 2008 From: jmrc at dev.open-bio.org (José Manuel Rodríguez Carrasco) Date: Wed, 23 Apr 2008 09:08:11 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804231308.m3ND8BgO012170@dev.open-bio.org> jmrc Wed Apr 23 09:08:11 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async In directory dev.open-bio.org:/tmp/cvs-serv11953/Perl/MOBY-Server/lib/MOBY/Async Modified Files: LSAE.pm Service.pm SimpleServer.pm WSRF.pm Log Message: * MOBY WSRF implementation was not WSRF compliant in some points, and the same happened with sample code. Both the libraries and the generated WSDL have been fixed. * Detection of WSRF::Lite libraries has been slightly improved. * Specifications have been updated to v2.4.2, reflecting the changes made in the library and fixing some explanations and examples (see changelog inside specifications). moby-live/Perl/MOBY-Server/lib/MOBY/Async LSAE.pm,1.1,1.2 Service.pm,1.1,1.2 SimpleServer.pm,1.1,1.2 WSRF.pm,1.1,1.2 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/LSAE.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/LSAE.pm 2008/02/21 00:21:27 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/LSAE.pm 2008/04/23 13:08:11 1.2 @@ -199,7 +199,7 @@ use XML::LibXML; use Exporter; -our @ISA = qw(Exporter); +use base qw(Exporter); our @EXPORT = qw( LSAE_BASE_EVENT =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/Service.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/Service.pm 2008/02/21 00:21:27 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/Service.pm 2008/04/23 13:08:11 1.2 @@ -17,7 +17,7 @@ =head1 DESCRIPTION -Provides a class to invoke asynchronous services. Its use is very similar to +It provides a class to invoke asynchronous services. Its use is very similar to MOBY::Client::Service, but it also provides additional methods in order to have more control over the asynchronous service execution. @@ -133,8 +133,7 @@ use MOBY::Async::LSAE; use MOBY::CommonSubs qw(:all); use MOBY::Client::Service; -use vars qw(@ISA); - at ISA = qw(MOBY::Client::Service); +use base qw(MOBY::Client::Service); sub new { @@ -428,14 +427,22 @@ my $searchTerm = ""; foreach my $queryID (@queryIDs) { - $searchTerm .= ""; - $searchTerm .= "status_".$queryID; + #$searchTerm .= ""; + #$searchTerm .= "mobyws:status_".$queryID; + #$searchTerm .= ""; + $searchTerm .= ""; + $searchTerm .= "mobyws:status_".$queryID; $searchTerm .= ""; } +# my $ans = WSRF::Lite +# -> uri($WSRF::Constants::WSRPW) +# -> on_action( sub {sprintf '%s/%s', @_} ) +# -> wsaddress($EPR) +# -> GetMultipleResourceProperties(SOAP::Data->value($searchTerm)->type('xml')); my $ans = WSRF::Lite -> uri($WSRF::Constants::WSRP) - -> on_action( sub {sprintf '%s/%s', @_} ) + -> on_action( sub {sprintf '%s/%s/%sRequest', $WSRF::Constants::WSRPW,$_[1],$_[1]} ) -> wsaddress($EPR) -> GetMultipleResourceProperties(SOAP::Data->value($searchTerm)->type('xml')); die "ERROR: ".$ans->faultstring if ($ans->fault); @@ -464,14 +471,14 @@ my $searchTerm = ""; foreach my $queryID (@queryIDs) { - $searchTerm .= ""; - $searchTerm .= "result_".$queryID; + $searchTerm .= ""; + $searchTerm .= "mobyws:result_".$queryID; $searchTerm .= ""; } my $ans = WSRF::Lite -> uri($WSRF::Constants::WSRP) - -> on_action( sub {sprintf '%s/%s', @_} ) + -> on_action( sub {sprintf '%s/%s/%sRequest', $WSRF::Constants::WSRPW,$_[1],$_[1]} ) -> wsaddress($EPR) -> GetMultipleResourceProperties(SOAP::Data->value($searchTerm)->type('xml')); die "ERROR: ".$ans->faultstring if ($ans->fault); @@ -499,7 +506,7 @@ my $ans = WSRF::Lite -> uri($WSRF::Constants::WSRL) - -> on_action( sub {sprintf '%s/%s', @_} ) + -> on_action( sub {sprintf '%s/ImmediateResourceTermination/%sRequest', $WSRF::Constants::WSRLW,$_[1]} ) -> wsaddress($EPR) -> Destroy(); die "ERROR: ".$ans->faultstring if ($ans->fault); =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/SimpleServer.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/SimpleServer.pm 2008/02/21 00:21:27 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/SimpleServer.pm 2008/04/23 13:08:11 1.2 @@ -90,13 +90,14 @@ package MOBY::Async::SimpleServer; use strict; +use CGI; use XML::LibXML; use POSIX qw(setsid); use MOBY::CommonSubs qw(:all); use MOBY::Async::LSAE; use MOBY::Async::WSRF; -use vars qw(@ISA); - at ISA = qw(WSRF::FileBasedMobyResourceLifetimes); + +use base qw(WSRF::FileBasedMobyResourceLifetimes); #=============================================================================== # async_create @@ -114,7 +115,24 @@ # Create an EndpointReference for the resource my $EPR = WSRF::WS_Address->new(); - $EPR->Address("http://".$ENV{SERVER_NAME}.$ENV{SCRIPT_NAME}); + + my($query)=CGI->new(); + my($proto)=($query->https())?'https':'http'; + my($host)=$query->virtual_host(); + my($port)=$query->virtual_port(); + if(($proto eq 'http' && $port eq '80') || ($proto eq 'https' && $port eq '443')) { + $port=''; + } else { + $port = ':'.$port; + } + my($relpath)=$query->script_name(); + my($virtualrel)=$ENV{'HTTP_VIA'} || $ENV{'HTTP_FORWARDED'} || $ENV{'HTTP_X_FORWARDED_FOR'}; + if(defined($virtualrel) && $virtualrel =~ /^(?:https?:\/\/[^:\/]+)?(?::[0-9]+)?(\/.*)/) { + $relpath=$1; + } + + $EPR->Address("$proto://$host$port$relpath?asyncId=$ID"); + #$EPR->Address("http://".$ENV{SERVER_NAME}.$ENV{SCRIPT_NAME}); $EPR->ReferenceParameters(''.$ENV{ID}.''); $EPR = XML::LibXML->new->parse_string($EPR->XML)->getDocumentElement->toString; @@ -141,7 +159,8 @@ my ($func, $data) = @_; # Get input queryIDs and store them - my $lock = WSRF::MobyFile->new($envelope); + my $ID=$ENV{ID}; + my $lock = WSRF::MobyFile->new($envelope,$ID); my $inputs = serviceInputParser($data); my @queryIDs = keys %$inputs; $WSRF::WSRP::Private{queryIDs} = \@queryIDs; @@ -167,7 +186,7 @@ my $property_result = "result_$queryID"; # Check if service is running or not - my $lock = WSRF::MobyFile->new($envelope); + my $lock = WSRF::MobyFile->new($envelope,$ID); if ($WSRF::WSRP::Private{$property_pid}) { $lock->toFile(); } else { @@ -265,7 +284,7 @@ $status->id($queryID); # New properties values - my $lock = WSRF::MobyFile->new($envelope); + $lock = WSRF::MobyFile->new($envelope,$ID); $WSRF::WSRP::Private{$property_pid} = $$; $WSRF::WSRP::ResourceProperties{$property_status} = $status->XML(); $WSRF::WSRP::ResourceProperties{$property_result} = ''; @@ -275,12 +294,10 @@ my $result; eval { my $xml = $func->($class, $input); - if(UNIVERSAL::isa($xml,'XML::LibXML::Node')) { - if(UNIVERSAL::isa($xml,'XML::LibXML::Document')) { - $result=$xml->getDocumentElement()->toString(); - } else { - $result=$xml->toString(); - } + if(UNIVERSAL::isa($xml,'XML::LibXML::Document')) { + $result=$xml->getDocumentElement()->toString(); + } elsif(UNIVERSAL::isa($xml,'XML::LibXML::Node')) { + $result=$xml->toString(); } else { my $parser = XML::LibXML->new(); my $toparse; @@ -331,7 +348,7 @@ } # New properties values - $lock = WSRF::MobyFile->new($envelope); + $lock = WSRF::MobyFile->new($envelope,$ID); $WSRF::WSRP::Private{$property_pid} = ''; $WSRF::WSRP::ResourceProperties{$property_status} = $status->XML(); $WSRF::WSRP::ResourceProperties{$property_result} = $result; @@ -344,7 +361,7 @@ } # Compose response using the status properties - $lock = WSRF::MobyFile->new($envelope); + $lock = WSRF::MobyFile->new($envelope,$ID); my $ans = ''; foreach my $queryID (@queryIDs) { my $property_status = "status_$queryID"; @@ -469,7 +486,6 @@ sub Destroy { my ($class, $envelope) = ($_[0], $_[$#_]); - $ENV{ID} = $envelope->valueof("/{$SOAP::Constants::NS_ENV}Envelope/{$SOAP::Constants::NS_ENV}Header/{$WSRF::Constants::MOBY}ServiceInvocationId"); my $lock = WSRF::MobyFile->new($envelope); $lock->toFile(); =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/WSRF.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/WSRF.pm 2008/02/21 00:21:27 1.1 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/WSRF.pm 2008/04/23 13:08:11 1.2 @@ -11,17 +11,17 @@ INB GNHC-1 (Madrid Science Park, Spain) (2006-2007). Maintainers -Jose Maria Fernandez (jmfernandez at cnio.es), -Jose Manuel Rodriguez (jmrodriguez at cnio.es) - +Jose Manuel Rodriguez (jmrodriguez at cnio.es), +Jose Maria Fernandez (jmfernandez at cnio.es) - INB GN2 (CNIO, Spain). =head1 DESCRIPTION -Extends WSRF::Lite perl module and provides everything required for -MOBY::Async::SimpleServer class. +It extends L Perl module and provides everything required for +L class. It is not intendeed to be used directly unless you want to create a new class -as WSRF::Async::SimpleServer +as L. =cut @@ -42,6 +42,8 @@ #$WSRF::Constants::WSSG = 'http://docs.oasis-open.org/wsrf/sg-2'; #$WSRF::Constants::WSBF = 'http://docs.oasis-open.org/wsrf/bf-2'; #$WSRF::Constants::WSA_ANON = 'http://www.w3.org/2005/08/addressing/anonymous'; +$WSRF::Constants::WSRPW = 'http://docs.oasis-open.org/wsrf/rpw-2'; +$WSRF::Constants::WSRLW = 'http://docs.oasis-open.org/wsrf/rlw-2'; #=============================================================================== # WSRF::Serializer @@ -50,63 +52,63 @@ # CAN INSERT HEADERS WHEN A FAULT OCCURS # package WSRF::Serializer; -use vars qw(@ISA); - at ISA = qw(WSRF::WSRFSerializer); +use base qw(WSRF::WSRFSerializer); my $WSRF_HEADER; sub std_envelope { - SOAP::Trace::trace('()'); - my $self = shift->new; - my $type = shift; - - $self->autotype(0); - $self->attr ({'xmlns:wsa' => $WSRF::Constants::WSA, - 'xmlns:wsrl' => $WSRF::Constants::WSRL, - 'xmlns:wsrp' => $WSRF::Constants::WSRP, - 'xmlns:wsu' => $WSRF::Constants::WSU, - 'xmlns:wsse' => $WSRF::Constants::WSSE - } ); - - - my(@parameters, @header); - for (@_) { - # Find all the SOAP Headers - if (defined($_) && ref($_) && UNIVERSAL::isa($_ => 'SOAP::Header')) { - push(@header, $_); - - # Find all the SOAP Message Parts (attachments) - } elsif (defined($_) && ref($_) && - $self->context && $self->context->packager->is_supported_part($_)) { - $self->context->packager->push_part($_); - - # Find all the SOAP Body elements - } else { - push(@parameters, $_); - } - } - my $header = @header ? SOAP::Data->set_value(@header) : undef; - $header = $WSRF_HEADER unless ($header); ########## THIS IS THE LINE I HAVE ADDED ########## - my($body,$parameters); - if ($type eq 'method' || $type eq 'response') { - SOAP::Trace::method(@parameters); - - my $method = shift(@parameters); -# or die "Unspecified method for SOAP call\n"; - - $parameters = @parameters ? SOAP::Data->set_value(@parameters) : undef; - if (!defined($method)) { - } elsif (UNIVERSAL::isa($method => 'SOAP::Data')) { - $body = $method; - } elsif ($self->use_default_ns) { - if ($self->{'_ns_uri'}) { - $body = SOAP::Data->name($method)->attr( { - 'xmlns' => $self->{'_ns_uri'}, - } ); - } else { - $body = SOAP::Data->name($method); - } - } else { + SOAP::Trace::trace('()'); + my $self = shift->new; + my $type = shift; + + $self->autotype(0); + $self->attr ({'xmlns:wsa' => $WSRF::Constants::WSA, + 'xmlns:wsrl' => $WSRF::Constants::WSRL, + 'xmlns:wsrp' => $WSRF::Constants::WSRP, + 'xmlns:wsu' => $WSRF::Constants::WSU, + 'xmlns:wsse' => $WSRF::Constants::WSSE + } ); + + + my(@parameters, @header); + for (@_) { + # Find all the SOAP Headers + if (defined($_) && ref($_) && UNIVERSAL::isa($_ => 'SOAP::Header')) { + push(@header, $_); + + # Find all the SOAP Message Parts (attachments) + } elsif (defined($_) && ref($_) && + $self->context && $self->context->packager->is_supported_part($_) + ) { + $self->context->packager->push_part($_); + + # Find all the SOAP Body elements + } else { + push(@parameters, $_); + } + } + my $header = @header ? SOAP::Data->set_value(@header) : undef; + $header = $WSRF_HEADER unless ($header); ########## THIS IS THE LINE I HAVE ADDED ########## + my($body,$parameters); + if ($type eq 'method' || $type eq 'response') { + SOAP::Trace::method(@parameters); + + my $method = shift(@parameters); + # or die "Unspecified method for SOAP call\n"; + + $parameters = @parameters ? SOAP::Data->set_value(@parameters) : undef; + if (!defined($method)) { + } elsif (UNIVERSAL::isa($method => 'SOAP::Data')) { + $body = $method; + } elsif ($self->use_default_ns) { + if ($self->{'_ns_uri'}) { + $body = SOAP::Data->name($method)->attr( { + 'xmlns' => $self->{'_ns_uri'}, + } ); + } else { + $body = SOAP::Data->name($method); + } + } else { # Commented out by Byrne on 1/4/2006 - to address default namespace problems # $body = SOAP::Data->name($method)->uri($self->{'_ns_uri'}); # $body = $body->prefix($self->{'_ns_prefix'}) if ($self->{'_ns_prefix'}); @@ -114,75 +116,80 @@ # Added by Byrne on 1/4/2006 - to avoid the unnecessary creation of a new # namespace # Begin New Code (replaces code commented out above) - $body = SOAP::Data->name($method); - my $pre = $self->find_prefix($self->{'_ns_uri'}); - $body = $body->prefix($pre) if ($self->{'_ns_prefix'}); + $body = SOAP::Data->name($method); + my $pre = $self->find_prefix($self->{'_ns_uri'}); + $body = $body->prefix($pre) if ($self->{'_ns_prefix'}); # End new code - } - # This is breaking a unit test right now... - $body->set_value(SOAP::Utils::encode_data($parameters ? \$parameters : ())) - if $body; - } elsif ($type eq 'fault') { - SOAP::Trace::fault(@parameters); - $body = SOAP::Data - -> name(SOAP::Utils::qualify($self->envprefix => 'Fault')) - # parameters[1] needs to be escaped - thanks to aka_hct at gmx dot de - # commented on 2001/03/28 because of failing in ApacheSOAP - # need to find out more about it - # -> attr({'xmlns' => ''}) - -> value(\SOAP::Data->set_value( - SOAP::Data->name(faultcode => SOAP::Utils::qualify($self->envprefix => $parameters[0]))->type(""), - SOAP::Data->name(faultstring => SOAP::Utils::encode_data($parameters[1]))->type(""), - defined($parameters[2]) ? SOAP::Data->name(detail => do{my $detail = $parameters[2]; ref $detail ? \$detail : $detail}) : (), - defined($parameters[3]) ? SOAP::Data->name(faultactor => $parameters[3])->type("") : (), - )); - } elsif ($type eq 'freeform') { - SOAP::Trace::freeform(@parameters); - $body = SOAP::Data->set_value(@parameters); - } elsif (!defined($type)) { - # This occurs when the Body is intended to be null. When no method has been - # passed in of any kind. - } else { - die "Wrong type of envelope ($type) for SOAP call\n"; - } - - $self->seen({}); # reinitialize multiref table - # Build the envelope - # Right now it is possible for $body to be a SOAP::Data element that has not - # XML escaped any values. How do you remedy this? - my($encoded) = $self->encode_object( - SOAP::Data->name(SOAP::Utils::qualify($self->envprefix => 'Envelope') => \SOAP::Data->value( - ($header ? SOAP::Data->name(SOAP::Utils::qualify($self->envprefix => 'Header') => \$header) : ()), - ($body ? SOAP::Data->name(SOAP::Utils::qualify($self->envprefix => 'Body') => \$body) - ->attr( { - 'wsu:Id' => 'myBody' - } ) : - SOAP::Data->name(SOAP::Utils::qualify($self->envprefix => 'Body')) - ->attr( { - 'wsu:Id' => 'myBody' - } ) - ), - ))->attr($self->attr) - ); - $self->signature($parameters->signature) if ref $parameters; - - # IMHO multirefs should be encoded after Body, but only some - # toolkits understand this encoding, so we'll keep them for now (04/15/2001) - # as the last element inside the Body - # v -------------- subelements of Envelope - # vv -------- last of them (Body) - # v --- subelements - push(@{$encoded->[2]->[-1]->[2]}, $self->encode_multirefs) if ref $encoded->[2]->[-1]->[2]; - - # Sometimes SOAP::Serializer is invoked statically when there is no context. - # So first check to see if a context exists. - # TODO - a context needs to be initialized by a constructor? - if ($self->context && $self->context->packager->parts) { - # TODO - this needs to be called! Calling it though wraps the payload twice! - # return $self->context->packager->package($self->xmlize($encoded)); - } - return $self->xmlize($encoded); + } + # This is breaking a unit test right now... + $body->set_value(SOAP::Utils::encode_data($parameters ? \$parameters : ())) + if $body; + } elsif ($type eq 'fault') { + SOAP::Trace::fault(@parameters); + $body = SOAP::Data + ->name(SOAP::Utils::qualify($self->envprefix => 'Fault')) + # parameters[1] needs to be escaped - thanks to aka_hct at gmx dot de + # commented on 2001/03/28 because of failing in ApacheSOAP + # need to find out more about it + # -> attr({'xmlns' => ''}) + ->value(\SOAP::Data->set_value( + SOAP::Data->name(faultcode => SOAP::Utils::qualify($self->envprefix => $parameters[0]))->type(""), + SOAP::Data->name(faultstring => SOAP::Utils::encode_data($parameters[1]))->type(""), + defined($parameters[2]) ? SOAP::Data->name(detail => do{my $detail = $parameters[2]; ref $detail ? \$detail : $detail}) : (), + defined($parameters[3]) ? SOAP::Data->name(faultactor => $parameters[3])->type("") : (), + )); + } elsif ($type eq 'freeform') { + SOAP::Trace::freeform(@parameters); + $body = SOAP::Data->set_value(@parameters); + } elsif (!defined($type)) { + # This occurs when the Body is intended to be null. When no method has been + # passed in of any kind. + } else { + die "Wrong type of envelope ($type) for SOAP call\n"; + } + + $self->seen({}); # reinitialize multiref table + # Build the envelope + # Right now it is possible for $body to be a SOAP::Data element that has not + # XML escaped any values. How do you remedy this? + my($encoded) = $self->encode_object( + SOAP::Data->name( + SOAP::Utils::qualify($self->envprefix => 'Envelope') => \SOAP::Data->value( + ($header ? SOAP::Data->name(SOAP::Utils::qualify($self->envprefix => 'Header') => \$header) : ()), + ($body ? SOAP::Data + ->name(SOAP::Utils::qualify($self->envprefix => 'Body') => \$body) + ->attr( { + 'wsu:Id' => 'myBody' + } ) + : + SOAP::Data + ->name(SOAP::Utils::qualify($self->envprefix => 'Body')) + ->attr( { + 'wsu:Id' => 'myBody' + } ) + ), + ) + )->attr($self->attr) + ); + $self->signature($parameters->signature) if ref $parameters; + + # IMHO multirefs should be encoded after Body, but only some + # toolkits understand this encoding, so we'll keep them for now (04/15/2001) + # as the last element inside the Body + # v -------------- subelements of Envelope + # vv -------- last of them (Body) + # v --- subelements + push(@{$encoded->[2]->[-1]->[2]}, $self->encode_multirefs) if ref $encoded->[2]->[-1]->[2]; + + # Sometimes SOAP::Serializer is invoked statically when there is no context. + # So first check to see if a context exists. + # TODO - a context needs to be initialized by a constructor? + if ($self->context && $self->context->packager->parts) { + # TODO - this needs to be called! Calling it though wraps the payload twice! + # return $self->context->packager->package($self->xmlize($encoded)); + } + return $self->xmlize($encoded); } @@ -198,8 +205,8 @@ # package WSRF::FileBasedMobyResourceProperties; use strict; -use vars qw(@ISA); - at ISA = qw(WSRF::WSRP); +use XML::LibXML; +use base qw(WSRF::WSRP); # Load the ResourceProperties from the file into the ResourceProperties hash # then call the super operation. @@ -207,15 +214,51 @@ my $self = shift @_; my $envelope = pop @_; - $ENV{ID} = $envelope->valueof("/{$SOAP::Constants::NS_ENV}Envelope/{$SOAP::Constants::NS_ENV}Header/{$WSRF::Constants::MOBY}ServiceInvocationId"); my $lock = WSRF::MobyFile->new($envelope); $lock->toFile(); + + my($isValidQName)=1; + my($search)=undef; + my($localsearch)=undef; + eval { + my($parser)=XML::LibXML->new(); + my($context)=XML::LibXML::XPathContext->new(); + $context->registerNs('wsrf-rp',$WSRF::Constants::WSRP); + my($envxml)=$parser->parse_string($envelope->raw_xml()); + foreach my $searchnode ($context->findnodes('//wsrf-rp:GetResourceProperty',$envxml)) { + $search=$searchnode->textContent(); + + $localsearch=$search; + my($prefix)=''; + my($icolon)=index($search,':'); + if($icolon!=-1) { + $prefix=substr($search,0,$icolon); + $localsearch=substr($search,$icolon+1); + } + my($nsnode)=$searchnode->lookupNamespaceURI($prefix); + unless(defined($nsnode) && $nsnode eq $WSRF::Constants::MOBY) { + $isValidQName=undef; + } + + last; + } + }; + + if($@) { + $search = $envelope->valueof("//{$WSRF::Constants::WSRP}GetResourceProperty/"); + $localsearch=$search; + my($prefix)=''; + my($icolon)=index($search,':'); + if($icolon!=-1) { + $prefix=substr($search,0,$icolon); + $localsearch=substr($search,$icolon+1); + } + } - my $search = $envelope->valueof("//{$WSRF::Constants::WSRP}GetResourceProperty/"); WSRF::BaseFaults::die_with_fault( $envelope, ( BaseFault => "InvalidResourcePropertyQNameFault", Description => "Property $search does not exist" - ) ) unless (defined($WSRF::WSRP::ResourceProperties{$search})); + ) ) unless(defined($isValidQName) && exists($WSRF::WSRP::ResourceProperties{$localsearch}) && defined($WSRF::WSRP::ResourceProperties{$localsearch})); my @resp = $self->SUPER::GetResourceProperty($envelope); return @resp; @@ -226,14 +269,49 @@ sub GetMultipleResourceProperties { my $self = shift @_; my $envelope = pop @_; - - $ENV{ID} = $envelope->valueof("/{$SOAP::Constants::NS_ENV}Envelope/{$SOAP::Constants::NS_ENV}Header/{$WSRF::Constants::MOBY}ServiceInvocationId"); + my $lock = WSRF::MobyFile->new($envelope); $lock->toFile(); my @notfound; - foreach my $search ($envelope->valueof("//{$WSRF::Constants::WSRP}ResourceProperty/")) { - push(@notfound, $search) unless (defined($WSRF::WSRP::ResourceProperties{$search})); + eval { + my($parser)=XML::LibXML->new(); + my($context)=XML::LibXML::XPathContext->new(); + $context->registerNs('wsrf-rp',$WSRF::Constants::WSRP); + my($envxml)=$parser->parse_string($envelope->raw_xml()); + foreach my $searchnode ($context->findnodes('//wsrf-rp:ResourceProperty',$envxml)) { + my($search)=$searchnode->textContent(); + + my($localsearch)=$search; + my($prefix)=''; + my($icolon)=index($search,':'); + if($icolon!=-1) { + $prefix=substr($search,0,$icolon); + $localsearch=substr($search,$icolon+1); + } + my($isValidQName)=undef; + my($nsnode)=$searchnode->lookupNamespaceURI($prefix); + if(defined($nsnode) && $nsnode eq $WSRF::Constants::MOBY) { + $isValidQName=1; + } + + push(@notfound, $search) unless(defined($isValidQName) && exists($WSRF::WSRP::ResourceProperties{$localsearch}) && defined($WSRF::WSRP::ResourceProperties{$localsearch})); + + } + }; + + if($@) { + foreach my $search ($envelope->valueof("//{$WSRF::Constants::WSRP}ResourceProperty/")) { + my($localsearch)=$search; + my($prefix)=''; + my($icolon)=index($search,':'); + if($icolon!=-1) { + $prefix=substr($search,0,$icolon); + $localsearch=substr($search,$icolon+1); + } + + push(@notfound, $search) unless(exists($WSRF::WSRP::ResourceProperties{$localsearch}) && defined($WSRF::WSRP::ResourceProperties{$localsearch})); + } } WSRF::BaseFaults::die_with_fault( $envelope, ( BaseFault => "InvalidResourcePropertyQNameFault", @@ -244,6 +322,57 @@ return @resp; } +#sub GetMultipleResourcePropertiesRequest { +# my $self = shift @_; +# my $envelope = pop @_; +# my $methodname = (caller(0))[3]; +# $methodname = substr($methodname,rindex($methodname,':')+1); +# eval { +# my $parser=XML::LibXML->new(); +# my $envxml = $parser->parse_string($envelope->raw_xml); +# my $context=XML::LibXML::XPathContext->new(); +# $context->registerNs('s11',$SOAP::Constants::NS_ENV); +# $context->registerNs('wsa',$WSRF::Constants::WSA); +# my(@actions)=$context->findnodes('/s11:Envelope/s11:Header/wsa:Action[1]',$envxml); +# if(scalar(@actions)>0) { +# my($action)=$actions[0]; +# my $acturi = $action->textContent(); +# my $newacturi= $acturi; +# $newacturi =~ s/Request$//; +# if( $acturi ne $newacturi) { +# foreach my $child ($action->childNodes) { +# $action->removeChild($child); +# } +# $action->appendChild($envxml->createTextNode($newacturi)); +# +# +# my(@query)=$context->findnodes("/s11:Envelope/s11:Body/wsa:$methodname".'[1]',$envxml); +# if(scalar(@query)>0) { +# my($prefix)=$query[0]->prefix(); +# if(defined($prefix) && $prefix ne '') { +# $prefix.=':'; +# } else { +# $prefix=''; +# } +# $methodname =~ s/Request$//; +# $query[0]->setNodeName($prefix.$methodname); +# } +# +# # Last, craete new SOM object +# my $sparser = WSRF::Deserializer->new(); +# my($manistring)=$envxml->toString(); +# $manistring =~ s/[\r\n]+//g; +# print STDERR "ENVELOPE ",$manistring,"\n"; +# $envelope = $sparser->deserialize($manistring); +# } +# } +# }; +# +# if($@) { +# print STDERR "FALLACANALLA $@\n"; +# } +# return $self->GetMultipleResourceProperties(@_,$envelope); +#} #=============================================================================== # WSRF::FileBasedMobyResourceLifetimes @@ -257,8 +386,7 @@ # package WSRF::FileBasedMobyResourceLifetimes; use strict; -use vars qw(@ISA); - at ISA = qw(WSRF::FileBasedMobyResourceProperties); +use base qw(WSRF::FileBasedMobyResourceProperties); # Add resource property TerminationTime - initalise to nothing (infinity). $WSRF::WSRP::ResourceProperties{'TerminationTime'} = ''; @@ -280,7 +408,6 @@ sub Destroy { my $self = shift @_; my $envelope = pop @_; - $ENV{ID} = $envelope->valueof("/{$SOAP::Constants::NS_ENV}Envelope/{$SOAP::Constants::NS_ENV}Header/{$WSRF::Constants::MOBY}ServiceInvocationId"); my $lock = WSRF::MobyFile->new($envelope); my $file = $WSRF::Constants::Data.$lock->ID(); unlink $file or WSRF::BaseFaults::die_with_fault( $envelope, ( @@ -382,6 +509,11 @@ package WSRF::Header; use strict; +my(%URI2ACTION)=( + $WSRF::Constants::WSRP => [$WSRF::Constants::WSRPW,undef], + $WSRF::Constants::WSRL => [$WSRF::Constants::WSRLW,'ImmediateResourceTermination'] +); + sub header { my ($envelope, %args) = @_; my $myHeader; @@ -417,6 +549,10 @@ my $data = $envelope->match("/{$SOAP::Constants::NS_ENV}Envelope/{$SOAP::Constants::NS_ENV}Body/[1]")->dataof; my $method = $data->name; my $uri = $data->uri; + if(exists($URI2ACTION{$uri})) { + $uri = $URI2ACTION{$uri}[0].'/'.(defined($URI2ACTION{$uri}[1])?$URI2ACTION{$uri}[1]:$method); + } + print STDERR "GURI $uri\n"; $myHeader .= "".$uri."/".$method."Response"; } @@ -449,16 +585,21 @@ # package WSRF::MobyFile; use strict; -use vars qw(@ISA); - at ISA = qw(WSRF::File); + +use base qw(WSRF::File); sub new { - my( $class, $envelope) = @_; + my( $class, $envelope, $ID) = @_; + + unless(defined($ID)) { + $ID = $envelope->valueof("/{$SOAP::Constants::NS_ENV}Envelope/{$SOAP::Constants::NS_ENV}Header/{$WSRF::Constants::MOBY}ServiceInvocationId"); + $ENV{ID} = $ID; + } + # Check the ID is safe - we do not accept dots, # All paths will be relative to $ENV{WRF_MODULES} # Only allow alphanumeric, underscore and hyphen - my $ID = $ENV{ID}; if( $ID =~ /^([-\w]+)$/ ) { $ID = $1; } else { @@ -509,7 +650,6 @@ ($WSRF::WSRP::ResourceProperties{'TerminationTime'} ne "") ) { if ( WSRF::Time::ConvertStringToEpochTime($WSRF::WSRP::ResourceProperties{'TerminationTime'}) < time ) { - print STDERR "$$ Resource $ID expired\n"; unlink $path or die SOAP::Fault->faultcode("Container Failure") ->faultstring("Container Failure: Could not remove file"); rmdir $lock or die SOAP::Fault->faultcode("Container Failure") From kawas at dev.open-bio.org Tue Apr 29 18:59:43 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 14:59:43 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291859.m3TIxhWe009526@dev.open-bio.org> kawas Tue Apr 29 14:59:42 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache In directory dev.open-bio.org:/tmp/cvs-serv9491/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Modified Files: Central.pm Log Message: intial crack at adding a version number that changes with the cvs revision moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Central.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2008/04/29 18:59:42 1.4 @@ -21,7 +21,7 @@ use XML::LibXML; use File::Spec; use strict; -use vars qw ($DEFAULT_REGISTRY_URL); +use vars qw ($DEFAULT_REGISTRY_URL $VERSION); # names of cache directories/files use constant LIST_FILE => '__L__I__S__T__'; @@ -30,6 +30,9 @@ use constant NAMESPACES_CACHE => 'namespaces'; use constant SERVICETYPES_CACHE => 'serviceTypes'; +# the version of this file: +$VERSION = sprintf "%d.%03d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Cache::Central - access to locally cached Moby entities From kawas at dev.open-bio.org Tue Apr 29 19:02:37 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:02:37 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291902.m3TJ2bdn009568@dev.open-bio.org> kawas Tue Apr 29 15:02:37 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache In directory dev.open-bio.org:/tmp/cvs-serv9533/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Modified Files: Central.pm Log Message: making the $VERSION have 2 decimal spots instead of 3. moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Central.pm,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2008/04/29 18:59:42 1.4 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Central.pm 2008/04/29 19:02:37 1.5 @@ -31,7 +31,7 @@ use constant SERVICETYPES_CACHE => 'serviceTypes'; # the version of this file: -$VERSION = sprintf "%d.%03d", q$Revision$ =~ /: (\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; =head1 NAME From kawas at dev.open-bio.org Tue Apr 29 19:29:54 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:29:54 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291929.m3TJTsZo009687@dev.open-bio.org> kawas Tue Apr 29 15:29:54 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache In directory dev.open-bio.org:/tmp/cvs-serv9652/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Modified Files: Registries.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache Registries.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Registries.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Registries.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Cache/Registries.pm 2008/04/29 19:29:54 1.4 @@ -11,6 +11,10 @@ use base qw ( MOSES::MOBY::Base); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # A hard-coded list of the known registries. # From kawas at dev.open-bio.org Tue Apr 29 19:35:57 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:35:57 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291935.m3TJZvSH009814@dev.open-bio.org> kawas Tue Apr 29 15:35:57 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data In directory dev.open-bio.org:/tmp/cvs-serv9751/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data Modified Files: String.pm DateTime.pm Boolean.pm Integer.pm Xref.pm ProvisionInformation.pm Object.pm Float.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data String.pm,1.3,1.4 DateTime.pm,1.3,1.4 Boolean.pm,1.3,1.4 Integer.pm,1.3,1.4 Xref.pm,1.3,1.4 ProvisionInformation.pm,1.3,1.4 Object.pm,1.3,1.4 Float.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/String.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/String.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/String.pm 2008/04/29 19:35:57 1.4 @@ -11,6 +11,10 @@ use base ("MOSES::MOBY::Data::Object"); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::String - A primite Moby data type for strings =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/DateTime.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/DateTime.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/DateTime.pm 2008/04/29 19:35:57 1.4 @@ -11,6 +11,10 @@ use base ("MOSES::MOBY::Data::Object"); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::DateTime - A primite Moby data type for dates/times =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Boolean.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Boolean.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Boolean.pm 2008/04/29 19:35:57 1.4 @@ -11,6 +11,10 @@ use base ("MOSES::MOBY::Data::Object"); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::Boolean - A primite Moby data type for booleans =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Integer.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Integer.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Integer.pm 2008/04/29 19:35:57 1.4 @@ -11,6 +11,10 @@ use base ("MOSES::MOBY::Data::Object"); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::Integer - A primite Moby data type for integers =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Xref.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Xref.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Xref.pm 2008/04/29 19:35:57 1.4 @@ -12,6 +12,10 @@ use MOSES::MOBY::Tags; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::Xref - a Moby cross-reference =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/ProvisionInformation.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/ProvisionInformation.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/ProvisionInformation.pm 2008/04/29 19:35:57 1.4 @@ -12,6 +12,10 @@ use MOSES::MOBY::Tags; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::ProvisionInformation - a provision information block (PIB) =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Object.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Object.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Object.pm 2008/04/29 19:35:57 1.4 @@ -12,6 +12,10 @@ use MOSES::MOBY::Tags; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # load all modules needed for my attributes #----------------------------------------------------------------- =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Float.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Float.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Data/Float.pm 2008/04/29 19:35:57 1.4 @@ -11,6 +11,10 @@ use base ("MOSES::MOBY::Data::Object"); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Data::Float - A primite Moby data type for float numbers From kawas at dev.open-bio.org Tue Apr 29 19:41:10 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:41:10 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291941.m3TJfAIP009894@dev.open-bio.org> kawas Tue Apr 29 15:41:09 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def In directory dev.open-bio.org:/tmp/cvs-serv9859/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Modified Files: Data.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Data.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Data.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Data.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Data.pm 2008/04/29 19:41:09 1.4 @@ -17,6 +17,10 @@ use XML::LibXML; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Def::Data - a BioMoby definition of a service input/output From kawas at dev.open-bio.org Tue Apr 29 19:41:17 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:41:17 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291941.m3TJfHnW009934@dev.open-bio.org> kawas Tue Apr 29 15:41:17 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def In directory dev.open-bio.org:/tmp/cvs-serv9899/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Modified Files: DataType.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def DataType.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/DataType.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/DataType.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/DataType.pm 2008/04/29 19:41:17 1.4 @@ -13,6 +13,10 @@ use XML::LibXML; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Def::DataType - a definition of BioMoby data type From kawas at dev.open-bio.org Tue Apr 29 19:41:25 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:41:25 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291941.m3TJfPnR009974@dev.open-bio.org> kawas Tue Apr 29 15:41:25 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def In directory dev.open-bio.org:/tmp/cvs-serv9939/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Modified Files: Namespace.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Namespace.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Namespace.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Namespace.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Namespace.pm 2008/04/29 19:41:25 1.4 @@ -11,6 +11,10 @@ use XML::LibXML; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Def::Namespace - a definition of a BioMoby Namespace From kawas at dev.open-bio.org Tue Apr 29 19:41:31 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:41:31 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291941.m3TJfVWR010014@dev.open-bio.org> kawas Tue Apr 29 15:41:31 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def In directory dev.open-bio.org:/tmp/cvs-serv9979/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Modified Files: Relationship.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Relationship.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Relationship.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Relationship.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Relationship.pm 2008/04/29 19:41:31 1.4 @@ -12,6 +12,10 @@ use strict; use vars qw( @EXPORT %ALLOWED_TYPES ); +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + # relationship types use constant ISA => 'ISA'; use constant HASA => 'HASA'; From kawas at dev.open-bio.org Tue Apr 29 19:41:38 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:41:38 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291941.m3TJfcVO010054@dev.open-bio.org> kawas Tue Apr 29 15:41:38 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def In directory dev.open-bio.org:/tmp/cvs-serv10019/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Modified Files: Service.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Service.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Service.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Service.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/Service.pm 2008/04/29 19:41:38 1.4 @@ -11,6 +11,10 @@ use XML::LibXML; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Def::Service - a BioMoby service definition From kawas at dev.open-bio.org Tue Apr 29 19:41:46 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:41:46 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291941.m3TJfk62010094@dev.open-bio.org> kawas Tue Apr 29 15:41:46 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def In directory dev.open-bio.org:/tmp/cvs-serv10059/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def Modified Files: ServiceType.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def ServiceType.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/ServiceType.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/ServiceType.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Def/ServiceType.pm 2008/04/29 19:41:46 1.4 @@ -11,6 +11,10 @@ use XML::LibXML; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Def::ServiceType - a BioMoby service type definition From kawas at dev.open-bio.org Tue Apr 29 19:42:56 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:42:56 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291942.m3TJguLG010134@dev.open-bio.org> kawas Tue Apr 29 15:42:56 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators In directory dev.open-bio.org:/tmp/cvs-serv10099/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators Modified Files: GenTypes.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators GenTypes.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenTypes.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenTypes.pm 2008/02/21 00:12:56 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenTypes.pm 2008/04/29 19:42:56 1.4 @@ -20,6 +20,10 @@ use vars qw( %PRIMITIVE_TYPES ); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # A list of allowed attribute names. See MOSES::MOBY::Base for details. #----------------------------------------------------------------- From kawas at dev.open-bio.org Tue Apr 29 19:43:18 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:43:18 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291943.m3TJhIYU010174@dev.open-bio.org> kawas Tue Apr 29 15:43:18 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY In directory dev.open-bio.org:/tmp/cvs-serv10139/Perl/MOSES-MOBY/lib/MOSES/MOBY Modified Files: Base.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY Base.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Base.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Base.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Base.pm 2008/04/29 19:43:18 1.4 @@ -31,7 +31,7 @@ @ISA = qw( Exporter ); @EXPORT = qw( $LOG ); - $VERSION = 0.8; + $VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; $Revision = '$Id$'; # initiate error handling From kawas at dev.open-bio.org Tue Apr 29 19:43:44 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:43:44 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291943.m3TJhi3v010214@dev.open-bio.org> kawas Tue Apr 29 15:43:44 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Service In directory dev.open-bio.org:/tmp/cvs-serv10179/Perl/MOSES-MOBY/lib/MOSES/MOBY/Service Modified Files: ServiceBase.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Service ServiceBase.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Service/ServiceBase.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Service/ServiceBase.pm 2008/02/21 00:12:56 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Service/ServiceBase.pm 2008/04/29 19:43:44 1.4 @@ -16,6 +16,10 @@ use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # prepare_output #----------------------------------------------------------------- From kawas at dev.open-bio.org Tue Apr 29 19:45:01 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:45:01 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291945.m3TJj1aD010270@dev.open-bio.org> kawas Tue Apr 29 15:45:01 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY In directory dev.open-bio.org:/tmp/cvs-serv10219/Perl/MOSES-MOBY/lib/MOSES/MOBY Modified Files: Parser.pm Package.pm Tags.pm Config.pm ServiceException.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY Parser.pm,1.3,1.4 Package.pm,1.3,1.4 Tags.pm,1.3,1.4 Config.pm,1.3,1.4 ServiceException.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Parser.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Parser.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Parser.pm 2008/04/29 19:45:01 1.4 @@ -23,6 +23,10 @@ use MOSES::MOBY::Generators::GenTypes; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # A list of allowed attribute names. See MOSES::MOBY::Base for details. #----------------------------------------------------------------- =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Package.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Package.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Package.pm 2008/04/29 19:45:01 1.4 @@ -19,6 +19,10 @@ use MOSES::MOBY::ServiceException; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # A list of allowed attribute names. See MOSES::MOBY::Base for details. #----------------------------------------------------------------- =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Tags.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Tags.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Tags.pm 2008/04/29 19:45:01 1.4 @@ -1,6 +1,11 @@ package MOSES::MOBY::Tags; use strict; use vars qw( @ISA @EXPORT ); + +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + BEGIN { @ISA = qw( Exporter ); @EXPORT = qw( =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Config.pm 2008/04/29 19:45:01 1.4 @@ -13,6 +13,10 @@ use vars qw( $DEFAULT_CONFIG_FILE $ENV_CONFIG_DIR ); use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + my %Config = (); # here are all configuration parameters my %Unsuccess = (); # here are names (and reasons) of failed files my %Success = (); # here are names of successfully read files =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/ServiceException.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/ServiceException.pm 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/ServiceException.pm 2008/04/29 19:45:01 1.4 @@ -13,6 +13,10 @@ use strict; use vars qw( @EXPORT ); +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + my %severityNames = (); my %codeNames = (); From kawas at dev.open-bio.org Tue Apr 29 19:45:10 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:45:10 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291945.m3TJjAu0010310@dev.open-bio.org> kawas Tue Apr 29 15:45:10 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators In directory dev.open-bio.org:/tmp/cvs-serv10275/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators Modified Files: Utils.pm Log Message: adding VERSION to the module moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators Utils.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm 2008/02/21 00:12:56 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/Utils.pm 2008/04/29 19:45:10 1.4 @@ -11,6 +11,10 @@ use File::Spec; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + =head1 NAME MOSES::MOBY::Utils - what does not fit elsewhere From kawas at dev.open-bio.org Tue Apr 29 19:58:38 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:58:38 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291958.m3TJwckw010425@dev.open-bio.org> kawas Tue Apr 29 15:58:37 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts In directory dev.open-bio.org:/tmp/cvs-serv10354/Perl/MOSES-MOBY/bin/scripts Modified Files: moses-testing-service.pl moses-generate-services.pl Log Message: added support for biomoby services of category cgi moby-live/Perl/MOSES-MOBY/bin/scripts moses-testing-service.pl,1.3,1.4 moses-generate-services.pl,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-testing-service.pl 2008/04/29 19:58:37 1.4 @@ -9,15 +9,17 @@ BEGIN { # some command-line options use Getopt::Std; - use vars qw/ $opt_h $opt_d $opt_v $opt_l $opt_e /; - getopts ('hdvl:e:'); + use vars qw/ $opt_h $opt_d $opt_v $opt_l $opt_e $opt_c /; + getopts ('hdvl:e:c:'); # usage - if ($opt_h or @ARGV == 0) { + if ($opt_h or (@ARGV == 0 and (not $opt_c))) { print STDOUT <<'END_OF_USAGE'; Calling a BioMoby services (without using SOAP, just locally). Usage: # calling a local module representing a service, without using SOAP [-vd] [-l ] [] + or + [-vd] -c [] It also needs a location of a local cache (and potentially a BioMoby registry endpoint). It takes it from the @@ -26,6 +28,9 @@ # calling a real service, using SOAP -e [] + # calling a real service, using cgi + -c [] + is a full name of a called module (service) e.g. Service::Mabuhay @@ -37,6 +42,10 @@ A service endpoint (e.g. http://localhost/cgi-bin/MobyServer.cgi) + -c + A cgi biomoby service url + (e.g. http://localhost/cgi-bin/HelloBiomobyWorld.cgi) + A BioMoby XML file with input data. Default: an empty BioMoby request @@ -55,7 +64,13 @@ eval "use SOAP::Lite; 1;" or die "$@\n"; - } else { + } elsif ($opt_c) { + # calling a real service, using cgi + eval "use HTTP::Request::Common qw(POST); 1;" + or die "$@\n"; + eval "use LWP::UserAgent; 1;" + or die "$@\n"; + }else { # calling a local service module, without SOAP eval "use MOSES::MOBY::Base; 1;"; # take the lib location from the config file @@ -83,7 +98,7 @@ # --- what service to call my $module = shift; # eg. Service::Mabuhay, or just Mabuhay my $service; -($service = $module) =~ s/.*:://; +($service = $module) =~ s/.*::// unless $opt_c; # --- call the service if ($opt_e) { @@ -115,6 +130,24 @@ -> $service (SOAP::Data->type('string' => "$input")) -> result; +} elsif ($opt_c) { + # calling a real service, using cgi + my $ua = LWP::UserAgent->new; + + my $input = ''; + if (@ARGV > 0) { + my $data = shift; # a file name + open INPUT, "<$data" + or die "Cannot read '$data': $!\n"; + while () { $input .= $_; } + close INPUT; + } else { + $input = _empty_input; + } + + my $req = POST $opt_c, [ data => $input]; + print "\n" . $ua->request($req)->as_string . "\n"; + } else { # calling a local service module, without SOAP my $data; =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-generate-services.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-generate-services.pl 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-generate-services.pl 2008/04/29 19:58:37 1.4 @@ -8,7 +8,7 @@ # some command-line options use Getopt::Std; -use vars qw/ $opt_h $opt_d $opt_v $opt_a $opt_s $opt_b $opt_f $opt_u $opt_F $opt_S $opt_t/; +use vars qw/ $opt_h $opt_d $opt_v $opt_a $opt_s $opt_b $opt_f $opt_u $opt_F $opt_S $opt_t $opt_c /; getopt; # usage if (not($opt_u or $opt_f)) { @@ -31,11 +31,13 @@ -S ... generate implementation and the base of service[s], the implementation module has enabled option to read the base statically (that is why it is also generated here) + -i ... generate an implementation of the given service + -c ... generate a cgi based implementation of the given service -t ... update dispatch table of services (a table used by the cgi-bin script and SOAP::Lite to dispatch requests); this table is also updated automatically when options -i or -S are given - If none of -b, -S, -t is given, it generates/show implementation + If none of -b, -S, -t, -c is given, it generates/show implementation (not a base) of service[s]. -s ... show generated code on STDOUT @@ -99,6 +101,9 @@ $generator->generate_impl (static_impl => 1); $generator->generate_base; $generator->update_table; + } elsif ($opt_c) { + $generator->generate_impl; + $generator->generate_cgi; } elsif ($opt_t) { $generator->update_table; } else { @@ -114,7 +119,14 @@ $generator->generate_base (service_names => [@ARGV], authority => $authority, outcode => \$code); - } else { + } elsif ($opt_c) { + $generator->generate_impl(service_names => [@ARGV], + authority => $authority, + outcode => \$code); + $generator->generate_cgi(service_names => [@ARGV], + authority => $authority, + outcode => \$code); + } else { $generator->generate_impl (service_names => [@ARGV], authority => $authority, outcode => \$code); @@ -133,7 +145,14 @@ authority => $authority); $generator->update_table (service_names => [@ARGV], authority => $authority); - } elsif ($opt_t) { + } elsif ($opt_c) { + $generator->generate_impl( + service_names => [@ARGV], + authority => $authority, + force_over => $opt_F); + $generator->generate_cgi(service_names => [@ARGV], + authority => $authority); + } elsif ($opt_t) { $generator->update_table (service_names => [@ARGV], authority => $authority); } else { From kawas at dev.open-bio.org Tue Apr 29 19:58:37 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:58:37 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291958.m3TJwbCa010389@dev.open-bio.org> kawas Tue Apr 29 15:58:37 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators In directory dev.open-bio.org:/tmp/cvs-serv10354/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators Modified Files: GenServices.pm Log Message: added support for biomoby services of category cgi moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators GenServices.pm,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenServices.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenServices.pm 2008/03/31 18:04:47 1.4 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/GenServices.pm 2008/04/29 19:58:37 1.5 @@ -21,6 +21,10 @@ use MOSES::MOBY::Def::Relationship; use strict; +# add versioning to this module +use vars qw /$VERSION/; +$VERSION = sprintf "%d.%02d", q$Revision$ =~ /: (\d+)\.(\d+)/; + #----------------------------------------------------------------- # A list of allowed attribute names. See MOSES::MOBY::Base for details. #----------------------------------------------------------------- @@ -268,6 +272,83 @@ } #----------------------------------------------------------------- +# generate_cgi +#----------------------------------------------------------------- +sub generate_cgi { + my ($self, @args) = @_; + my %args = + ( # some default values + outdir => $self->outdir . "/../cgi", + cachedir => $self->cachedir, + registry => $self->registry, + service_names => [], + + # other args, with no default values + # authority => 'authority' + # outcode => ref SCALAR + + # and the real parameters + @args ); + $self->_check_outcode (%args); + + my $outdir = File::Spec->rel2abs ($args{outdir}); + $LOG->debug ("Arguments for generating cgi services: " . $self->toString (\%args)) + if ($LOG->is_debug); + $LOG->info ("CGI Services will be generated into: '$outdir'") + unless $args{outcode}; + + # get objects from a local cache + my $cache = MOSES::MOBY::Cache::Central->new (cachedir => $args{cachedir}, registry => $args{registry}); + my @names = (); + push (@names, $args{authority}, @{ $args{service_names} }) + if $args{authority}; + my @services = $cache->get_services (@names); + + # generate from template + my $tt = Template->new ( ABSOLUTE => 1 ); + my $input = File::Spec->rel2abs ( MOSES::MOBY::Generators::Utils->find_file + ($Bin, + 'MOSES', 'MOBY', 'Generators', 'templates', + 'service-cgi.tt') ); + + foreach my $obj (@services) { + my $name = $obj->name; + $LOG->debug ("$name\n"); + if ($args{outcode}) { + # check if the same service is already loaded + # (it can happen when this subroutine is called several times) + next if eval '%' . $obj->module_name . '::'; + $tt->process ( + $input, + { + obj => $obj, + pmoses_home => $MOBYCFG::USER_REGISTRIES_USER_REGISTRIES_DIR, + generated_dir => $MOBYCFG::GENERATORS_OUTDIR, + services_dir => $MOBYCFG::GENERATORS_IMPL_OUTDIR, + }, + $args{outcode} ) + || $LOG->logdie ($tt->error()); + } else { + # we cannot easily check whether the same file was already + # generated - so we don't + my $outfile = + File::Spec->catfile ( $outdir, split (/\./, $obj->authority), $obj->name ) + . '.cgi'; + $tt->process ( $input, + { + obj => $obj, + pmoses_home => $MOBYCFG::USER_REGISTRIES_USER_REGISTRIES_DIR, + generated_dir => $MOBYCFG::GENERATORS_OUTDIR, + services_dir => $MOBYCFG::GENERATORS_IMPL_OUTDIR, + }, + $outfile ) || $LOG->logdie ($tt->error()); + chmod 0755, $outfile; + } + } +} + + +#----------------------------------------------------------------- # update_table #----------------------------------------------------------------- sub update_table { From kawas at dev.open-bio.org Tue Apr 29 19:58:37 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:58:37 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291958.m3TJwb8E010403@dev.open-bio.org> kawas Tue Apr 29 15:58:37 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates In directory dev.open-bio.org:/tmp/cvs-serv10354/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates Added Files: service-cgi.tt Log Message: added support for biomoby services of category cgi moby-live/Perl/MOSES-MOBY/lib/MOSES/MOBY/Generators/templates service-cgi.tt,NONE,1.1 From kawas at dev.open-bio.org Tue Apr 29 19:59:43 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 15:59:43 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804291959.m3TJxhGc010509@dev.open-bio.org> kawas Tue Apr 29 15:59:43 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts In directory dev.open-bio.org:/tmp/cvs-serv10474/Perl/MOSES-MOBY/bin/scripts Modified Files: moses-install.pl Log Message: added support for biomoby services of category cgi moby-live/Perl/MOSES-MOBY/bin/scripts moses-install.pl,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-install.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-install.pl 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/bin/scripts/moses-install.pl 2008/04/29 19:59:43 1.4 @@ -182,6 +182,18 @@ # create install directory if necessary eval { + my ($v, $d, $f) = File::Spec->splitpath( $pmoses_home . "/cgi" ); + my $dir = File::Spec->catdir($v); + foreach my $part ( File::Spec->splitdir( ($d.$f ) ) ) { + $dir = File::Spec->catdir($dir, $part); + next if -d $dir or -e $dir; + mkdir( $dir ) || die("Error creating installation directory directory '".$dir."':\n$!"); + } +}; +say $@ ? $@ : "Created install directory '$pmoses_home/cgi'."; + +# create install directory if necessary +eval { my ($v, $d, $f) = File::Spec->splitpath( $samples_home ); my $dir = File::Spec->catdir($v); foreach my $part ( File::Spec->splitdir( ($d.$f ) ) ) { From kawas at dev.open-bio.org Tue Apr 29 20:07:50 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 16:07:50 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804292007.m3TK7oJJ010594@dev.open-bio.org> kawas Tue Apr 29 16:07:50 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY In directory dev.open-bio.org:/tmp/cvs-serv10559/Perl/MOSES-MOBY Modified Files: MANIFEST Log Message: updated the manifest to include files needed for cgi services moby-live/Perl/MOSES-MOBY MANIFEST,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/MANIFEST,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/MANIFEST 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/MANIFEST 2008/04/29 20:07:50 1.4 @@ -49,6 +49,7 @@ lib/MOSES/MOBY/Generators/GenTypes.pm lib/MOSES/MOBY/Generators/templates/datatype.tt lib/MOSES/MOBY/Generators/templates/service-base.tt +lib/MOSES/MOBY/Generators/templates/service-cgi.tt lib/MOSES/MOBY/Generators/templates/service.tt lib/MOSES/MOBY/Generators/Utils.pm lib/MOSES/MOBY/Package.pm From kawas at dev.open-bio.org Tue Apr 29 20:09:36 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 16:09:36 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804292009.m3TK9a7s010652@dev.open-bio.org> kawas Tue Apr 29 16:09:35 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY In directory dev.open-bio.org:/tmp/cvs-serv10617/Perl/MOSES-MOBY Modified Files: README Log Message: moby-live/Perl/MOSES-MOBY README,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/README,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/README 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/README 2008/04/29 20:09:35 1.4 @@ -1,4 +1,4 @@ -MOSES-MOBY version .82 +MOSES-MOBY version .84 ====================== OVERVIEW @@ -49,6 +49,7 @@ Unicode::String File::HomeDir File::ShareDir +IO::Prompt - unless you are using Windows COPYRIGHT AND LICENCE @@ -57,5 +58,3 @@ This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This software is provided "as is" without warranty of any kind. - - From kawas at dev.open-bio.org Tue Apr 29 20:10:07 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Tue, 29 Apr 2008 16:10:07 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804292010.m3TKA7AE010692@dev.open-bio.org> kawas Tue Apr 29 16:10:06 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOSES-MOBY In directory dev.open-bio.org:/tmp/cvs-serv10657/Perl/MOSES-MOBY Modified Files: META.yml Log Message: moby-live/Perl/MOSES-MOBY META.yml,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOSES-MOBY/META.yml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOSES-MOBY/META.yml 2008/02/21 00:12:55 1.3 +++ /home/repository/moby/moby-live/Perl/MOSES-MOBY/META.yml 2008/04/29 20:10:06 1.4 @@ -27,7 +27,7 @@ Template: 1.11 Unicode::String: 2.09 XML::LibXML: 1.62 - IO::Template: .99 + IO::Prompt: 0.99 Want: 0 version: 0 -version: 0.82 +version: 0.85 From kawas at dev.open-bio.org Wed Apr 30 16:52:26 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 12:52:26 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301652.m3UGqQ7Z013357@dev.open-bio.org> kawas Wed Apr 30 12:52:25 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF In directory dev.open-bio.org:/tmp/cvs-serv13322/Perl/MOBY-Server/lib/MOBY/RDF Modified Files: Utils.pm Log Message: added a method called empty_rdf that returns a string of RDF with no statements in it moby-live/Perl/MOBY-Server/lib/MOBY/RDF Utils.pm,1.4,1.5 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Utils.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Utils.pm 2008/03/05 17:39:43 1.4 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Utils.pm 2008/04/30 16:52:25 1.5 @@ -151,5 +151,22 @@ } } +=head2 empty_rdf + +returns a string of RDF that represents a syntactically correct RDF file + +=cut + +sub empty_rdf { + return <<'END_OF_RDF'; + + + +END_OF_RDF +} + 1; __END__ From kawas at dev.open-bio.org Wed Apr 30 16:53:19 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 12:53:19 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301653.m3UGrJq7013397@dev.open-bio.org> kawas Wed Apr 30 12:53:19 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache In directory dev.open-bio.org:/tmp/cvs-serv13362/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache Modified Files: NamespaceCache.pm Log Message: added a check for situations when there is nothing in the ontology. This was causing an error before and now empty rdf is returned. moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache NamespaceCache.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/NamespaceCache.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/NamespaceCache.pm 2008/02/21 17:15:40 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/NamespaceCache.pm 2008/04/30 16:53:19 1.3 @@ -20,6 +20,7 @@ use Fcntl ':flock'; +use MOBY::RDF::Utils; use MOBY::RDF::Ontologies::Namespaces; use MOBY::RDF::Ontologies::Cache::CacheUtils; use MOBY::Client::Central; @@ -446,7 +447,8 @@ } } - $xml = $doc->toString(); + $xml = $doc->toString() if $doc; + $xml = new MOBY::RDF::Utils->empty_rdf unless $doc; # save new RDF file open( FILE, ">$file" ) From kawas at dev.open-bio.org Wed Apr 30 16:53:26 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 12:53:26 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301653.m3UGrQpu013437@dev.open-bio.org> kawas Wed Apr 30 12:53:26 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache In directory dev.open-bio.org:/tmp/cvs-serv13402/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache Modified Files: ObjectCache.pm Log Message: added a check for situations when there is nothing in the ontology. This was causing an error before and now empty rdf is returned. moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache ObjectCache.pm,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ObjectCache.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ObjectCache.pm 2008/02/21 17:43:13 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ObjectCache.pm 2008/04/30 16:53:26 1.4 @@ -20,6 +20,7 @@ use Fcntl ':flock'; +use MOBY::RDF::Utils; use MOBY::RDF::Ontologies::Objects; use MOBY::RDF::Ontologies::Cache::CacheUtils; use MOBY::Client::Central; @@ -447,7 +448,8 @@ } } - $xml = $doc->toString(); + $xml = $doc->toString() if $doc; + $xml = new MOBY::RDF::Utils->empty_rdf unless $doc; # save new RDF file open( FILE, ">$file" ) From kawas at dev.open-bio.org Wed Apr 30 16:53:37 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 12:53:37 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301653.m3UGrbAs013477@dev.open-bio.org> kawas Wed Apr 30 12:53:36 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache In directory dev.open-bio.org:/tmp/cvs-serv13442/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache Modified Files: ServiceCache.pm Log Message: added a check for situations when there is nothing in the ontology. This was causing an error before and now empty rdf is returned. moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache ServiceCache.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceCache.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceCache.pm 2008/02/21 17:15:40 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceCache.pm 2008/04/30 16:53:36 1.3 @@ -20,6 +20,7 @@ use Fcntl ':flock'; +use MOBY::RDF::Utils; use MOBY::RDF::Ontologies::Services; use MOBY::RDF::Ontologies::Cache::CacheUtils; use MOBY::Client::Central; @@ -430,6 +431,8 @@ File::Spec->catfile( $dir, $RDF ) ); }; warn $@ if $@; + # if it didnt parse correctly, reset to null + $doc = undef if $@; next; } unless $doc; my $temp_doc = eval { @@ -447,7 +450,8 @@ } } - $xml = $doc->toString(); + $xml = $doc->toString() if $doc; + $xml = new MOBY::RDF::Utils->empty_rdf unless $doc; # save new RDF file open( FILE, ">$file" ) From kawas at dev.open-bio.org Wed Apr 30 16:53:45 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 12:53:45 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301653.m3UGrjlw013517@dev.open-bio.org> kawas Wed Apr 30 12:53:45 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache In directory dev.open-bio.org:/tmp/cvs-serv13482/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache Modified Files: ServiceTypeCache.pm Log Message: added a check for situations when there is nothing in the ontology. This was causing an error before and now empty rdf is returned. moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache ServiceTypeCache.pm,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceTypeCache.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceTypeCache.pm 2008/02/21 17:15:40 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceTypeCache.pm 2008/04/30 16:53:45 1.3 @@ -20,6 +20,7 @@ use Fcntl ':flock'; +use MOBY::RDF::Utils; use MOBY::RDF::Ontologies::ServiceTypes; use MOBY::RDF::Ontologies::Cache::CacheUtils; use MOBY::Client::Central; @@ -447,7 +448,8 @@ } } - $xml = $doc->toString(); + $xml = $doc->toString() if $doc; + $xml = new MOBY::RDF::Utils->empty_rdf unless $doc; # save new RDF file open( FILE, ">$file" ) From kawas at dev.open-bio.org Wed Apr 30 17:02:54 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 13:02:54 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301702.m3UH2stY013595@dev.open-bio.org> kawas Wed Apr 30 13:02:54 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server In directory dev.open-bio.org:/tmp/cvs-serv13560/Perl/MOBY-Server Modified Files: Changes Log Message: updated change log with the changes that i am aware of moby-live/Perl/MOBY-Server Changes,1.2,1.3 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/Changes,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/04/16 13:55:28 1.2 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/Changes 2008/04/30 17:02:54 1.3 @@ -1,14 +1,25 @@ Revision history for Perl extension MOBY. 1.04 + - fixed bug that allowed service types to be registered with empty ISA relationships. + - MOBY::Config now only reads the config file once instead of numerous times. + - Attempted fix of shared memory bugs with service_tester.pl Shared memory wasn't being recycled properly and led to the server running the script to run out of memory segments, causing the script to run, but not to produce any output. + + - MOBY WSRF implementation was not WSRF compliant in some + points, and the same happened with sample code. Both the + libraries and the generated WSDL have been fixed. + + - Added checks for those cases where RDF is wanted for a + particular ontology that is empty. Instead of dying, + we now return an empty document (as should be expected). 1.00 - CVS version of MOBY released to the world via CPAN! From kawas at dev.open-bio.org Wed Apr 30 17:08:30 2008 From: kawas at dev.open-bio.org (Eddie Kawas) Date: Wed, 30 Apr 2008 13:08:30 -0400 Subject: [MOBY-guts] biomoby commit Message-ID: <200804301708.m3UH8UjM013783@dev.open-bio.org> kawas Wed Apr 30 13:08:30 EDT 2008 Update of /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts In directory dev.open-bio.org:/tmp/cvs-serv13748/Perl/MOBY-Server/bin/scripts Modified Files: moby-s-install.pl Log Message: instead of checking for WSRF and its dependencies, we now prompt the user if they would like to use those libraries and then check. This saves you the hassle of having to try and install the dependencies for WSRF when you dont plan on using those libraries. moby-live/Perl/MOBY-Server/bin/scripts moby-s-install.pl,1.3,1.4 =================================================================== RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/03/19 16:55:35 1.3 +++ /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/04/30 17:08:30 1.4 @@ -57,14 +57,6 @@ File::HomeDir File::ShareDir Class::Inspector - XML::DOM - DateTime::Format::Epoch - DateTime::Format::W3CDTF - HTTP::Daemon - MIME::Base64 - Digest::SHA1 - Crypt::OpenSSL::RSA - Sys::Hostname::Long RDF::Core XML::XPath Text::Shellwords @@ -87,9 +79,28 @@ check_module('IO::Prompt'); require IO::Prompt; import IO::Prompt; - check_module('WSRF::Lite'); - check_module('Crypt::OpenSSL::X509'); + # module required for service_tester.pl check_module('IPC::Shareable'); + # check for async libraries if user wants to .... + do { + foreach $module ( + qw / WSRF::Lite + XML::DOM + DateTime::Format::Epoch + DateTime::Format::W3CDTF + HTTP::Daemon + Crypt::OpenSSL::X509 + MIME::Base64 + Digest::SHA1 + Crypt::OpenSSL::RSA + Sys::Hostname::Long + HTTP::Daemon::SSL + XML::CanonicalizeXML + / ) { + check_module($module); + + } + } if prompt( "Shall we check for the moby-async libraries\n\t(do this only if you plan on creating async moby services)? ", -yn ); } if ($errors_found) {