Best way to create a client app to another non-xojo server app?

Hello all,

I have to work with another company to create a means for them to send a file (text, JSON or other) over the internet to an app that I need to write in Xojo to receive the file. Previously this was done by the others software creating a text file and dropping it into a known location on a PC. I would find and work with it - no problem. Now however the PC is none existent since it is a web app (created in some kind of tool not Xojo) and the client is a Linux RPi box.

Naturally I want to tell them to use something that I can easily work with in Xojo but not being real adept at this, am not sure what to suggest.

Can anyone suggest a good and easy way to do this using ??? I have looked at CURL to start, which seems like it would do the trick, but there is no native functions for CURL that I am aware of.

Ideas/suggestions would be very much appreciated!

Tim

look at URLConnection, HTTPSocket or HTTPSecureSocket. You can use them to send a request to the web app, and get the response (the data) back.

Hi Clifford.

I’m not actually sending anything.
The other party is sending a file to me. I just need to be listening and ready for it.

Hey Tim,

You may want to look at Tim D’s Aloe

HTH

Yeah, take a look at Aloe.

Or you could just use a folder shared on a cloud service like Dropbox or Onedrive.

[quote=432285:@Tim Seyfarth]Hi Clifford.

I’m not actually sending anything.
The other party is sending a file to me. I just need to be listening and ready for it.[/quote]

That is not really going to work on the web - servers do not contact clients it would cause security issues. So you got three types of options:

  • Use something like Dropbox and have them drop the file there
  • You connect to them via a web api or maybe something like ftp and get the file
  • You write a web server app or create an ftp site they can connect to and deliver the file to you

Thanks James
Tim

If you’re looking for the server to initiate the call you’re really talking about a bidirectional communication. Obviously the client is going to initiate the connection and then wait for a response from the server. There are a number of technologies to support this, websockets being the current buzz.
What technology is the server using? If it’s a .NET server you can look at using SignalR. This creates a hub on the server which clients connect to. The Server can then call methods on the client passing them data. SignalR can use both websocket or Long polling, which is just HTTP. There’s no native SignalR client but it’s fairly easy to implement the protocol for Long Polling and a bit more work to get Websockets working. This gives you a nice communications platform to work with, allowing the server to call clients without using a ton of client side resources.

Graffitisuite offers a drop control that can upload a file. I use it to upload pdf’s that a user wants to associate with an requisition.

link text Look for GraffitiWebUploader

If there is no user interaction, just a connection from a server, look at HandleURL or HandleSpecialURL which can be used to capture the JSON sent

HandleSpecialURL docs

Thanks for the additional ideas everyone!

The makers of the other app suggested using Firebase. Not sure if that is the direction I want to go in, but we will see.

Thanks again all!
Tim