We’ve been working on a ColdFusion application that uses the Omniture Web Services API. Omniture’s documentation is pretty light in this area, and the examples were not very applicable to ColdFusion. After pulling together several different blogs, docs, and some trial & error, I have created the following incantation. Hopefully it’ll save another Omniture/ColdFusion user a few minutes.
<cfsilent>
<cffunction name="getOmnitureWsseRequestHeader" access="private" returntype="Any" output="false"
hint="Return the header needed to make an Omniture web service request as a SOAPHeaderElement object">
<cfargument name="strUsername" type="String" required="true" />
<cfargument name="strSecret" type="String" required="true" />
<cfscript>
// Unique random number
var strNonce = createUUID();
// Date created in Omniture's required format
var strCreated = DateFormat(Now(),'YYYY-mm-dd H:mm:ss');
// Password encoded according to Omniture's requirements
var strPassword = ToBase64(Hash("#strNonce##strCreated##arguments.strSecret#", 'SHA').toLowerCase());
// Start to build header
var objHeader = CreateObject("java", "org.apache.axis.message.SOAPHeaderElement");
var nodeUserToken = "";
var nodePassword = "";
// Construct XML structure with code
objHeader.init("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "wsse:Security");
objHeader.setMustUnderstand(1);
objHeader.setActor("");
nodeUserToken = objHeader.addChildElement("wsse:UsernameToken");
nodeUserToken.setAttribute("wsu:Id", "User");
nodeUserToken.addChildElement("wsse:Username").setValue(arguments.strUsername);
nodePassword = nodeUserToken.addChildElement("wsse:Password");
nodePassword.setAttribute("Type", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0##PasswordDigest");
nodePassword.setValue(strPassword);
nodeUserToken.addChildElement("wsse:Nonce").setValue(strNonce);
nodeUserToken.addChildElement("wsu:Created").setValue(strCreated);
</cfscript>
<cfreturn objHeader />
</cffunction>
<cfscript>
objHeader = getOmnitureWsseRequestHeader("your-username", "your-secret-code");
objService = CreateObject("webservice", "your-omniture-wsdl-file-url");
objService.setHeader(objHeader);
</cfscript>
</cfsilent>
<cfoutput>
<p>objService.companyGetTokenCount(): #objService.companyGetTokenCount()#</p>
</cfoutput>
To use this test code, do the following:
- Copy the code to a .cfm file
- Replace “your-username” and “your-secret-code” with your Omniture web service user name & shared secret code
- Replace”your-omniture-wsdl-file-url” with the URL to your .wsdl file
- Run it — it should work!
Don’t forget to use cfdump on the objService variable to see all of the methods you can call with the API!

During the retreat the guys discussed the book The Five Dysfunctions of a Team by Patrick Lencioni, and took the team assessment associated with the book. After they reviewed their survey results, the team went over what they could work on improving as everyone was given a voice to share their ideas and opinions. Later on in the weekend they also discussed vision and plans for the future.





















