NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Wolfgang Orth

Pages: 1 2 3 [4] 5 6
46
Hello all!

My SOAPServer receives data from the SOAPClient, which sometimes contain those characters like &, which get transformed to & for transport.

<Company>Dunburry &amp; Brooks</Company>

The Server, however, needs the original string, not that converted character:

<Company>Dunburry & Brooks</Company>

With .StringTheorys HtmlEntityToDec() I can swap things like &copy; (the copyright symbol ©) to &#169;, but this is not exctly what I want <g>.

Is there something to re-connvert like .HTMLtoASCII() or whatever alike?

Thanks in advance,
Wolfgang

47
Web Server - Ask For Help / SOAPserver - Passing a mandatory GROUP
« on: September 22, 2014, 11:23:49 PM »
Hello Bruce,

in a SOAPserver I pass a GROUP with four variables which are not optional. I see that groups being parameters  can't be set to "Required".

The only chance is to send them as four STRING-parameters then?

Just for me to know.....

thx,
Wolfgang

48
Web Server - Ask For Help / SOAPwebservice, SSL, many installs
« on: September 08, 2014, 01:52:38 AM »
Hello Bruce,

I read through the instructions to create ones own Certificate Authority and Certificates. In your text you refer to regular Webserver and regular Webbrowser.

My intention is to build a Client-Server-combo with SOAP, where both sides are regular Clarion-programs.

However, I assume that this SSL stuff is mostly valid also to this project. But, of course, I still have some questions.

These two Properties are working on SimpleClients, E-MailClients and also  (SOAP)WebClient - right?

DontVerifyRemoteCertificateCommonName
DontVerifyRemoteCertificateWithCARoot

I deducted that from this snippet in the online-manual:
Quote

  ThisWebClient.SSLCertificateOptions.CertificateFile = ''
  ThisWebClient.SSLCertificateOptions.PrivateKeyFile = ''
  ThisWebClient.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 0
  ThisWebClient.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = 0
  ThisWebClient.SSLCertificateOptions.CARootFile = '.\CARoot.pem

When I set
Quote

  ThisWebClient.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 1    ! TRUE
  ThisWebClient.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = 1    ! TRUE

then my SOAP-Client does not care whether I have include a common name like wigglediwoop or whatever?

The reason I ask this is, because this combo is to be installed on several different locations, where I neither know any computer name nor the particular IP-Address if the designated Server-machine. But if I understood right, then it doesn't matter, as long as my Client has set DontVerifyRemoteCertificateCommonName and DontVerifyRemoteCertificateWithCARoot to 1.

Right so far?

Problems will appear on the next stage, because other program, from other manufacturers, shall be permitted to access this same SOAPserver with their own programs. And there is very likely a good chance that none of them uses Clarion + Nettalk. It might even be possible that they may access through a webbrowser. That will lead to the problem, that they run into SSL-Errormessages. If that RemoteCertificateCommonName will at least hold the actual IP-Address of the machine, which hosts the SOAPserver, then that error will not appear.

My program will run in Trial-Mode for 30 days, before a licence key is needed.

Now my questions:

1) Would it be a viable solution, to provide a general install to all, where the Certificate has a bogus RemoteCertificateCommonName and later, when the licence-key is sent to the customer, we also send the certificate with the correct IP-Address of the Server-machine?


2) When other manufacterers access our SOAPserver with their own programs / webbrowser, will they be able to suppress SSL-errormessages also? From your manual I know that the webbrowsers can be set up alike (with some work by the IT).

If this is something worth to discuss during the NT-UG-Webinar, you could postpone it until Thursday.

Thanks for your patience!

bye
Wolfgang

49
Web Server - Ask For Help / NetWebService - prohibit access
« on: August 06, 2014, 11:51:12 AM »
Hello Bruce and all!

A NetWebService is exposed to all and everyone, who is able to call the WSDL-page.

The project I am working on, has several NetWebServices. At a later stage we consider to allow other vendors to access some of them. There is a good chance that some vendors will not get access to each, but just a limited number of NetWebServices. However, the WSDL-page "exposes" all methods and every parameter.

My idea now is to include a sort of authentification in each SOAP-request. The NetWebService will then check, whether this vendor is entitled to request this specific service. Like:

IF PermittedAccess(ReceivedVndorID, ReceivedVendorPW, ThisWebService) = TRUE
etc
ELSE.

PermittedAccess() does a simple SET / NEXT or ACCESS:Vendor.Next() and will RETURN a found or not found (TRUE / FALSE).

Does my explanatiuon makes any sense and is there any downside? Any better approach?

Thanks in advance,
Wolfgang

50
Hello again.... ;-)

My WebClient will call several different methods on the SOAPserver, mostly from one window. The .PageReceived method will then receive results in quite some different shaped.

My question: The .PageReceived-method ought to contain a State-Machine then, to direct the received data into the correct QUEUEs, TABLEs, VARs and whatever, right?

Each request has its own Button, in each Button the ClientRequest will be set to a certain value. Like ClientRequest = EQ:GetCompletVendorTable


In .PageReceived the code may look like

CASE ClientRequest
OF EQ:GetCompleteCustomerTable
  DO FillCustomerTable
OF EQ:GetCompletVendorTable
  DO FillVendorTable
OF EQ:GetAnInvoice
  DO WriteThatInvoiceIntoLocalVars
END


Did I get that right?

Thanks a lot for your patience!

bye
Wolfgang

51
Hello Bruce,

that web77 example is confusing me.

From http://localhost:88/Database?dbCustomer I understand, that my request ought to be http://localhost:88/Database and I would get back:
Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  <soap:Body>
    <dbCustomer xmlns="http://www.capesoft.com">
      <Customer>
        <CUS_ID>value</CUS_ID>
        ........

So I try this in the client:
Code: [Select]
   PostURL = 'http://localhost:88/Database'
    
    poststring = ''
    
    ThisClient.SetAllHeadersDefault()
    ThisClient.Pragma_ = 'No-Cache'    
    ThisClient.CacheControl = 'No-Cache'

    ThisClient.ContentType = 'application/soap+xml'   ! Does this trigger SOAP 1.2?????

    ThisClient.AcceptEncoding = 'utf-8'
    ThisClient.ContentLength = len (clip(PostString))
    ThisClient.AsyncOpenTimeOut = 1200       ! 12 seconds
    ThisClient.InActiveTimeout = 2000        ! 20 seconds

    ThisClient.Post(PostURL,PostString)

However, I get back the contents of the page with the "Web Service Documentation".

Changing the URL to  'http://loalhost:88/dbCustomer' returns the XML which I expected - but without any .SOPAenvelope-stuff, opposed to what is announced in the WSDL-page.

To me it seems, that ThisClient.Post(PostURL,PostString) performs a simple HTTP Request and Response without any parameters. The method .Fetch(PostUrl) returns the same result.

So, what is my mistake?


52
The Rest - Ask For Help / Convert ZIP to BASE64 for d/l
« on: April 17, 2014, 07:16:18 AM »
Hello all,

my plan is to make my program a Webclient, that the admin can check the option to look for for the latest version and possibly download the ZIP from my webserver.

However, in some networks the download of binary files is prohibited or they do a Deep Inspection, whether there is an EXE hidden inside the ZIP and then cancel the download for security reasons.

Would it be a viable "workaround" to convert the ZIP into a BASE64 encoded TXT, storing it on the webserver? Then, when the file has been d/l successfully, the webclient converts it back to a ZIP?

Is this a method to fly under the radar?

Thanks in advance,
Wolfgang

53
Hello Bruce,

a quick question as a follow-up to your Webinar.

My datasets are somewhat complex, on some FORMs they span across 20 related tables.

Is it possible to build a webservice for such monsters?

Am I right with my assumption that I do a series of LOOPs with  SET / NEXT or ACCESS:table.Fetch() through all related child-/grandchild/and-so-on-tables to read all the required records on the server-side, then send back my dataset to the client?

Thanks in advance, bye
Wolfgang

54
The Rest - Ask For Help / SimpleClientServer: no WholePacket
« on: January 04, 2014, 01:39:20 PM »
Hello Bruce,

today I encountered that in the branch with NET:SimpleWholeDataPacket in the  .Process()-method gets completly ignored, as long as I have a regular NET:SimplePartialDataPacket-branch there too.

If I delete the NET:SimplePartialDataPacket-branch, NET:SimpleWholeDataPacket gets the packets and acts as I like.

    
Code: [Select]
   case ThisClient.Packet.PacketType    

      of NET:SimpleAsyncOpenSuccessful
      !        of  NET:SimplePartialDataPacket
      of NET:SimpleWholeDataPacket
      of NET:SimpleIdleConnection

    end


That means:

a) I can't have both SimplePackets and WholePackets in the same app

b) I have to be sure to NOT include that " of  NET:SimplePartialDataPacket"-branch (Copy&Paste from the docs, he he!)

Is that intended by you? Its okay then.

Or is it a bug? Its still okay, as it is something I can live with, once I have learned it. <g>

I simply ask to be sure.

However, I have in mind that I think I might have read, that a Simple-CS-communication can be either Partial or Whole. But I can't find that snippet anymore. 

Thanks,
Wolfgang

55
The Rest - Ask For Help / 2,000 Simple-Client - conceptual question
« on: December 29, 2013, 02:27:36 PM »
Hello Bruce and all...

The NetSimple-project I am working on runs well. It is a SimpleServer with quite some SimpleClients, which stay connected permanently.

To keep that connection alive, I set ThisClient.InActiveTimeout = 900,000  (! 900 seconds = 15 minutes) and send a HeartBeat every 5 Minutes.

On the serverside I maintain an InMemory-table with all connented clients, holding IP-Address, SockID, Socket, time of last connect / Heartbeat etc.

Once in a while, the server will send out a message to all connected clients, forcing them to open a window.

I learned now, that this project will have to address 2,000 clients now.

A Windows Server OS should be capable for that amount of parallel connenctions. My concern is the timing of the Heartbeats.

With 2,000 clients sending a Heartbeat every 5 minutes, the server will get an average of 6 requests per second.

That will mean, that in a phase of sending a message to all stations, the IMDD-table will get LOOPed through, SET() NEXT() sending a message, but every 1/6th second the record-buffer will be touched from the incoming Heartbeat. I expect the LOOP to stumble then and not work properly, sending that message to each connected client, because this happens all on the same THREAD.

Making the client to send just a .PING() will not neccessarily keep the connection open, right.It simply says, that the machine that gets sent a PING responding, therefore it is reachable, but it says nothing about any connection.

So...... I thought of changing places.... Not the clients will send heartbeats, but once the server has noted the connection, it will be the server that sends a HeartBeat to all 2,000 stations.

If a proper resonse returns, the clients record in the IMDD-table can be updated.
ELSE
If no response comes back, the client can be purged from the list or maybe gets set to "not connected" inside .ErrorTrap().

That means, I have no permanent chatter on the line, it is reduced to the absolute necessary.

If the client itself does feel disconnected, it will auto-reconnect and listed again.

If clients get (re-)connected during that LOOP of Heartbeat or LOOP of Message, it is a rare occurance and I can maintain a temporary Queue, that can be parsed and integrated into the IMDD-table soon after such a LOOP has been finished.

Does that sound reasonable?

Thanks for any advice,
Wolfgang

56
Hello Bruce,

can a SimpleServer run on port 1,000 while the SimpleClients send their requests by using Port 80?

It was my perception that both parties have to communicate on the same port.

I am going to test this now, but I thought I better ask for confirmation, because my test may lead my wrong though.

Thanks,
Wolfgang

57
Web Server - Ask For Help / Jabber anyone?
« on: October 30, 2013, 02:37:27 AM »
Hello all,

has anyone of you played programmatically with Jabber (XMPP)?

https://en.wikipedia.org/wiki/XMPP

Jabber is an open source instant messaging system. From my understanding it is comparable to Nettalk Simple Client/Server.

What me brought to think about Jabber is a webcam I recently saw. This camera can send alert messages via the Jabber-network to any Jabber-client. You can guess it, the very next idea was to write my own Jabber-client with Nettalk.....

Before I re-invent the wheel, I thought to ask here.

Thanks so far,
Wolfgang

58
Hello all,

I installed a NettalkWS (6) on two Windows 8 machines. That WS is a combination of SOAP-Server and regular Webserver with a simple FORM with just 2 DropDowns plus a button and a NetWebPage that displays the result of a computation. It is actually meant to run on the machine itself as localhost. One machine is a normal desktop, the other is a tablet.

On both Win8 machines I can call that form and pick a value on each dropdown.

But when I press that button, nothing happens. This page with the results do not appear.

Running that same WS on a XP, Vista or Win7 and accessing this webapp from both Windows 8 machines work normal.

I assume that this might be caused be the local Win8 Firewall. However, what makes me wonder is that the form appears, because.... if it would be a FW issue, I'd expect not even this to be loaded.

I tried some configuration, but did not hit the right one.

Any suggestions?

Thanks,
Wolfgang


59
The Rest - Ask For Help / NetSimple Push Frequency
« on: March 11, 2013, 03:29:09 AM »
Hello Bruce and all others,

occasionally I write a program to send messages froma server to several clients.

Because connections are fragile and clients often gets disconnected, I let them send "Heartbeats" to the server every n seconds.

Client: "Can you hear me, mama?"

Server: "I can hear you, my darling!"

I don't want to clutter the networrk traffic with my chirping, otoh I want to keep up the contact as reliable as possible. And the more clients contact, the noisier it gets.

My question now is, what is a reasonable frequency for those messages?

Thanks,
Wolfgang

60
The Rest - Ask For Help / NetAutoClose - which port is used?
« on: February 17, 2013, 07:59:26 AM »
Hello Bruce and all,

over which port are the NetAutoCloseClients and -Server communicating?

I assume its UDP on Ports 2326, 2327, 2328, 2329 and 2330.

For some reasons I have Port 9 on my mind, no idea why.

Are these standard ports, which we couöd expect to be available on a LAN or may paranoid admins locked them too?

And why are there 5 consecutive ports?

Does the program rotate the port numbers? ]2326,  2327,  2328,  2329,   2330 from message to message?  ;-)

Thanks for any information, confirmation or correction,
Wolfgang

Pages: 1 2 3 [4] 5 6