NetTalk Central

Author Topic: How to Get Content of What is Sent to Server from p_web Object  (Read 3036 times)

David

  • Full Member
  • ***
  • Posts: 127
    • View Profile
I was using p_web.GetValue('xml'), in the WebHandler procedure, to parse incoming XML using XFiles.  However, now I want to use StringTheory and Cryptonite to compress and encrypt the data between the client and server.

Since the server wont be able to identify the data as "XML", how do I grab the information from p_web object?

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: How to Get Content of What is Sent to Server from p_web Object
« Reply #1 on: March 14, 2014, 05:46:19 AM »
Isn't xml the parameter name and not parameter data? If so it should still work.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How to Get Content of What is Sent to Server from p_web Object
« Reply #2 on: March 16, 2014, 11:57:04 PM »
Hi David,

I think perhaps your post is a bit ambiguous;

<< I was using p_web.GetValue('xml'), in the WebHandler procedure, to parse incoming XML using XFiles.

ok.

<<  However, now I want to use StringTheory and Cryptonite to compress and encrypt the data between the client and server.

you're implying that you want to encrypt the data coming from the _client_ ? So the client is not a browser, but another clarion program, using the Webclient class?

the postdata is put into another value, one called _postdata_ (and the incoming header is placed in _postheader_) so you can get it from there.

Incidentally, it gets parsed into the xml value not if it "detects it to be xml" but rather based on the content-type being text/xml or application/soap+xml
so even if the content was compressed it would still be in the xml field "as is" if the content type was set to one of those.

cheers
Bruce



David

  • Full Member
  • ***
  • Posts: 127
    • View Profile
Re: How to Get Content of What is Sent to Server from p_web Object
« Reply #3 on: March 17, 2014, 04:20:05 AM »
Thank you for your replies.... actually after Friday's NetTalk 8 announcement, and the introduction of the WebServices templates, my question has become irrelevant.  But it is good to know that the data gets moved into 'xml' based on the header information.

I am passing information between 2 Clarion programs using WebClient on the desktop app and WebServer on the server app.  Had wrote my own web services and wanted to start compressing the data during transport.