home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_398e5242e5b63fc07bcbb37f5e29e3e8
< prev
next >
Wrap
Text File
|
2000-03-23
|
11KB
|
230 lines
<HTML>
<HEAD>
<TITLE>PPM::SOAPServer - SOAP server for PPM repository</TITLE>
<LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
<LINK REV="made" HREF="mailto:">
</HEAD>
<BODY>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> PPM::SOAPServer - SOAP server for PPM repository</P></STRONG>
</TD></TR>
</TABLE>
<A NAME="__index__"></A>
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
<LI><A HREF="#synopsis">SYNOPSIS</A></LI>
<LI><A HREF="#description">DESCRIPTION</A></LI>
<LI><A HREF="#methods">METHODS</A></LI>
<LI><A HREF="#author">AUTHOR</A></LI>
<LI><A HREF="#see also">SEE ALSO</A></LI>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>PPM::SOAPServer - SOAP server for PPM repository</P>
<P>
<HR>
<H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
<UL>
<LI>Linux</LI>
<LI>Solaris</LI>
<LI>Windows</LI>
</UL>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<PRE>
use SOAP::Transport::HTTP::CGI;
my $safe_classes = {
'PPM::SOAPServer' => undef,
};
SOAP::Transport::HTTP::CGI->handler( $safe_classes );</PRE>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P><CODE>PPM::SOAPServer</CODE> is a module that provides an implementation of a SOAP
server to hold the PPM repository. Note that it is not required that you
actually instantiate a copy of the server object yourself; the SOAP modules
will take care of this for you when they instantiate the SOAP server. All of
the 'search*' methods that are provided by this module are made available
through the SOAP interface and can be accessed through a SOAP client.</P>
<P>
<HR>
<H1><A NAME="methods">METHODS</A></H1>
<DL>
<DT><STRONG><A NAME="item_new">new ()</A></STRONG><BR>
<DD>
Instantiates a new PPM::SOAPServer object, returning a reference to the
newly created object to the caller. During instantiation, we also read in a
full copy of the information held within the repository so that we can run
queries against it later.
<P></P>
<DT><STRONG><A NAME="item_handle_request">handle_request ($hdrs, $body, $envelope)</A></STRONG><BR>
<DD>
Handles the complete request provided through the SOAP interface. This
method determines which method is to be invoked and calls off to that
method to generate the response which is to be returned to the caller. Once
the response has been generated, we stuff this back into the envelope so
that it can be returned via the SOAP server.
<P></P>
<DT><STRONG><A NAME="item_version">version ()</A></STRONG><BR>
<DD>
Returns to the caller the version number of the SOAP server that is
running.
<P></P>
<DT><STRONG><A NAME="item_searchAbstract">searchAbstract ($params)</A></STRONG><BR>
<DD>
Searches against the '<CODE>ABSTRACT</CODE>' field within the packages held in the
repository. Within the given parameters, a key of ``search'' should be
provided containing the term to search for (which can be a regex). If no
``search'' key is provided, a complete list of all of the packages are
returned to the caller.
<P>The return value provided from this method will be a reference to a hash
containing the result set. A key named ``num_results'' will be provided,
stating the number of results to be found in the result set. Each item in
the result set will be named ``result_???'' where '<CODE>???</CODE>' is the number of
that item in the result set. For example, a search returning two results
would return a reference to a hash with keys of '<CODE>num_results</CODE>',
'<CODE>result_1</CODE>', and '<CODE>result_2</CODE>'.</P>
<P></P>
<DT><STRONG><A NAME="item_searchAuthor">searchAuthor ($params)</A></STRONG><BR>
<DD>
Searches against the '<CODE>AUTHOR</CODE>' field within the packages held in the
repository. Within the given parameters, a key of ``search'' should be
provided containing the term to search for (which can be a regex). If no
``search'' key is provided, a complete list of all of the packages are
returned to the caller.
<P>The return value provided from this method will be a reference to a hash
containing the result set. A key named ``num_results'' will be provided,
stating the number of results to be found in the result set. Each item in
the result set will be named ``result_???'' where '<CODE>???</CODE>' is the number of
that item in the result set. For example, a search returning two results
would returns a reference to a hash with keys of '<CODE>num_results</CODE>',
'<CODE>result_1</CODE>', and '<CODE>result_2</CODE>'.</P>
<P></P>
<DT><STRONG><A NAME="item_searchTitle">searchTitle ($params)</A></STRONG><BR>
<DD>
Searches against the '<CODE>TITLE</CODE>' field within the packages held in the
repository. Within the given parameters, a key of ``search'' should be
provided containing the term to search for (which can be a regex). If no
``search'' key is provided, a complete list of all of the packages are
returned to the caller.
<P>The return value provided from this method will be a reference to a hash
containing the result set. A key named ``num_results'' will be provided,
stating the number of results to be found in the result set. Each item in
the result set will be named ``result_???'' where '<CODE>???</CODE>' is the number of
that item in the result set. For example, a search returning two results
would returns a reference to a hash with keys of '<CODE>num_results</CODE>',
'<CODE>result_1</CODE>', and '<CODE>result_2</CODE>'.</P>
<P></P>
<DT><STRONG><A NAME="item_search">search ($params)</A></STRONG><BR>
<DD>
Searches against _all_ of the fields within the packages held in the
repository. Within the given parameters, a key of ``search'' should be
provided containing the term to search for (which can be a regex). If no
``search'' key is provided, a complete list of all of the packages are
returned to the caller.
<P>The return value provided from this method will be a reference to a hash
containing the result set. A key named ``num_results'' will be provided,
stating the number of results to be found in the result set. Each item in
the result set will be named ``result_???'' where '<CODE>???</CODE>' is the number of
that item in the result set. For example, a search returning two results
would returns a reference to a hash with keys of '<CODE>num_results</CODE>',
'<CODE>result_1</CODE>', and '<CODE>result_2</CODE>'.</P>
<P></P>
<DT><STRONG><A NAME="item_packages">packages ()</A></STRONG><BR>
<DD>
Generates a list of all of the packages currently available in the
repository.
<P>The return value provided from this method will be a reference to a hash
containing the result set. A key named ``num_results'' will be provided,
stating the number of results to be found in the result set. Each item in
the result set will be named ``result_???'' where '<CODE>???</CODE>' is the number of
that item in the result set. For example, a repository with two packages in
it would return a reference to a hash with keys of '<CODE>num_results</CODE>',
'<CODE>result_1</CODE>', and '<CODE>result_2</CODE>'.</P>
<P></P>
<DT><STRONG><A NAME="item_fetch_ppd">fetch_ppd ($params)</A></STRONG><BR>
<DD>
Fetches the PPD from our package list for a specific package. The
parameters provided should include a key named '<A HREF="../../../lib/Pod/perlfunc.html#item_package"><CODE>package</CODE></A>', which is the
name of the package for which we wish to fetch the PPD for. This method
returns to the caller a hash reference containing the matching results. A
key named ``num_results'' will be present stating the number of matching
results (either 0 or 1). If a PPD has been found for the requested package,
a key of ``result_1'' will also be present, whose value will be the full
contents of the PPD file (in XML format) as a scalar value.
<P></P>
<DT><STRONG><A NAME="item_fetch_summary">fetch_summary ()</A></STRONG><BR>
<DD>
Fetches a summary of the entire contents of the repository. This method
returns to the caller a reference to a hash containing the following keys:
'<CODE>num_results</CODE>', '<CODE>result_1</CODE>'. The value of the '<CODE>result_1</CODE>' key is the
full contents of the repository summary file (in XML format) as a scalar
value.
<P></P>
<DT><STRONG><A NAME="item__xml_escape">_xml_escape ($val)</A></STRONG><BR>
<DD>
<STRONG>INTERNAL METHOD.</STRONG> Cheap little function to escape out most of the things
in the value we're passing back so that its at least ``clean''. This should
really be using some sort of XML::Entities module to do the conversion,
though; I've just hacked this together because these are the things that I
encountered.
<P></P>
<DT><STRONG><A NAME="item__search">_search ($field, $search)</A></STRONG><BR>
<DD>
<STRONG>INTERNAL METHOD.</STRONG> Does a general search against the fields present for a
package within the repository, searching for a specific term (which could
be a regex). If no '<CODE>$field</CODE>' value is provided, this method searches
through _all_ of the fields present for a given package. If no '<CODE>$search</CODE>'
value is provided, '<CODE>.*</CODE>' is deemed to be the matching regex (everything).
<P>The return value provided from this method will be a reference to a hash
containing the result set. A key named ``num_results'' will be provided,
stating the number of results to be found in the result set. Each item in
the result set will be named ``result_???'' where '<CODE>???</CODE>' is the number of
that item in the result set. For example, a search returning two results
would returns a reference to a hash with keys of '<CODE>num_results</CODE>',
'<CODE>result_1</CODE>', and '<CODE>result_2</CODE>'.</P>
<P></P>
<DT><STRONG><A NAME="item__pkginfo">_pkginfo ($package)</A></STRONG><BR>
<DD>
<STRONG>INTERNAL METHOD.</STRONG> Takes the XML object representation of a package and
turns it into a single hash reference containing only select portions of
the package information. This hash reference is then returned to the
caller.
<P></P>
<DT><STRONG><A NAME="item__loadRepository">_loadRepository ()</A></STRONG><BR>
<DD>
<STRONG>INTERNAL METHOD.</STRONG> Loads up information about the contents of the
repository, stuffing them into the global namespace. If the repository has
already been loaded, this method simply returns without doing anything.
NOTE, that this method is _NOT_ an instance method; it's a package method.
<P></P></DL>
<P>
<HR>
<H1><A NAME="author">AUTHOR</A></H1>
<P>Graham TerMarsch (<A HREF="mailto:gtermars@home.com">gtermars@home.com</A>)</P>
<P>
<HR>
<H1><A NAME="see also">SEE ALSO</A></H1>
<P><A HREF="../../../site/lib/PPM/SOAPClient.html">the PPM::SOAPClient manpage</A>,
<A HREF="../../../site/lib/SOAP.html">the SOAP manpage</A>.</P>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> PPM::SOAPServer - SOAP server for PPM repository</P></STRONG>
</TD></TR>
</TABLE>
</BODY>
</HTML>