[ic] Using Interchange as a SOAP server

Dr. Michael Streubel michael.streubel at ibizplanet.com
Wed Apr 13 03:22:31 EDT 2005

Chris Sendall wrote:

>This is my first post to this list - we are looking at Interchange for
>e-Commerce at Cambridge (UK).
>I have created a copy of the foundation store on an internal server and set it
>up UK settings and using ePDQ for payments. This is called foundcscp. The url is
>http://milton.internal.admin.cam.ac.uk:81/foundcscp/ but this is not available
>from outside my department.
>[One catch when using copy of foundation was the link to images is replaced a
>real folder which meant that uploaded images for new items did not get 'copied']
>Anyway I am now trying to access this store via Soap. I followed the
>instructions in http://ftp.icdevgroup.org/interchange/contrib/soap.html and
>created a modified script which looks like this:
>#!/usr/bin/perl -w
>use SOAP::Lite;
>my $cat = 'foundcscp';
>my $id = 'ABCDEFGH:soap';
>my $Tag = SOAP::Lite
>            -> uri('http://milton.internal.admin.cam.ac.uk/Vend/SOAP')
>            -> proxy("http://milton.internal.admin.cam.ac.uk:7780/$cat/$id");
>my $login_opt = {
>    username => 'cjs2',
>    password => 'cjs2',
>    function => 'login'
>    };
>my $ok = $Tag->userdb( $login_opt )->result;
>print "[$ok]\n" if $ok;
>if($ok) {
>    print "Successful login.\n";
>    print "First name is " . $Tag->value('fname')->result;
>else {
>    print "FAILED login.\n";
>Login always fails. I can telnet to port 7780 and get a response.
>There is a line in Chapter 12 of 
>which says "Any catalog accessible with SOAP needs ...a catalog alias with a
>single slash, like /soapdemo. 
>Is this the problem?
>Has anyone out there got the userdb logon to work to a localhost server? I have
>tried the example given (developer.akopia.com) but it is refusing connections.
Yes, I've got it to work. For IC 5.2 (perhaps 5.0 also), in your catalog 
configuration you must have

SOAP_Control  Tag/userdb local

(the values of this directive can be local, always, never).

However, it appears to me that there is a bug in Vend/SOAP.pm where 
there is a loop of the form

for $subref ($Global::SOAP_Control,     $Vend::Cfg->{SOAP_Control}) {

with the intention to give global control configurations precedence over 
local ones. But that doesn't
seem to work. So replace this statement by

for $subref ( $Vend::Cfg->{SOAP_Control}) {

and it'll work. Hope that helps.


>Thanks in advance
>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
>interchange-users mailing list
>interchange-users at icdevgroup.org

Dr. Michael Streubel
IBP Providers Ltd.
Schlossallee 30
65388 Schlangenbad-Georgenborn

Tel: 06129/502947
Fax: 06129/502946
Mobil:  0172/8615338
URL: http://www.ibizplanet.com

More information about the interchange-users mailing list