[ic] SOAP access to Interchange FIXED

Chris Sendall cjs2 at admin.cam.ac.uk
Tue Apr 19 05:09:28 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:
>> 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? 
> 
> config_named_catalog is what happens at configuration time, not at
> runtime. 
> 
>> 
>> What I find odd that the correct database is opened (foundcscp) but
>> I don't see where this is done.
> 
> OK, I think I see the problem. The $::Variable and other such things
> ($::Items, etc) are not getting remapped. That means the equivalent
> of a Vend::Dispatch::open_cat() is not getting done.
> 
> Try this patch to Server.pm and see if all is OK. I am unsure of what
> the effect of open_database() will be -- while I wrote the SOAP stuff
> originally I was not the last to work on it.
> 
> --- /r/Server.pm	2004-07-27 19:48:35.000000000 -0500
> +++ /rt/Server.pm	2005-04-18 12:28:26.872905336 -0500
> @@ -1883,6 +1883,7 @@
>  			}
>  			else {
>  #::logDebug("we have our SOAP enable, entity is $entity");
> +				open_cat($Vend::Cat);
>  				($Vend::SessionID, $CGI::cookiehost) = split
/:/,
>  $env{SESSION_ID}; #::logDebug("Received ID=$Vend::SessionID,
>  				host='$CGI::cookiehost'"); $Vend::NoInterpolate
= 1

Dispatch.pm: open_cat stopped in tie because no use Tie::ShadowHash;

Chris
-- 

Chris Sendall,
University of Cambridge, MISD, 
First Floor, Greenwich House, Madingley Rise, 
Madingley Road, Cambridge, CB3 0TX. 
Telephone: +44 1223 339653    Fax: +44 1223 339003 





More information about the interchange-users mailing list