NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: springguy on May 28, 2014, 06:26:30 AM
-
NT 7.35
I have a customer with an installed base of about 400 clarion single user applications. We are implementing a NetTalk server and the customer wants the field clarion applications to upload selective database records to the server. Once the server receives the uploads, a clarion process would sync the received file data into the main server database.
Question:
1. What would you recommend as the best process for this upload?
2. Is there a good example that would illustrate how a client would upload a file to the server?
3. Is this an FTP kind of transaction or HTTP? I assume HTTP is a better choice.
4. The data will contain contact info - should it also be encrypted for the journey? Cryptonite approach?
Thanks for any advice on the best way to approach this.
Mike Springer
-
Sounds like a webservice might be the right choice for the job.
Peter
-
Hi Mike,
1. XML file via POST
2. Prepare XML file than use code like this where SndVSDC is NetSimple Object base class NetWebClient
SndVSDC.SetAllHeadersDefault()
SndVSDC.HeaderOnly = 0
SndVSDC.AcceptEncoding = ''
SndVSDC.Pragma_ = 'no-cache'
SendString = XMLData
SndVSDC.CacheControl = 'No-Cache'! Force any proxies to not use their cache. Uses more bandwidth but will contact the webserver directly which is what we want.
SndVSDC.ContentType = 'text/xml'
SndVSDC.AcceptEncoding = ''
SndVSDC.ContentLength = len (clip(SendString))
SndVSDC.AsyncOpenTimeOut = 1200 ! 12 seconds
SndVSDC.InActiveTimeout = 2000 ! 20 seconds
SndVSDC.Post(Clip(IPServer)&':88\Request',clip(SendString))
3. Yes HTTP is better choice
4. If you are in charge of crypting than use Cryptonite
Best regards,
Djordje Radovanovic
-
Or just POST over HTTPS, so only NSA can read it :)
-
>> 1. What would you recommend as the best process for this upload?
Create web service on the server side. (You'll want to use NetTalk 8 for this as it has new WSDL server support and the WSDL client support coming "soon".
>> 2. Is there a good example that would illustrate how a client would upload a file to the server?
hmm - you said
>> upload selective database records to the server.
so are you uploading _records_ or _files_?
As far as general background on web services, and specifically creating the server side, see
http://clarionlive.wikispaces.com/Webinar+255
I'll be doing a webinar on the client side when that code is ready.
>> 3. Is this an FTP kind of transaction or HTTP? I assume HTTP is a better choice.
HTTP, well actually HTTPS.
>> 4. The data will contain contact info - should it also be encrypted for the journey? Cryptonite approach?
If your server is using SSL then it's all encrypted for you, so nothing for you to do.
Cheers
Bruce
-
Bruce,
Regarding my "confusion" in saying records and files, I apologize. On the Client system, I will be creating a file to upload, but it will only contain selected records from the client databases. So, from the upload point of view, it is uploading a file. Sorry for my poor description.
I'll definitely use the new WSDL server code and will wait for your release of the client. Thanks
And, Bill - I definitely want to do things so the NSA doesn't get slowed down. :-)
Mike
-
the key with the web services is that you won't need to make a temporary file. you can just upload the records you want to upload. The server already does pretty much all the work for this, and I expect the client will as well, so the process from your side will become quite trivial.
cheers
Bruce