You need to sign in to do that
Don't have an account?
Ron Wild
Accessing Raw Post Data sent to a Visualforce Page
Does anyone know how to access the raw post data sent to a visualforce page I've exposed through Salesforce Sites?
I need to parse XML that has been posted to the page.
Thanks,
I need to parse XML that has been posted to the page.
Thanks,
If anyone else would like to see access to raw post data enabled in visualforce, please vote for it here:
http://ideas.salesforce.com/article/show/10093914/Enable_Access_to_Raw_Post_Data_in_Visualforce_Pages#skin=adn
Ron, did you have to change your Google Checkout setup to send HTML name-value pairs?
I actually have a web service method that currently handles notifications from Google Checkout and it's been working for ~6 months. I am hoping to move the endpoint Google communicates with to Sites, if possible. Currently, it goes to a PHP script on my server that captures the XML, logs into Salesforce and sends the XML to the Web Service method. The Apex Web Service method does all the actual work, but is reading XML data.
Looking at the HTML Notification API, the difference is that the data gets sent as name/value pairs in HTTP POST data. Other than that, it seems fine. I will likely just move to that and access the data using ApexPages.currentPage().getParameters('param1'). Is that what you did? If so, any gotchas (e.g. escaped characters)?
That's what I did with PaymentConnect initially, but getting customers through the install/setup process with external relay scripts
was a real headache. I switched the Google notification over to NV pairs, parsed it in the visualforce relay script and replaced the external script as soon as SF made Sites generally available. It's much easier now.
AppExchange developers can build apps on top of PaymentConnect (or just connect them) so you might want to look at that option instead
of rewriting all that code :-)
Has there been any advance in this area?
I would really like to access POST data in my Sites page.