[MOBY-guts] biomoby commit
Nina Opushneva
nopushneva at pub.open-bio.org
Tue Feb 8 23:43:06 UTC 2005
nopushneva
Tue Feb 8 18:43:06 EST 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Client
In directory pub.open-bio.org:/tmp/cvs-serv26832
Modified Files:
Central.pm
Log Message:
added a check for RDFagent call, and call a new RDFbuilder
moby-live/Perl/MOBY/Client Central.pm,1.89,1.90
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -r1.89 -r1.90
--- /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/02/06 22:46:45 1.89
+++ /home/repository/moby/moby-live/Perl/MOBY/Client/Central.pm 2005/02/08 23:43:06 1.90
@@ -778,6 +778,36 @@
my $Category = lc( $a{category} );
chomp $Category;
$Category ||= "";
+
+#____________call RDFagent__________________________________________________
+if (defined $signatureURL){
+ my $ch = 0;
+ my $sign_req;
+ foreach $sign_req ($name, $type, $authURI, $email, $URL, $desc, $Category){
+ if ($sign_req ne ""){
+ $ch = 1;
+
+ }
+ }
+ if ($ch == 0){
+ print "call Agent\n";
+ my $message = "
+ <registerService>
+ <Category></Category>
+ <serviceName></serviceName>
+ <serviceType></serviceType>
+ <Description></Description>
+ <signatureURL>$signatureURL</signatureURL>
+ <URL></URL>
+ <authURI></authURI>
+ <contactEmail></contactEmail>
+ </registerService>";
+ my ( $return ) = $self->_call( 'default', 'registerService', $message );
+ return ( $self->parseRegXML( $return ) );
+
+ }
+}
+#____________________________________________________________________________________________
return $self->errorRegXML(
"Only 'moby' and 'wsdl' Service Categories are currently allowed - you gave me $Category"
)
@@ -798,7 +828,7 @@
<serviceName>$name</serviceName>
<serviceType>$type</serviceType>
<Description><![CDATA[$desc]]></Description>
- <signatureURL>$signatureURL</signatureURL>
+ <signatureURL>$signatureURL</signatureURL>
<URL>$URL</URL>
<authURI>$authURI</authURI>
<contactEmail>$email</contactEmail>";
@@ -950,7 +980,22 @@
# my $return = $self->SOAP_connection->call(registerService => ($message))->paramsall;
my ( $return ) = $self->_call( 'default', 'registerService', $message );
- return ( $self->parseRegXML( $return ) );
+# return ( $self->parseRegXML( $return ) );
+#_______call a new version RDFbuilder (by Eddie Kawas) _________________________________________
+ my $reg = $self->parseRegXML( $return );
+ if ($reg->success == 1){
+ require LWP::UserAgent;
+
+ my $ua = LWP::UserAgent->new;
+ my $url='http://mobycentral.cbr.nrc.ca:8090/DemoServlet/forms/getSignatureResponse?domain='.$authURI.'&serviceName='.$name;
+
+ my $response = $ua->get($url);
+ my $rdf = $response->content;
+ print "$rdf\n";
+}
+ return $reg;
+#_______________________________________________________________________________________________
+
}
=head2 registerServiceWSDL
@@ -970,6 +1015,7 @@
# my $return = $self->SOAP_connection->call(registerServiceWSDL => ($message))->paramsall;
my ( $return ) = $self->_call( 'default', 'registerServiceWSDL', $message );
+
return ( $self->parseRegXML( $return ) );
}
More information about the MOBY-guts
mailing list