[Xml-compile] getting started with XML-Compile

Ted Pedersen duluthted at gmail.com
Sun Aug 22 16:35:53 GMT 2010


Greetings all,

I have an existing Perl module that is written in object oriented
Perl, and I'd like to make it available as a web service (or some
other mechanism that allows for remote use). The motivations for doing
this are the module can be rather computationally intensive, and is
difficult for some users to install (especially those on Windows
systems). A number of folks have recommended I look at XML::Compile,
which is what I've started to do.

My goal is to allow remote users to call the methods that are
available in the module in more or less the same way they would use
them if they had the module locally installed. The module is already
written and working pretty much as we'd like it to work, so I'm hoping
to avoid major amounts of new coding, and I'd also like the "remote"
users to be able to use the code in pretty much the same way as local
users?

Is this something that would be reasonable to do with XML::Compile,
and if so, are there any examples of how to take an existing module
and "convert it" into something that will run as I'm describing? I
don't have much experience with SOAP or web services generally, so I'm
looking for a way to get started on this. Any suggestions, comments,
etc. would be much appreciated.

Thanks!
Ted

BTW, the following is an example of the code we can run locally
now....we'd just like to somehow make it possible for a user to run
this same kind of code on their own computer, and have our server do
the work of offset, getTaxonomies and getTaxonomyDepth and send back
the results.

 use WordNet::QueryData;
 my $wn = WordNet::QueryData->new;
 defined $wn or die "Construction of WordNet::QueryData failed";

 use WordNet::Similarity::DepthFinder;

 my $obj = WordNet::Similarity::DepthFinder->new ($wn);
 my ($err, $errString) = $obj->getError ();
 $err and die $errString;

 my $wps1 = 'car#n#4';
 my $wps2 = 'oil#n#1';

 my $offset1 = $wn -> offset ($wps1);
 my $offset2= $wn -> offset ($wps2);

 my @roots = $obj->getTaxonomies ($offset1, 'n');
 my $taxonomy_depth = $obj->getTaxonomyDepth ($roots[0], 'n');
 print "The maximum depth of the taxonomy where $wps1 is found is $tax

-- 
Ted Pedersen
http://www.d.umn.edu/~tpederse



More information about the Xml-compile mailing list