Can you writefile the incoming post ?--------------000003000109010501030603-- Associated Messages, from the most recent to the oldest:--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list
On 13/06/2011, at 2:05 PM, Olin Lagon wrote:
Thanks Stuart. It's actually reversed.--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list
A device is sending an XML doc via post to our server. I can log that post but I can't grab the contents of the post which is an XML document. As you can see in the thread, I can read the headers. The post is sending to our server. In PHP, I can grab the contents of the post with file_get_contents('php://input'). But in WebDNA there doesn't seem to be anyway to grab the contents of a post if it is not send as a series of form variables.
I checked the docs and don't see anything :(
Am starting to write this interface in PHP and call it a day.
Thanks, Olin
Stuart Tremain wrote:I think this is what you mean:
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list[text muti=F]XML_result=[tcpconnect host=www.host.com&port=443&ssl=T][!][/!][tcpsend skipheader=T]
ALL YOUR TCP CONNECT STUFF HERE
[/TCPSend][!][/!][/tcpconnect][/text]
Then just parse the resulting variable [XML_result] to get what you need.
On 13/06/2011, at 1:08 PM, Olin Lagon wrote:
Yes I can parse the XML but I can't get the contents of the post! What I need is the WebDNA equivalent of--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list
$postText = file_get_contents('php://input');
I may have to just write this in php :(
What the above code does is takes the file contents, something I can't seem to do via webdna.
Unless someone has an idea on how to grab the raw POST of an incoming post that is not set to a form variable.
Thanks! Olin
Stuart Tremain wrote:OlinIf you are receiving XML back, you will need to parse the XMLhttp://www.webdna.us/page.dna?numero=284On 13/06/2011, at 12:43 PM, Olin Lagon wrote:Aloha all, am trying to work with an API that posts an XML doc. I can get it to post but it is not setting the XML to a formvariable. Anyone know how I can grab the contents of the post?Here is the test code to show what is hitting our server[writefile log.txt]http header---------------[ListMIMEHeaders][name] = [value][/ListMIMEHeaders]form vars---------------[formvariables][name] = [value][/formvariables][/writefile]And here is the response. As you can see the form vars are empty :(Thanks! Olinhttp header---------------HOST = www.kanuhawaii.orgConnection = CloseContent-Type = application/xmlmsg-timestamp = 1307900329Content-Length = 81form vars------------------------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us. To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
. To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
. To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
Can you writefile the incoming post ?--------------000003000109010501030603-- Olin Lagon--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list
On 13/06/2011, at 2:05 PM, Olin Lagon wrote:
Thanks Stuart. It's actually reversed.--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list
A device is sending an XML doc via post to our server. I can log that post but I can't grab the contents of the post which is an XML document. As you can see in the thread, I can read the headers. The post is sending to our server. In PHP, I can grab the contents of the post with file_get_contents('php://input'). But in WebDNA there doesn't seem to be anyway to grab the contents of a post if it is not send as a series of form variables.
I checked the docs and don't see anything :(
Am starting to write this interface in PHP and call it a day.
Thanks, Olin
Stuart Tremain wrote:I think this is what you mean:
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list[text muti=F]XML_result=[tcpconnect host=www.host.com&port=443&ssl=T][!][/!][tcpsend skipheader=T]
ALL YOUR TCP CONNECT STUFF HERE
[/TCPSend][!][/!][/tcpconnect][/text]
Then just parse the resulting variable [XML_result] to get what you need.
On 13/06/2011, at 1:08 PM, Olin Lagon wrote:
Yes I can parse the XML but I can't get the contents of the post! What I need is the WebDNA equivalent of--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list
$postText = file_get_contents('php://input');
I may have to just write this in php :(
What the above code does is takes the file contents, something I can't seem to do via webdna.
Unless someone has an idea on how to grab the raw POST of an incoming post that is not set to a form variable.
Thanks! Olin
Stuart Tremain wrote:OlinIf you are receiving XML back, you will need to parse the XMLhttp://www.webdna.us/page.dna?numero=284On 13/06/2011, at 12:43 PM, Olin Lagon wrote:Aloha all, am trying to work with an API that posts an XML doc. I can get it to post but it is not setting the XML to a formvariable. Anyone know how I can grab the contents of the post?Here is the test code to show what is hitting our server[writefile log.txt]http header---------------[listmimeheaders][name] = [value][/ListMIMEHeaders]form vars---------------[formvariables][name] = [value][/formvariables][/writefile]And here is the response. As you can see the form vars are empty :(Thanks! Olinhttp header---------------HOST = www.kanuhawaii.orgConnection = CloseContent-Type = application/xmlmsg-timestamp = 1307900329Content-Length = 81form vars------------------------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us>archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us. To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
. To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
. To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
DOWNLOAD WEBDNA NOW!
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...