Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sample code for foxisapi server
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00979747
Message ID:
00980016
Views:
31
Thanks Claude -
I know the WWC (and AFP too!) will have a learning curve. You should see the specs for application - it's all Java JSP and Apache (DOM). I got the DOM moved to MSXML - the "tree" has "sequencing rules" that I need to understand - and my hope was to develop the "logic" with something I am comfortable with and then move it to an ASP engine.

In my hello world COM (thanks rick) I have an output function. Could the COM return a URL - or would it works best if the COM simply "FILETOSTR" the page at the end of the URL. I guess the Java Script would be an easy CGI like response.

Here is the code - I guess I will check the docs - but could a url be substituted for the string below?
FUNCTION Test
LPARAMETER lcFormVars, lcIniFile, lnReleaseFlag
LOCAL lcOutput
STRTOFILE([TEST|]+DTOS(DATE())+[|]+TIME()+[|]+lcformvars+[|]+lcIniFile+[|]+STR(lnReleaseFlag,1)+[|]+CR,"TESTISAPI.TXT",1)
*** HTTP header - REQUIRED on each request!

lcOutput="HTTP/1.0 200 OK"+CR+;
         "Content-type: text/html"+CR+CR

lcOutput=lcOutput+;
   "<HTML><BODY>"+CR+;
   "<H1>Hello World Test Function Seventh Edit</H1><HR>"+CR+;
   "This page was generated by Visual FoxPro...<HR>"+CR+;
   "</HTML></BODY>"
RETURN lcOutput
>You're actually looking at more work with FOXISAPI than just calling a vfp mtdll from asp.net/asp(which I would recommend for simplicity and power). There are some examples in the vfp docs for foxisapi but MS has said publicly that they don't support it, so, why go down that road. West-Wind uses the same (or very similar) technology as the old MS examples but improves upon them. File-based WWC is like the MS Query server while WWC COM servers are an improvement to foxisapi. And there is a pretty good learning curve to WWC so whipping out a quick app that does what you want will be a challenge if you have no experience with it...
>
>>I am modeling server behavior and hope to use a light weight service to look at server data and return Java Script and urls to a browser client. I have looked at some stuff on MSDN. Any URLS or advice appreciated. ASP may be part of the final solution - but right now a light weight [all] VFP COM (for localhost) would be great.
>>
>>Thanks
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform