Page 1 of 1

Accessing Web Services using LC

Posted: Wed May 01, 2013 10:41 am
by garyth123
Please excuse my lack of knowledge of LC and other technical issues.

I have a need to use LC to read/write to databases using SOAP WebService methods. So I've been looking at the lesson accessing-web-services-using-livecode

However when I attempt to access / run the php file which creates the xml I get an error saying "Failed to read preferences file at location: ". If I try to run the php script from the browser (localhost:8081/livecode/samplexml1.php) I get an "Unable to connect" error. I'm using my Ubuntu notebook as my web server, and can see the phpinfo page.

I realise that my problem here is not a LC issue as such but would be very grateful if anyone get help get round this particular problem.

Thanks in advance.

Re: Accessing Web Services using LC

Posted: Thu May 02, 2013 11:08 pm
by Mark
Hi,

What do you use to generate the XML exactly?

Kind regards,

Mark

Re: Accessing Web Services using LC

Posted: Fri May 03, 2013 7:58 am
by garyth123
The code that is in the LC stack. Somehow I'm not allowed to post links but it is at
lessons runrev com
/s/lessons/m/4070/l/40932-accessing-web-services-using-livecode

Re: Accessing Web Services using LC

Posted: Fri May 03, 2013 11:03 am
by Mark
Hi,

Have you changed the URL in the code to whatever is correct for your server? I had to change

Code: Select all

http://127.0.0.1:8081/livecode/samplexml1.php
into

Code: Select all

http://localhost/rr-webservice/index.php
It looks like your tPreferencesFile variable is empty. It needs to contain a valid URL pointing to the PHP file on your server. This URL won't be the same as mine.

Kind regards,

Mark