Accessing Web Services using LC

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
garyth123
Posts: 88
Joined: Sat Apr 27, 2013 11:14 am
Contact:

Accessing Web Services using LC

Post by garyth123 » Wed May 01, 2013 10:41 am

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.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Accessing Web Services using LC

Post by Mark » Thu May 02, 2013 11:08 pm

Hi,

What do you use to generate the XML exactly?

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

garyth123
Posts: 88
Joined: Sat Apr 27, 2013 11:14 am
Contact:

Re: Accessing Web Services using LC

Post by garyth123 » Fri May 03, 2013 7:58 am

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

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Accessing Web Services using LC

Post by Mark » Fri May 03, 2013 11:03 am

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply