Re: Post command
Hi Alain, Le 1 mai 04, à 02:41, Alain Farmer a écrit : Hello, I need help, folks. I have been creating a MetaCard stack that submits to a server-side PHP program. The payload of the post cmd is of type text/xml and, specifically, it is the XML that an XML-RPC program expects. The above submit works fine, and the server-side program returns what it is supposed to, b-u-t ... and here's the problem ... when the content is lengthy, my client-side stack does NOT wait long enough for the whole reply, and breaks-off the HTTP connection too soon. What do I need to do to make my MC client WAIT for the server-side program to complete the transmission of its reply? Should I be using the urlStatus function? I use this kind of POST method handler without problem all the time to access server-sided Rev or MC apps trough Apache and a PHP sockets listener/port translator. The first below line is important : set httpheaders to Content-type: application/x-www-form-urlencoded return Try to see if you can pick somthing usable from the example code below... on adddatas if (fld citation of card 1 of stack ccitalis is not * \ and fld citation of card 1 of stack ccitalis is not \ and fld citation of card 1 of stack ccitalis is not Saisir ici la nouvelle citation... \ and fld citation of card 1 of stack ccitalis is not Saisir ici les extraits de citation (mots-clés et/ou expressions littérales - utiliser quote + quote comme item de concaténation) entrant dans la sélection de recherche...) \ and (fld auteur__ of card 1 of stack ccitalis is not * \ and fld auteur__ of card 1 of stack ccitalis is not \ and fld auteur__ is not Saisir ici le nom de l'auteur... \ and fld auteur__ of card 1 of stack ccitalis is not Saisir ici les noms d'auteurs (utiliser quote + quote comme item de concaténation) entrant dans la sélection de recherche...) \ and (fld concept_ of card 1 of stack ccitalis is not * \ and fld concept_ of card 1 of stack ccitalis is not \ and fld concept_ of card 1 of stack ccitalis is not Saisir ici le concept de référence... \ and fld concept_ of card 1 of stack ccitalis is not Saisir ici le concept entrant dans la sélection de recherche...) then put ci001=FE8END= into retour set httpheaders to Content-type: application/x-www-form-urlencoded return post retour to url (fld csrecents of cd 2 of stack ccitalis) if it is then answer La connexion avec le serveur distant est rompue. return return \ Vérifiez votre configuration d'accès à l'internet exit adddatas end if if lineoffset(word 1 to -1 of fld slogin of cd 2 of stack ccitalis ¶ word 1 to -1 of fld smdp of cd 2 of stack ccitalis ¶,macoscharset(it)) is not 0 then put |TI1= fld citation \ |TI2= fld auteur__ \ |TI3= fld titre___ \ |TI4= fld date \ |TI5= fld concept_ \ |TI6= fld comment_ \ |IDC= encef(word 1 to -1 of fld slogin of cd 2 of stack ccitalis) \ |VAL= encef(word 1 to -1 of fld smdp of cd 2 of stack ccitalis) into larequete put isocharset(larequete) into larequete replace with ¶ in larequete replace | with in larequete put ci001=FN1 urlencode(larequete) END= into retour set httpheaders to Content-type: application/x-www-form-urlencoded return post retour to url (fld csrecents of cd 2 of stack ccitalis) if it is then answer La connexion avec le serveur distant est rompue. return return \ Vérifiez votre configuration d'accès à l'internet return avant de poursuivre. return return \ (succès des tests de 0% en 0 secondes) exit adddatas else answer it else answer Vous devez vous authentifier comme utilisateur return habilité à la saisie avant de pouvoir proposer de nouvelles citations ! else answer Saisissez, au minimum, une citation un auteur et un concept, SVP ! end adddatas If the server side of your app is a MC/Rev Stack or Script, it's important to add the below line of code to the on preopenstack or on startup handlers : set the socketTimeoutInterval to 10 Such kind of requests runs without troubble. In about testing the limits of the method (MC/Rev client app, Apache + PHP + MC app server + PostgreSQL back-end), it's able to let the client receive up to 16 Mo of datas peer query trough a 10 Mbits LAN... Hope this will help, Kind Regards, Pierre Btw, this XMLRPC stack will be shared with the community and will, therefore, help a *LOT* of people; notably the Rev and Pan wikis, not to mention a school commission, a network of consultants, the lab I work for, etc. So please help me if you can, Alain F __ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover
Post command
Hello, I need help, folks. I have been creating a MetaCard stack that submits to a server-side PHP program. The payload of the post cmd is of type text/xml and, specifically, it is the XML that an XML-RPC program expects. The above submit works fine, and the server-side program returns what it is supposed to, b-u-t ... and here's the problem ... when the content is lengthy, my client-side stack does NOT wait long enough for the whole reply, and breaks-off the HTTP connection too soon. What do I need to do to make my MC client WAIT for the server-side program to complete the transmission of its reply? Should I be using the urlStatus function? Btw, this XMLRPC stack will be shared with the community and will, therefore, help a *LOT* of people; notably the Rev and Pan wikis, not to mention a school commission, a network of consultants, the lab I work for, etc. So please help me if you can, Alain F __ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: that pesky post command - version problem
| | You don't need, Sadhu, to rebuild all the app if you stick the commun | part of it in a first stack and the issue-specific part of it in a | second stack. You can even set each one as the substack of the other and | get them working together in using the start using command or a simple | send message to an object set in the second or substack ;) | Hi Pierre, Good idea. I did eliminate the version dependencies in the code, the only one really was the 'split' command. Seems I have MC 2.3 on my wife's Linux box, and 2.4.3 on my PC, and in this case the path of least resistance was to just rebuild the application. As previously mentioned RH 6.2 does not support MC 2.4.3. I had this code in at first split this_line by | put this_line[1] into field title put this_line[2] into field contents I changed it to this so as to work with both versions put offset(|, this_line) into pipeOff put char 1 to pipeOff of this_line into field title put char pipeOff + 1 to length(this_line) of this_line into field contents So the majority of the common part is the main stack script file and that indeed is identical. But what I found is that even removing all the resources, putting a 2.4.3 stack file from Windows onto the Linux box and trying to run it under 2.3 or even 2.4 it would not run, and the problem was somewhere in the interpreter code. In other words, trying to run it under the IDE the exception handler I think it's called came up and showed me where the problem was, and it was not in my code, it was in the interpreter. So trying to figure out what was causing that could have been .. ah .. 'trying' .. wherease, just building up the one card UI was a snap, drag and drop a few fields, didn't take long! Anyway, the good news is the application works on both Linux and Windows now, no more problem with the post command. Pretty much any changes I make in the future will be in the main stack script and again, that is portable, so I can just copy it over to the Linux machine and save it under the IDE there. No problem. BTW, I have some documentation and sample stack to send you. I'd post to the list but I think mailman won't accept attachments. Sadhu ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: that pesky post command - version problem
Allo Sadhu, | | You don't need, Sadhu, to rebuild all the app if you stick the commun | part of it in a first stack and the issue-specific part of it in a | second stack. You can even set each one as the substack of the other and | get them working together in using the start using command or a simple | send message to an object set in the second or substack ;) | Hi Pierre, Good idea. I did eliminate the version dependencies in the code, the only one really was the 'split' command. Seems I have MC 2.3 on my wife's Linux box, and 2.4.3 on my PC, and in this case the path of least resistance was to just rebuild the application. As previously mentioned RH 6.2 does not support MC 2.4.3. I had this code in at first split this_line by | put this_line[1] into field title put this_line[2] into field contents I changed it to this so as to work with both versions put offset(|, this_line) into pipeOff put char 1 to pipeOff of this_line into field title put char pipeOff + 1 to length(this_line) of this_line into field contents So the majority of the common part is the main stack script file and that indeed is identical. But what I found is that even removing all the resources, putting a 2.4.3 stack file from Windows onto the Linux box and trying to run it under 2.3 or even 2.4 it would not run, and the problem was somewhere in the interpreter code. In other words, trying to run it under the IDE the exception handler I think it's called came up and showed me where the problem was, and it was not in my code, it was in the interpreter. So trying to figure out what was causing that could have been .. ah .. 'trying' .. wherease, just building up the one card UI was a snap, drag and drop a few fields, didn't take long! Anyway, the good news is the application works on both Linux and Windows now, no more problem with the post command. Pretty much any changes I make in the future will be in the main stack script and again, that is portable, so I can just copy it over to the Linux machine and save it under the IDE there. No problem. BTW, I have some documentation and sample stack to send you. I'd post to the list but I think mailman won't accept attachments. Sadhu ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard That's a great piece of stuff and docs you did, Friend ! Thank's a lot :-) I just read the how-to.html file posted to the ftp://crdp.intereduc.net ftp site and it's realy the joker piece we needed. Thank's again for that. After reading your how-to, it will become realy easy to switch to the MCtoPG solution... I will switch my next apps to mc 2.43 linux in just some more weeks (a new server is coming...) and i will no more use MC 2.32, even on the actual installed production servers. I will probably have to run some other new apps on the xserve platform (one of my clients use four xserve boxes) and i will let you know how this works on this jaguar server platform (probably fine...). IBTW : Is Pierre Shores my real life name and, Pierre Sahores my pseudo ? I don't remember anymore ;))) Thanks again, Sadhu. We are at the begining of something realy great for the mc community, yet... For sure ! -- Kind Regards, Pierre Sahores Inspection académique de Seine-Saint-Denis. Applications et bases de données WEB et VPN Qualifier et produire l'avantage compétitif ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: POST Command (It worked!!!)
Thanks Dave Cragg and Tariel Gogoberidze, Setting the socketTimeOutInterval to 3 allowed me to download all of the records from my FM database in one shot. Why it is required for this particular database and not other, bigger ones I'm running, I don't know. But it works, by golly! Thanks again, Greg On Saturday, February 1, 2003, at 01:07 AM, [EMAIL PROTECTED] wrote: Message: 2 Date: Fri, 31 Jan 2003 17:11:51 + To: [EMAIL PROTECTED] From: Dave Cragg [EMAIL PROTECTED] Subject: Re: POST Command Reply-To: [EMAIL PROTECTED] At 11:42 am -0500 31/1/03, Gregory Lypny wrote: Hi Dave, Thanks for responding. Yes, I have checked the result function after the post, and it is always empty. If I omit the CDML tag -Max=All from my post, I immediately get the default 25 records returned. And curiously, when I transfer the database to my local Mac and post to localhost, as I mentioned, all records are, in fact, returned. To check if it's just a timeout, try increasing the socketTimeoutInterval. The default is 1 (milliseconds). Try setting it to 3. ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
POST Command
Hello Everyone, I'm using the POST command to download records from an online FileMaker database. The problem I'm having is that no data is returned in the variable *it* when I specify *all* (for finding all records) in my url expression. This doesn't happen with all my FM databases, and I'm usually able to download all records, often in the hundreds, without a glitch. For the problem databases, I can specify a specific number, say, ten, and it works; after that, 20 will work, then 30. But won't return any data when I specify more than 40 (and there are, in fact, about 150 records). I'm guessing that FileMaker delays returning any data if it has to do some indexing first, MC then pulls down nothing, and the handler runs through much more quickly then when there is data returned. Is there a command or setting I can use that will cause MC to wait longer for FileMaker to respond? I've tried to use libUrlSetLogField to get more information but I'm not sure what I should be looking for. Regards, Greg Gregory Lypny Associate Professor John Molson School of Business Concordia University _ A hard C is better than a soft A. - Bill Cosby http://pareto.concordia.ca ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
POST Command (another bit)
Hi again everyone, I had just sent the message below concerning the POST command and FileMaker. I forgot to mention that when I transfer the database to my local machine and post to localhost, there's no problem. Again, as I discuss below, I wonder whether MC is not jumping the gun and returning no data before FileMaker has had a chance to feed it any. Greg Hello Everyone, I'm using the POST command to download records from an online FileMaker database. The problem I'm having is that no data is returned in the variable *it* when I specify *all* (for finding all records) in my url expression. This doesn't happen with all my FM databases, and I'm usually able to download all records, often in the hundreds, without a glitch. For the problem databases, I can specify a specific number, say, ten, and it works; after that, 20 will work, then 30. But won't return any data when I specify more than 40 (and there are, in fact, about 150 records). I'm guessing that FileMaker delays returning any data if it has to do some indexing first, MC then pulls down nothing, and the handler runs through much more quickly then when there is data returned. Is there a command or setting I can use that will cause MC to wait longer for FileMaker to respond? I've tried to use libUrlSetLogField to get more information but I'm not sure what I should be looking for. Regards, Greg ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: POST Command
Hi Dave, Thanks for responding. Yes, I have checked the result function after the post, and it is always empty. If I omit the CDML tag -Max=All from my post, I immediately get the default 25 records returned. And curiously, when I transfer the database to my local Mac and post to localhost, as I mentioned, all records are, in fact, returned. Regards, Greg On Friday, January 31, 2003, at 09:11 AM, [EMAIL PROTECTED] wrote: Message: 12 Date: Fri, 31 Jan 2003 14:05:29 + To: [EMAIL PROTECTED] From: Dave Cragg [EMAIL PROTECTED] Subject: Re: POST Command Reply-To: [EMAIL PROTECTED] At 8:28 am -0500 31/1/03, Gregory Lypny wrote: Hello Everyone, I'm using the POST command to download records from an online FileMaker database. The problem I'm having is that no data is returned in the variable *it* when I specify *all* (for finding all records) in my url expression. This doesn't happen with all my FM databases, and I'm usually able to download all records, often in the hundreds, without a glitch. For the problem databases, I can specify a specific number, say, ten, and it works; after that, 20 will work, then 30. But won't return any data when I specify more than 40 (and there are, in fact, about 150 records). I'm guessing that FileMaker delays returning any data if it has to do some indexing first, MC then pulls down nothing, and the handler runs through much more quickly then when there is data returned. Is there a command or setting I can use that will cause MC to wait longer for FileMaker to respond? I've tried to use libUrlSetLogField to get more information but I'm not sure what I should be looking for. Did you check the result function after the post command? This should give you a hint if the problem is on the server end. e.g post whatever to url whatever if the result is not empty then answer the result If the result is empty, then it looks like the problem is at the client end. Before speculating on possible causes, can you confirm that the result is in fact empty? Cheers Dave ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: POST Command
At 11:42 am -0500 31/1/03, Gregory Lypny wrote: Hi Dave, Thanks for responding. Yes, I have checked the result function after the post, and it is always empty. If I omit the CDML tag -Max=All from my post, I immediately get the default 25 records returned. And curiously, when I transfer the database to my local Mac and post to localhost, as I mentioned, all records are, in fact, returned. To check if it's just a timeout, try increasing the socketTimeoutInterval. The default is 1 (milliseconds). Try setting it to 3. What is logged when you use libUrlSetLogField? It should show the http headers returned by the server. I've only used Filemaker's xml features (different from CDML I think), but I guess the format should be similar. Here, the headers look something like this: HTTP/1.1 200 OK Date: Fri, 31 Jan 2003 16:19:28 GMT Server: FileMakerPro/5.5v2 WebCompanion/5.5v3 MIME-Version: 1.0 Transfer-Encoding: chunked Content-Type: text/xml; charset=utf-8 Expires: Tue, 12 Nov 1963 00:36:00 GMT Anything significantly different in your case? In particular, is there a Content-Length or Transfer-Encoding field? Cheers Dave ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard