Send XML Doc to web service

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
KimD
Posts: 223
Joined: Wed Jul 08, 2015 5:51 am
Location: Wellington, New Zealand

Send XML Doc to web service

Post by KimD » Sun Nov 26, 2017 9:43 pm

I'm wanting to create a LC app that
* shows the user a data collection form
* packages user submitted data into an XML document
* sends (or is it "writes") the XML doc to a web service. The web service will have been created by someone else. I only want to create the data collection app.

I have seen plenty of LC resource material describing the first two points, but:

1) Can anyone point me in the direction of resource material that shows how I can use LC to send an XML doc to a web service? I have previously used POST TO URL to send strings of characters to a web service. I'm just after any info that would help me make the transition from sending a string of char to sending an xml doc. Or is it as simple as use POST TO URL again, and treat the XML doc as a big/fancy string of char?

2) Does anyone know of a web service that I can use to test sending an XML doc? I know of endless web services which I can use to test reading an xml doc, but I need to test sending one.

Thanks in advance

Kim

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: Send XML Doc to web service

Post by ghettocottage » Sun Nov 26, 2017 10:42 pm

Can you tell us more about the webserver that you will be sending to? Will you have control over it? What will be running on the webserver? (apache, php, LC Server, mySQL?).

I have LC Server (community) running on one of my servers and built an app that sends data via post. The server then looks at the data, sorts through it, does some things, and sends back a reply. It would be fairly easy to tell the server to create an XML file from the data, or put the data into a database for later use.

If you will not have control over the server, then it depends on what will be running and what the admin develops for you to send to.

KimD
Posts: 223
Joined: Wed Jul 08, 2015 5:51 am
Location: Wellington, New Zealand

Re: Send XML Doc to web service

Post by KimD » Mon Nov 27, 2017 1:33 am

Scenario is this:
1) Small organisation (about 25 employees) currently collects data from their users via emailed scans of paper forms. They want to allow their users to submit data via an app instead. Organisation can't control what hardware the user has. They want the app to work for users running windows desktop, android mobile or IOS mobile.
2) They have approached me to provide a quote to develop the app to run user-side.
3) They have approached a different developer to create the web service and integrate it with their existing architecture.

So - I don't know what they have server-side, and have very limited influence on how they choose to implement the web service. What I do know is the format of the XML doc that they are expecting to receive.

Thanks

Kim

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”