Re: [WebDNA] how can i grab the contents of a post?

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106726
interpreted = N
texte = This is a multi-part message in MIME format. --------------050007080101080901080800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This didn't work. Nothing comes in the formvariables. I think webdna can ONLY see the HTTP headers and HTTP form variables that are posted, not the actual content that was posted. No worries though. PHP worked out great for this example. Thanks tough. Wish WebDNA could grab the content. Psi Prime Inc, Matthew A Perosi wrote: > I don't know about this, but it seems the incoming file must exist as > something. > Is it possible that the incoming formvariable has a blank name? > > [formvariables] > [showif [url][name][/url]=] > [writefile secure=F&file=xmlfile][value][/writefile] > [/showif] > [/formvariables] > > -Matt > > On 6/13/2011 12:47 AM, Olin Lagon wrote: >> Thanks. I tried that. Formvariables comes up completely blank...no >> form vars being sent. It's just the file. I got the server running >> off php to grab the contents then send it to a webdna as a http post >> so I can grab the XML and log to the database. I appreciate the >> effort to help! >> >> Stuart Tremain wrote: >>> If a file is being sent via HTTP post you could try this >>> >>> [formvariables] >>> [Showif [Url][name][/Url]^[Url]filename="[/Url]] >>> [WriteFile Secure=F&File=[Url][fileName][/Url]][value][/WriteFile] >>> [/ShowIf] >>> [/formvariables] >>> >>> >>> >>> >>> On 13/06/2011, at 2:31 PM, Olin Lagon wrote: >>> >>>> That would be nice but I have no idea what to put inside the >>>> [writefile] commands to grab the contents of the post. I tried a >>>> bunch of names hoping for some undocumented way to accomplish this. >>>> >>>> Stuart Tremain wrote: >>>>> Can you writefile the incoming post ? >>>>> >>>>> On 13/06/2011, at 2:05 PM, Olin Lagon wrote: >>>>> >>>>>> Thanks Stuart. It's actually reversed. >>>>>> >>>>>> 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: >>>>>>> >>>>>>> >>>>>>> >>>>>>> [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 >>>>>>>> >>>>>>>> $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: >>>>>>>>> Olin >>>>>>>>> >>>>>>>>> If you are receiving XML back, you will need to parse the XML >>>>>>>>> >>>>>>>>> http://www.webdna.us/page.dna?numero=284 >>>>>>>>> >>>>>>>>> >>>>>>>>> On 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! Olin >>>>>>>>>> >>>>>>>>>> http header >>>>>>>>>> --------------- >>>>>>>>>> HOST =www.kanuhawaii.org >>>>>>>>>> Connection = Close >>>>>>>>>> Content-Type = application/xml >>>>>>>>>> msg-timestamp = 1307900329 >>>>>>>>>> Content-Length = 81 >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> form vars >>>>>>>>>> --------------- >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> --------------------------------------------------------- >>>>>>>>>> This message is sent to you because you are subscribed to >>>>>>>>>> the mailing list. >>>>>>>>>> To unsubscribe, E-mail to: >>>>>>>>>> archives:http://mail.webdna.us/list/talk@webdna.us >>>>>>>>>> Bug Reporting:support@webdna.us >>>>>>>>> >>>>>>>>> --------------------------------------------------------- >>>>>>>>> This message is sent to you because you are subscribed to >>>>>>>>> the mailing list. >>>>>>>>> To unsubscribe, E-mail to: >>>>>>>>> archives:http://mail.webdna.us/list/talk@webdna.us >>>>>>>>> Bug Reporting:support@webdna.us >>>>>>>> --------------------------------------------------------- This >>>>>>>> message is sent to you because you are subscribed to the >>>>>>>> mailing list . To unsubscribe, E-mail to: archives: >>>>>>>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>>>>>>> support@webdna.us >>>>>>> >>>>>>> --------------------------------------------------------- This >>>>>>> message is sent to you because you are subscribed to the mailing >>>>>>> list . To unsubscribe, E-mail to: archives: >>>>>>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>>>>>> support@webdna.us >>>>>> --------------------------------------------------------- This >>>>>> message is sent to you because you are subscribed to the mailing >>>>>> list . To unsubscribe, E-mail to: archives: >>>>>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>>>>> support@webdna.us >>>>> >>>>> --------------------------------------------------------- This >>>>> message is sent to you because you are subscribed to the mailing >>>>> list . To unsubscribe, E-mail to: archives: >>>>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>>>> support@webdna.us >>>> --------------------------------------------------------- This >>>> message is sent to you because you are subscribed to the mailing >>>> list . To unsubscribe, E-mail to: archives: >>>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>>> support@webdna.us >>> >>> --------------------------------------------------------- This >>> message is sent to you because you are subscribed to the mailing >>> list . To unsubscribe, E-mail to: archives: >>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>> support@webdna.us >> --------------------------------------------------------- This >> message is sent to you because you are subscribed to the mailing list >> . To unsubscribe, E-mail to: archives: >> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >> support@webdna.us > > -- > Matthew A Perosi > Corporate Consultant > Mobile Marketing Expert > Senior Web Developer > SEO Analyst& Educator > > Psi Prime, Inc. > 323 Union Blvd. > Totowa, NJ 07512 > > Service: 973.413.8211 > Training: 973.413.8214 > Fax: 973.413.8217 > > http://www.perosi.com > --------------------------------------------------------- This message > is sent to you because you are subscribed to the mailing list . To > unsubscribe, E-mail to: archives: > http://mail.webdna.us/list/talk@webdna.us Bug Reporting: > support@webdna.us --------------050007080101080901080800 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit This didn't work. Nothing comes in the formvariables. I think webdna can ONLY see the HTTP headers and HTTP form variables that are posted, not the actual content that was posted. No worries though. PHP worked out great for this example. Thanks tough. Wish WebDNA could grab the content.

Psi Prime Inc, Matthew A Perosi wrote:
I don't know about this, but it seems the incoming file must exist as something.
Is it possible that the incoming formvariable has a blank name?

[formvariables]
[showif [url][name][/url]=]
[writefile secure=F&file=xmlfile][value][/writefile]
[/showif]
[/formvariables]

-Matt

On 6/13/2011 12:47 AM, Olin Lagon wrote:
Thanks. I tried that. Formvariables comes up completely blank...no form vars being sent. It's just the file. I got the server running off php to grab the contents then send it to a webdna as a http post so I can grab the XML and log to the database. I appreciate the effort to help!

Stuart Tremain wrote:
If a file is being sent via HTTP post you could try this

[formvariables]
[Showif [Url][name][/Url]^[Url]filename="[/Url]]
[WriteFile Secure=F&File=[Url][fileName][/Url]][value][/WriteFile]
[/ShowIf]
[/formvariables]




On 13/06/2011, at 2:31 PM, Olin Lagon wrote:

That would be nice but I have no idea what to put inside the [writefile] commands to grab the contents of the post. I tried a bunch of names hoping for some undocumented way to accomplish this.

Stuart Tremain wrote:
Can you writefile the incoming post ?

On 13/06/2011, at 2:05 PM, Olin Lagon wrote:

Thanks Stuart. It's actually reversed.

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:



[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

        $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
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
-- Matthew A PerosiCorporate ConsultantMobile Marketing ExpertSenior Web DeveloperSEO Analyst & EducatorPsi Prime, Inc.323 Union Blvd.Totowa, NJ 07512Service:   973.413.8211Training:  973.413.8214Fax:       973.413.8217http://www.perosi.com
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us --------------050007080101080901080800-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] how can i grab the contents of a post? ("Brian B. Burton" 2011)
  2. Re: [WebDNA] how can i grab the contents of a post? (Aaron Michael Kaczmarek 2011)
  3. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  4. Re: [WebDNA] how can i grab the contents of a post? (Aaron Michael Kaczmarek 2011)
  5. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  6. Re: [WebDNA] how can i grab the contents of a post? ("Psi Prime Inc, Matthew A Perosi " 2011)
  7. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  8. Re: [WebDNA] how can i grab the contents of a post? ("Psi Prime Inc, Matthew A Perosi " 2011)
  9. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  10. Re: [WebDNA] how can i grab the contents of a post? (Stuart Tremain 2011)
  11. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  12. Re: [WebDNA] how can i grab the contents of a post? (Stuart Tremain 2011)
  13. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  14. Re: [WebDNA] how can i grab the contents of a post? (Stuart Tremain 2011)
  15. Re: [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
  16. Re: [WebDNA] how can i grab the contents of a post? (Stuart Tremain 2011)
  17. [WebDNA] how can i grab the contents of a post? (Olin Lagon 2011)
This is a multi-part message in MIME format. --------------050007080101080901080800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This didn't work. Nothing comes in the formvariables. I think webdna can ONLY see the HTTP headers and HTTP form variables that are posted, not the actual content that was posted. No worries though. PHP worked out great for this example. Thanks tough. Wish WebDNA could grab the content. Psi Prime Inc, Matthew A Perosi wrote: > I don't know about this, but it seems the incoming file must exist as > something. > Is it possible that the incoming formvariable has a blank name? > > [formvariables] > [showif [url][name][/url]=] > [writefile secure=F&file=xmlfile][value][/writefile] > [/showif] > [/formvariables] > > -Matt > > On 6/13/2011 12:47 AM, Olin Lagon wrote: >> Thanks. I tried that. Formvariables comes up completely blank...no >> form vars being sent. It's just the file. I got the server running >> off php to grab the contents then send it to a webdna as a http post >> so I can grab the XML and log to the database. I appreciate the >> effort to help! >> >> Stuart Tremain wrote: >>> If a file is being sent via HTTP post you could try this >>> >>> [formvariables] >>> [Showif [url][name][/Url]^[url]filename="[/Url]] >>> [WriteFile Secure=F&File=[url][fileName][/Url]][value][/WriteFile] >>> [/ShowIf] >>> [/formvariables] >>> >>> >>> >>> >>> On 13/06/2011, at 2:31 PM, Olin Lagon wrote: >>> >>>> That would be nice but I have no idea what to put inside the >>>> [writefile] commands to grab the contents of the post. I tried a >>>> bunch of names hoping for some undocumented way to accomplish this. >>>> >>>> Stuart Tremain wrote: >>>>> Can you writefile the incoming post ? >>>>> >>>>> On 13/06/2011, at 2:05 PM, Olin Lagon wrote: >>>>> >>>>>> Thanks Stuart. It's actually reversed. >>>>>> >>>>>> 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: >>>>>>> >>>>>>> >>>>>>> >>>>>>> [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 >>>>>>>> >>>>>>>> $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: >>>>>>>>> Olin >>>>>>>>> >>>>>>>>> If you are receiving XML back, you will need to parse the XML >>>>>>>>> >>>>>>>>> http://www.webdna.us/page.dna?numero=284 >>>>>>>>> >>>>>>>>> >>>>>>>>> On 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! Olin >>>>>>>>>> >>>>>>>>>> http header >>>>>>>>>> --------------- >>>>>>>>>> HOST =www.kanuhawaii.org >>>>>>>>>> Connection = Close >>>>>>>>>> Content-Type = application/xml >>>>>>>>>> msg-timestamp = 1307900329 >>>>>>>>>> Content-Length = 81 >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> form vars >>>>>>>>>> --------------- >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> --------------------------------------------------------- >>>>>>>>>> This message is sent to you because you are subscribed to >>>>>>>>>> the mailing list. >>>>>>>>>> To unsubscribe, E-mail to: >>>>>>>>>> archives:http://mail.webdna.us/list/talk@webdna.us >>>>>>>>>> Bug Reporting:support@webdna.us >>>>>>>>> >>>>>>>>> --------------------------------------------------------- >>>>>>>>> This message is sent to you because you are subscribed to >>>>>>>>> the mailing list. >>>>>>>>> To unsubscribe, E-mail to: >>>>>>>>> archives:http://mail.webdna.us/list/talk@webdna.us >>>>>>>>> Bug Reporting:support@webdna.us >>>>>>>> --------------------------------------------------------- This >>>>>>>> message is sent to you because you are subscribed to the >>>>>>>> mailing list . To unsubscribe, E-mail to: archives: >>>>>>>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>>>>>>> support@webdna.us >>>>>>> >>>>>>> --------------------------------------------------------- This >>>>>>> message is sent to you because you are subscribed to the mailing >>>>>>> list . To unsubscribe, E-mail to: archives: >>>>>>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>>>>>> support@webdna.us >>>>>> --------------------------------------------------------- This >>>>>> message is sent to you because you are subscribed to the mailing >>>>>> list . To unsubscribe, E-mail to: archives: >>>>>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>>>>> support@webdna.us >>>>> >>>>> --------------------------------------------------------- This >>>>> message is sent to you because you are subscribed to the mailing >>>>> list . To unsubscribe, E-mail to: archives: >>>>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>>>> support@webdna.us >>>> --------------------------------------------------------- This >>>> message is sent to you because you are subscribed to the mailing >>>> list . To unsubscribe, E-mail to: archives: >>>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>>> support@webdna.us >>> >>> --------------------------------------------------------- This >>> message is sent to you because you are subscribed to the mailing >>> list . To unsubscribe, E-mail to: archives: >>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >>> support@webdna.us >> --------------------------------------------------------- This >> message is sent to you because you are subscribed to the mailing list >> . To unsubscribe, E-mail to: archives: >> http://mail.webdna.us/list/talk@webdna.us Bug Reporting: >> support@webdna.us > > -- > Matthew A Perosi > Corporate Consultant > Mobile Marketing Expert > Senior Web Developer > SEO Analyst& Educator > > Psi Prime, Inc. > 323 Union Blvd. > Totowa, NJ 07512 > > Service: 973.413.8211 > Training: 973.413.8214 > Fax: 973.413.8217 > > http://www.perosi.com > --------------------------------------------------------- This message > is sent to you because you are subscribed to the mailing list . To > unsubscribe, E-mail to: archives: > http://mail.webdna.us/list/talk@webdna.us Bug Reporting: > support@webdna.us --------------050007080101080901080800 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit This didn't work. Nothing comes in the formvariables. I think webdna can ONLY see the HTTP headers and HTTP form variables that are posted, not the actual content that was posted. No worries though. PHP worked out great for this example. Thanks tough. Wish WebDNA could grab the content.

Psi Prime Inc, Matthew A Perosi wrote:
I don't know about this, but it seems the incoming file must exist as something.
Is it possible that the incoming formvariable has a blank name?

[formvariables]
[showif [url][name][/url]=]
[writefile secure=F&file=xmlfile][value][/writefile]
[/showif]
[/formvariables]

-Matt

On 6/13/2011 12:47 AM, Olin Lagon wrote:
Thanks. I tried that. Formvariables comes up completely blank...no form vars being sent. It's just the file. I got the server running off php to grab the contents then send it to a webdna as a http post so I can grab the XML and log to the database. I appreciate the effort to help!

Stuart Tremain wrote:
If a file is being sent via HTTP post you could try this

[Showif [url][name][/Url]^[url]filename="[/Url]]
[WriteFile Secure=F&File=[url][fileName][/Url]][value][/WriteFile]
[/ShowIf]
[/formvariables]




On 13/06/2011, at 2:31 PM, Olin Lagon wrote:

That would be nice but I have no idea what to put inside the [writefile] commands to grab the contents of the post. I tried a bunch of names hoping for some undocumented way to accomplish this.

Stuart Tremain wrote:
Can you writefile the incoming post ?

On 13/06/2011, at 2:05 PM, Olin Lagon wrote:

Thanks Stuart. It's actually reversed.

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:



[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

        $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
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
-- Matthew A PerosiCorporate ConsultantMobile Marketing ExpertSenior Web DeveloperSEO Analyst & EducatorPsi Prime, Inc.323 Union Blvd.Totowa, NJ 07512Service:   973.413.8211Training:  973.413.8214Fax:       973.413.8217http://www.perosi.com
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us --------------050007080101080901080800-- Olin Lagon

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

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...

Related Readings:

Mac: LModelDirector bug fix (1997) suffix mapping for NT? (1997) Projects & Contractors (1997) [WebDNA] Uploading Specific File Types (2009) best way to limit # of attempts to login to protected page? (2000) emailer (1997) Opinion: [input] should be called [output] ... (1997) Q: Japanese Kanji code support? (2000) Locking up with WebCatalog... (1997) Wanted: More Math Functions (or, Can You Solve This?) (1997) Removing [showif] makes a big difference in speed (1997) $Replace with [founditems] (1997) reservation program (2000) Error with [applescript] (1999) WebCat2b12 CGI Mac -- Problems propagating the cart through frames...still (1997) [removelineitem] not quite working inside [formvariables] loop (2001) WebMerchant/MacAuthorize (1998) There's a bug in the math context ... (1997) [WebDNA] Sorry WebDNA server not running. (2008) RE: WebDNA-Talk searchable? (1997)