mkdjns
mkdjns

Reputation: 101

Receive XML post to Salesforce Sites page

I'm currently looking at building a lightweight integration between PivotalTracker and Salesforce.com. Reviewing this bit of PT documentation, it looks like I can do an update of Salesforce data based on PT activity. Awesome! I can't figure out how to access the XML data that is being posted however.

I can't see anything in ApexPages.CurrentPage() that looks like it will let me get to the XML. Has anyone done anything like this, without the use of an intermediate server?

Upvotes: 0

Views: 922

Answers (1)

jkraybill
jkraybill

Reputation: 3409

I think we chatted about this over Twitter last week.

AFAIK there is (somewhat annoyingly) no way to access raw (i.e. not form posted key/values) POST data via SFDC. The Apex REST service support would be the closest thing, but requires authentication and still may not do exactly what you want.

Fairly certain you'll need some sort of middle-man proxy that simply takes the XML data and posts it to VF as a form-encoded key/value pair. That is a fairly trivial thing to do, but it's an unnecessary additional moving part and will require some sort of server resource.

I would probably first investigate if PT supports any other ping mechanism, or a way to write a custom extension to convert the raw POST into a form POST.

Upvotes: 2

Related Questions