[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at dev.open-bio.org
Tue Feb 6 02:53:11 UTC 2007
mwilkinson
Mon Feb 5 21:53:11 EST 2007
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv15977/MOBY
Modified Files:
Central.pm
Log Message:
MOBY Central compatible with SOAP::Lite v .69 and ready for Async
moby-live/Perl/MOBY Central.pm,1.277,1.278
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.277
retrieving revision 1.278
diff -u -r1.277 -r1.278
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2007/02/02 15:11:23 1.277
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2007/02/06 02:53:11 1.278
@@ -36,6 +36,8 @@
#use RDF::Core::Constants qw(:xml :rdf :rdfs);
use MOBY::MobyXMLConstants;
my $debug = 0;
+my $listener = 1;
+
my %user_agent_args = (agent => "MOBY-Central-Perl");
if ($debug) {
@@ -44,6 +46,26 @@
close OUT;
}
+
+if ($listener) {
+ eval {open(OUT, ">>/tmp/CentralRegistryListener.txt")};
+ $listener = 0 if @!; # abort listening if the logging attempt failed
+}
+
+sub listener {
+ return unless $listener;
+ my (%args) = @_;
+ my $authority = $args{authority};
+ my $servicename = $args{servicename};
+ my $ip = $ENV{REMOTE_ADDR}; # ="137.82.67.190"
+ open(OUT, ">>/tmp/CentralRegistryListener.txt");
+ use Time::localtime;
+ my $time = ctime;
+ print OUT "$time\t$ip\t$authority\t$servicename\n";
+ close OUT;
+}
+
+
=head1 SYNOPSIS
REQUIRES MYSQL 3.23 or later!!!!
@@ -2500,16 +2522,17 @@
my $servlsid = $SI->lsid;
my $wsdls;
return "<Services/>" unless ($SI);
- my $wsdl = &_getServiceWSDL( $SI, $InputXML, $OutputXML, $SecondaryXML );
- if ($wsdl) {
- if ( $wsdl =~ /<!\[CDATA\[((?>[^\]]+))\]\]>/ ) {
- $wsdl = $1;
- }
- $wsdls .= "<Service lsid='$servlsid'><![CDATA[$wsdl]]></Service>\n";
+ &listener(authority => $AuthURI, servicename => $serviceName); # log the requst for research purposes
+ my $wsdl = &_getServiceWSDL( $SI, $InputXML, $OutputXML, $SecondaryXML );
+ if ($wsdl) {
+ if ( $wsdl =~ /<!\[CDATA\[((?>[^\]]+))\]\]>/ ) {
+ $wsdl = $1;
}
+ $wsdls .= "<Service lsid='$servlsid'><![CDATA[$wsdl]]></Service>\n";
+ }
- #$debug && &_LOG("WSDL_________________$wsdls\n____________________");
- return $wsdls;
+ #$debug && &_LOG("WSDL_________________$wsdls\n____________________");
+ return $wsdls;
}
#Eddie - converted
@@ -3974,42 +3997,43 @@
# Standard MOBY WSDL Template
+
$WSDL_TEMPLATE = <<END;
<?xml version="1.0"?>
<wsdl:definitions name="MOBY_Central_Generated_WSDL"
targetNamespace="http://biomoby.org/Central.wsdl"
xmlns:tns="http://biomoby.org/Central.wsdl"
- xmlns:xsd1="http://biomoby.org/CentralXSDs.xsd"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:xsd="http://www.w3.org/1999/XMLSchema"
+ xmlns:xsd1="http://biomoby.org/CentralXSDs.xsd"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/">
-
+
<wsdl:message name="MOBY__SERVICE__NAME__Input">
<wsdl:part name="data" type="xsd:string"/>
</wsdl:message>
-
+
<wsdl:message name="MOBY__SERVICE__NAME__Output">
<wsdl:part name="body" type="xsd:string"/>
</wsdl:message>
-
+
<wsdl:portType name="MOBY__SERVICE__NAME__PortType">
<wsdl:operation name="MOBY__SERVICE__NAME">
<wsdl:input message="tns:MOBY__SERVICE__NAME__Input"/>
<wsdl:output message="tns:MOBY__SERVICE__NAME__Output"/>
</wsdl:operation>
</wsdl:portType>
-
+
<wsdl:binding name="MOBY__SERVICE__NAME__Binding" type="tns:MOBY__SERVICE__NAME__PortType">
- <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="MOBY__SERVICE__NAME"><!-- in essense, this is the name of the subroutine that is called -->
- <soap:operation soapAction='http://biomoby.org/#MOBY__SERVICE__NAME' style='rpc'/>
+ <wsdlsoap:operation soapAction='http://biomoby.org/#MOBY__SERVICE__NAME' style='rpc'/>
<wsdl:input>
- <soap:body use="encoded" namespace="http://biomoby.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ <wsdlsoap:body use="encoded" namespace="http://biomoby.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:input>
<wsdl:output>
- <soap:body use="encoded"/>
+ <wsdlsoap:body use="encoded" namespace="http://biomoby.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
@@ -4017,7 +4041,7 @@
<wsdl:service name="MOBY__SERVICE__NAME__Service">
<wsdl:documentation><!-- MOBY__SERVICE__DESCRIPTION --></wsdl:documentation> <!-- service description goes here -->
<wsdl:port name="MOBY__SERVICE__NAME__Port" binding="tns:MOBY__SERVICE__NAME__Binding">
- <soap:address location="MOBY__SERVICE__URL"/> <!-- URL to service scriptname -->
+ <wsdlsoap:address location="MOBY__SERVICE__URL"/> <!-- URL to service scriptname -->
</wsdl:port>
</wsdl:service>
More information about the MOBY-guts
mailing list