[ic] SOAP access to Interchange

Chris Sendall cjs2 at admin.cam.ac.uk
Mon Apr 18 12:54:17 EDT 2005


interchange-users-bounces at icdevgroup.org wrote:
> Quoting Chris Sendall (cjs2 at admin.cam.ac.uk):
>> interchange-users-bounces at icdevgroup.org wrote:
>>>> My debug line ::logDebug("variable
>>>> FILE_NAME=$::Variable->{FILE_NAME}"); gives  Vend::UserDB:debug:
>>>> variable FILE_NAME=foundcscp/catalog.cfg which is right
>>>> 
>>>> Any ideas please?
>>> 
>>> I am afraid I don't understand the proxy call. But what you need to
>>> do is know what call is coming in to the Vend::Server::http_soap()
>>> routine. Uncomment some of the debug statements in that routine and
>>> you should be able to figure out what is going on.
>> 
>> Looking at output from Vend::Server, it finds the correct catalo
>> 
>> Vend::Server:debug: catname is /foundcscp
>> Vend::Server:debug: found catalog /foundcscp
>> 
>> calls Vend::SOAP:debug: SOAP autoload called,
>>   routine=Vend::SOAP::userdb, args=[   'Vend::SOAP', {
>>     'password' => 'cjs2',
>>     'function' => 'login',
>>     'username' => 'cjs2'
>>   }
>> ]
>> 
>> but on entry to Vend::SOAP::userdb has set the $::Variable hash from
>> the wrong file, which suggests to me that the hash for alias's built
>> up during the reading Catalog lines in interchange.cfg is not
>> cleared between Catalog lines 
> 
> It doesn't set it from a file at that time, it just copies the
> reference 
> to the appropriate catalog configuration from
> $Global::Selector{$catname} 
> to $Vend::Cfg.
> 
> Try changing the Catalog line to (last part may not be correct cause
> you have 
> one of those &##U#*&@~! mailers which wraps everything willy-nilly):
> 
>     Catalog  foundcscp /var/lib/interchange/foundcscp /foundcsp
> /cgi-bin/foundcsp 
> 
> The alias hash is good from my view of it -- at least in the current
> version, 
> which I assume you are using.

Mike

Thanks - I have been digging around all afternoon, at least I am learning a lot
about how it works!

Changing that round doesn't make any difference. I agree that the alias hash is
OK, I have debugged 
 parsing catalog foundcscp = {'script' => "/foundcscp",'name' =>
"foundcscp",'alias' => ["/cgi-bin/foundcscp",],'dir' =>
"/var/lib/interchange/foundcscp",}
parsing catalog tutorial = {'script' => "/cgi-bin/tutorial",'name' =>
"tutorial",'alias' => [],'dir' => "/var/lib/interchange/tutorial",}

global_config goes through each of the four catalogs and 
calls config_named_catalog for each of my catalogs
config_named_catalog calls this block
       eval {
                $Vend::Cfg = $c;
                $::Variable = $Vend::Cfg->{Variable};
                $::Pragma   = $Vend::Cfg->{Pragma};
                Vend::Data::read_salestax();
                Vend::Data::read_shipping();
                open_database(1);
                my $db;
                close_database();
       }
which sets the $::Variable hash. It seems to process the catalogs in
alphabetical order so at the end of global_config the variables from the last of
the four catalogs tutorial is set

when soap_server is called the $::Variable->{FILE_NAME} is set to tutorial value
when http_soap is called this is still true
when http_soap sets catname to /foundcscp should it call config_named_catalog?

What I find odd that the correct database is opened (foundcscp) but I don't see
where this is done.

Chris
-- 

Chris Sendall
MISD, First Floor, Greenwich House, Madingley Rise, Madingley Road,
Cambridge, CB3 0TX. Telephone: +44 1223 339653    Fax: +44 1223 339003 
e-mail:cjs2 at admin.cam.ac.uk 




More information about the interchange-users mailing list