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.


Messages - HalfBubble

Pages: [1]
1
The Rest - Ask For Help / Re: Retrieving a PNG
« on: July 19, 2012, 06:09:32 AM »
Oh, you use the SavePage method.


2
The Rest - Ask For Help / Retrieving a PNG
« on: July 19, 2012, 05:57:14 AM »
Trying to download the png at http://www.worldweatheronline.com/images/wsymbols01_png_64/wsymbol_0002_sunny_intervals.png

but my Page contains html header info. How do I fetch the png out of it?

In the Page Received method, I have:

Code: [Select]
  fn = DG:CommonFolder & '\' & fn
  CREATE(RF)
  OPEN(RF)
  RF.Record.B = WC.Page [1 : WC.PageLen]
  ADD(RF,WC.PageLen)
  CLOSE(RF)

HTTP/1.1 200 OK
Cache-Control: max-age=7776000
Content-Type: image/png
Last-Modified: Tue, 20 Apr 2010 07:45:44 GMT
ETag: "0c4607b5de0ca1:0"
Server: Microsoft-IIS/7.5
Date: Thu, 19 Jul 2012 13:40:32 GMT
X-Varnish: 1596931882 1596702794
Age: 209
Connection: close
X-Powered-By: UKFast Webcelerator

‰PNG
  (and all the non-ascii stuff)

3
Web Server - Ask For Help / Re: The Web Folder appears to be out of date
« on: February 08, 2012, 12:06:19 PM »
I modified your template to just do it if it needs doing and forget the Errors:


    #if((%ok=0) and (%linenumber >0))
      #!Error('The "Web" folder appears to be out of Date...Starting CopyAll batch file.')
      #Run('cmd.exe /c "call copyall.bat"'),WAIT
      #! need to remake these because themes list may have changed.
      #!Error('Now running Gzipall.Bat file to compress scripts, styles and themes.')
        #Insert(%MakeThemeList)
        #Insert(%MakeGZipAll)
        #Run('cmd.exe /c "call gzipall.bat"')
      #!insert(%RunGzipall)

Still not sure why it thinks it always needs to be done.

4
Web Server - Ask For Help / Re: The Web Folder appears to be out of date
« on: January 12, 2012, 07:24:02 AM »
Found it!

To avoid clogging up the backup with clw's, map's, lib's obj's and other files that are easily regenerated, my .red file says:

*.*   =c:\Cstuff;.; %ROOT%\libsrc; %ROOT%\images; %ROOT%\template; %ROOT%\examples; %ROOT%\convsrc;%ROOT%\CPCS600;%ROOT%\CPCS600\IMAGES; C:\Clarion6\3rdParty\LibSrc

and the .bat files, both of them, land there. I think they don't run when the template tries.

So I added *.bat = .\ to my red file and the bat file runs and copies files and the gzip gzips.

It still always thinks the web folder is out of date, but it does its work, I think.


5
Web Server - Ask For Help / Re: The Web Folder appears to be out of date
« on: January 11, 2012, 10:56:43 AM »
Nope. Don't have any such bat file. How do I get one?

6
Web Server - Ask For Help / Re: The Web Folder appears to be out of date
« on: January 10, 2012, 09:26:47 AM »
Alas: Clarion 6.3

Hmm. I think I've found the problem. Where should it find the "copyall.bat"? I don't seem to have one.

7
Web Server - Ask For Help / Returning a big packet (bigger than 16KB)
« on: January 10, 2012, 09:13:41 AM »
Converting an old file-drop system into a "compatible" web system.

I have a big response to send back that looks like:


HTTP/1.0 200 OK
ContentType: text/xml; charset=utf-8
Content-Length: 16384

<?xml version="1.0"?><TeeQueryResponseFile><ScheduleResponse>
<SRUniqueID>1</SRUniqueID>
<SRDate>20120111</SRDate>
<SRReturn></SRReturn>
<TeeTimes>
<TeeTime><CourseCode>CT</CourseCode><Time>09:30</Time><Hole>1</Hole><Open>3</Open></TeeTime>
<TeeTime><CourseCode>CT</CourseCode><Time>06:28</Time><Hole>1</Hole><Open>2</Open></TeeTime>
<TeeTime><CourseCode>CT</CourseCode><Time>13:42</Time><Hole>1</Hole><Open>1</Open></TeeTime>
<TeeTime><CourseCode>CT</CourseCode><Time>17:12</Time><Hole>1</Hole><Open>4</Open></TeeTime>
<TeeTime><CourseCode>CT</CourseCode><Time>15:06</Time><Hole>1</Hole><Open>1</Open></TeeTime>
<TeeTime><CourseCode>CT</CourseCode><Time>16:02</Time><Hole>1</Hole><Open>2</Open></TeeTime>

and so on and so on for ever and ever amen.

Naturally, it's longer than 16KB.

The code to return it looks like:


TQ                   PROCEDURE  (NetWebServerWorker p_web)
loc:x          Long
packet         String(NET:MaxBinData)
packetlen      Long
CRLF           String('<13,10>')
NBSP           String('&#160;')
loc:options    String(OptionsStringLen)  ! options for jQuery calls
Loc:User            long
ThisSecwinAccess    string(252)

  CODE
  GlobalErrors.SetProcedureName('TQ')
  p_web.SetValue('_parentPage','TQ')
  p_web.publicpage = 1
  if p_web.sessionId = 0 then p_web.NewSession().
  IF FALSE
  do Header
  packet = clip(packet) & p_web.BodyOnLoad(p_web.Combine(p_web.site.bodyclass,'PageBody'),,p_web.Combine(p_web.site.bodydivclass,'PageBodyDiv'))
  do Footer
  packet = clip(packet) & p_web.Popup()
     END
  packet = WebQuery(p_web.GetValue('xml'))
  packet = 'HTTP/1.0 200 OK <13,10>ContentType: text/xml; charset=utf-8<13,10>Content-Length: ' & LEN(CLIP(packet)) &  '<13,10><13,10>' & packet

  do SendPacket
  GlobalErrors.SetProcedureName()
  Return

So it looks like I need to send it in more than one packet?

8
Web Server - Ask For Help / Re: The Web Folder appears to be out of date
« on: December 22, 2011, 08:51:09 AM »
Nettalk v6.10 (Just updated to see if that solved the problem)

Hmm. My scripts folder is empty. Should I copy from one of the example apps, or isn't the template supposed to do this when it does the error?


9
Web Server - Ask For Help / The Web Folder appears to be out of date
« on: December 21, 2011, 03:33:12 PM »
Since updating to Nettalk 6, my web folder always appears to be out of date. Also, it runs GZipall each make.

Any way to get rid of these 2 errors and just have it DO it and go on instead of popping up these errors and having to continue?

Using Clarion 6

10
Your Views and Comments / OT: Who ate the SV Newsgroups?
« on: February 01, 2011, 06:55:31 AM »
Know anything about the Softvelocity Newsgroups? Haven't let me in for 2 weeks now.

11
I've studied the soap server examples...

The server picks up the posted text from .GetValue('xml')

And sets the reply with
.ParseHTML(xmltext,1,LEN(xmltext),Net:NoHeader)

This sounds like the way I want to go, though they probably will demand something other than port 80. VP is sure you can't handle such things without IIS.

12
The requests are almost certainly coming from non-clarion as the rest of the world thinks we're all mad  :-\

In the Process method, should I use of NET:SimplePartialDataPacket instead of NET:SimpleWholeDataPacket? Is the WholeDataPacket just something you get from another nettalk program, or the normal way to receive requests from things like java, C#, python or whatever the outside program is coded in?

I'm tasked with making a server for outside vendors to send IP messages to and get responses from. Maybe I should just use GET and POST with a web server instead of a netsimple server?

13
The Rest - Ask For Help / Netsimple Server : Multi threading?
« on: November 01, 2010, 12:53:26 PM »
When a packet comes in, I get the request data:

self.WholePacketQueue.WholeBinData

and the reply IP:

self.packet.FromIP

Would it be reasonable to start a thread, put the answer to the request in some queue, and use the send method to send the response back while watching for other requests? (The boss is asking, "Can it be multi-threaded?"

Oh yes, Clarion 6.3 something. Nettalk version 4.53

Pages: [1]