[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Sat Aug 16 20:30:09 UTC 2003


mwilkinson
Sat Aug 16 16:30:09 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv7302/MOBY

Modified Files:
	Central.pm 
Log Message:
having the WSDL template as a separate file caused no end of problems.  It is now a variable in the MOBY::Central module.

moby-live/Perl/MOBY Central.pm,1.100,1.101
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/08/16 15:51:32	1.100
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/08/16 20:30:09	1.101
@@ -9,7 +9,7 @@
 package MOBY::Central;
 use strict;
 use Carp;
-use vars qw($AUTOLOAD);
+use vars qw($AUTOLOAD $WSDL_TEMPLATE);
 use DBI;
 use DBD::mysql;
 use XML::DOM;
@@ -2402,11 +2402,12 @@
 
 sub _getServiceWSDL {
 	my ($SI) = @_;
-	
-	open (WSDL, "./MOBY/Central_WSDL_SandR.wsdl") || die "can't open WSDL file for search and replace\n";
-	my $wsdl = join "", (<WSDL>);
+	# the lines below causes no end of grief.  It is now in a variable.	
+	#open (WSDL, "./MOBY/Central_WSDL_SandR.wsdl") || die "can't open WSDL file for search and replace\n";
+	#my $wsdl = join "", (<WSDL>);
+	my $wsdl = $WSDL_TEMPLATE;    
     $wsdl =~ s/^\n//gs;
-	close WSDL;
+	#close WSDL;
 	# do substitutions
     
 	my $serviceName = $SI->servicename;
@@ -2813,6 +2814,65 @@
 
 
 
+my $WSDL_TEMPLATE = <<END;
+<?xml version="1.0"?>
+<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="http://schemas.xmlsoap.org/wsdl/">
+
+
+  <types>
+	 <schema targetNamespace="http://biomoby.org/CentralXSDs.xsd"
+			xmlns="http://www.w3.org/2000/10/XMLSchema"
+			xmlns:xs="http://www.w3.org/2000/10/XMLSchema">
+			
+			<!-- MOBY__INPUT__OBJECT__XSD -->
+			<!-- MOBY__OUTPUT__OBJECT__XSD -->
+	 </schema>
+  </types>
+
+  <message name="MOBY__SERVICE__NAME__Input">
+	  <part name="body" element="xsd1:MOBY__INPUT__OBJECT__NAME"/>
+  </message>
+
+  <message name="MOBY__SERVICE__NAME__Output">
+	  <part name="body" element="xsd1:MOBY__OUTPUT__OBJECT__NAME"/>
+  </message>
+
+  <portType name="MOBY__SERVICE__NAME__PortType">
+	  <operation name="MOBY__SERVICE__NAME">
+		 <input message="tns:MOBY__SERVICE__NAME__Input"/>
+		 <output message="tns:MOBY__SERVICE__NAME__Output"/>
+	  </operation>
+  </portType>
+
+  <binding name="MOBY__SERVICE__NAME__Binding" type="tns:MOBY__SERVICE__NAME__PortType">
+	  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+	  <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'/>
+		 <input>
+			 <soap:body use="encoded" namespace="http://biomoby.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+		 </input>
+		 <output>
+			 <soap:body use="encoded"/>
+		 </output>
+	  </operation>
+  </binding>
+
+  <service name="MOBY__SERVICE__NAME__Service">
+	  <documentation><!-- MOBY__SERVICE__DESCRIPTION --></documentation>  <!-- service description goes here -->
+	  <port name="MOBY__SERVICE__NAME__Port" binding="tns:MOBY__SERVICE__NAME__Binding">
+		 <soap:address location="MOBY__SERVICE__URL"/>    <!-- URL to service scriptname -->
+	  </port>
+  </service>
+
+</definitions>
+
+END
+
 
 
 1;




More information about the MOBY-guts mailing list