Tuesday, May 27, 2008

Ariba Supplier Network and ColdFusion

This is more of an aide-memoire, but others might find it useful.

We are currently integrating our website with the Ariba Supplier Network. The ASN sends CXML messages to a configured web-page. Picking up these messages, however, is not as simple as just looking for a FORM post variable. You need to use the following, or similar:

<cfset var local = structNew()>

<cfset local.context = getHttpRequestData()>
<cfset local.xml = xmlParse(local.context.content)>

You'd need to wrap this in a cffunction for the "var local" bit to work.

This will leave you with the variable local.xml as an XML-type variable.

No comments: