/[cvs]/nfo/perl/libs/OEF/Component/WebService/RpcXml.pm
ViewVC logotype

Diff of /nfo/perl/libs/OEF/Component/WebService/RpcXml.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by joko, Fri Apr 4 17:28:59 2003 UTC revision 1.4 by joko, Fri Jun 6 03:24:14 2003 UTC
# Line 2  Line 2 
2  ##  $Id$  ##  $Id$
3  ##  ------------------------------------------------------------------------  ##  ------------------------------------------------------------------------
4  ##  $Log$  ##  $Log$
5    ##  Revision 1.4  2003/06/06 03:24:14  joko
6    ##  + SymbolAliasing
7    ##
8  ##  Revision 1.3  2003/04/04 17:28:59  joko  ##  Revision 1.3  2003/04/04 17:28:59  joko
9  ##  minor update: commented hardcoded stuff  ##  minor update: commented hardcoded stuff
10  ##  ##
# Line 26  use Data::Dumper; Line 29  use Data::Dumper;
29  use RPC::XML;  use RPC::XML;
30  use RPC::XML::SessionServer;  use RPC::XML::SessionServer;
31  use RPC::XML::Procedure;  use RPC::XML::Procedure;
32    use Data::Mungle::Code::Symbol qw( alias_simple );
33    
34  # this is a global counter for giving unnamed webservices a unique id  # this is a global counter for giving unnamed webservices a unique id
35  our $instance_counter;  our $instance_counter;
# Line 59  sub start { Line 63  sub start {
63      );      );
64            
65    # API    # API
66      # load api module    
67        # 1. load api module
68      my $api = DesignPattern::Object->fromPackage($self->{api_module}) or die("Could not load Api-Module '$self->{api_module}'.");      my $api = DesignPattern::Object->fromPackage($self->{api_module}) or die("Could not load Api-Module '$self->{api_module}'.");
69      # build complete bunch of api declaration metadata handling recursive plugin declaration and stuff ...      # build complete bunch of api declaration metadata handling recursive plugin declaration and stuff ...
70      #$api->build([qw( OEF::YAA::API::Jobs )]);      #$api->build([qw( OEF::YAA::API::Jobs )]);
71      $api->build($self->{api_submodules});      $api->build($self->{api_submodules});
72      # get it!      
73        # 2. query it for to-be-published methods ...
74      my $procs = $api->getApiMetadata() or die("Could not load Api-Declarations from '$self->{api_module}'.");      my $procs = $api->getApiMetadata() or die("Could not load Api-Declarations from '$self->{api_module}'.");
75      # ... and propagate metadata for each method to daemon instance which is not yet running      # ... and propagate metadata for each method to daemon instance which is not yet running
76      foreach my $proc (@{$procs}) {      foreach my $proc (@{$procs}) {
77        $self->{_daemon}->add_method($proc);        $self->{_daemon}->add_method($proc);
78      }      }
79        
80        # 3. SymbolAliasing: query it for to-be-established symbols ...
81        my $symbols;
82        $symbols = $api->getSymbolMetadata() if $api->can("getSymbolMetadata");
83        # ... and vivify them each pointing to a reference.
84        foreach my $symbol (@{$symbols}) {
85          $symbol->{slot} = $self->{_daemon};
86          alias_simple($symbol);
87        }
88    
89    # run service / activate instance    # run service / activate instance
90      # Never returns...      # Never returns...

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed