[ic] SOAP access to Interchange
Mike Heins
mike at perusion.com
Mon Apr 18 13:30:11 EDT 2005
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
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 tollfree 800-949-1889 <mike at perusion.com>
Nature, to be commanded, must be obeyed. -- Francis Bacon
More information about the interchange-users
mailing list