XWeb:GetIndividualInformation ColdFusion Sample1
The code below is the first iteration of a successful connection to this NetForum xWeb method after successfully retrieving a token from the Authenticate method. Therefore, this code only works under the assumption that a valid token has been defined from either running the Authenticate method or by successfully extracting from another previously authenticated request. This code will successfully reset the authorization token - please note any differences in your code accordingly. All that is left undone from this point is parsing through the raw SOAP XML response.
This specific case study calls the GetIndividualInformation web method but the ideas in this sample could be applied toward other xWeb methods.
Sample Code
<!---
//////////////////////////////////////////////////////////////
// //
// author = Derek T. Versteegen //
// organization = American Academy of Pediatrics //
// date added = 10/18/2007 //
// date last modified = 10/18/2007 - DTV //
// //
// notes = code examples of consuming netFORUM baseline //
// xweb methods by way of ColdFusion Components //
// //
// dependancies = netforum_xweb.cfc //
// //
//////////////////////////////////////////////////////////////
--->
<!--- xWeb:GetIndividualInformation --->
<cfparam name="session.nfws_token" default="00000000-0000-0000-0000-000000000000">
<cfparam name="ind_cst_key" default="00000000-0000-0000-0000-000000000000">
<cfinvoke component="/xxxxxx/netforum_xweb" method="xweb_GetIndividualInformation" returnvariable="qryXML">
<cfinvokeargument name="nfws_token" value="#session.nfws_token#" omit="no">
<cfinvokeargument name="ind_cst_key" value="#ind_cst_key#" omit="no">
</cfinvoke>
<cfdump var="#session.nfws_token#" label="nfws_token">
<cfdump var="#qryXML#" label="qryXML">
This code will end up redefining the session.nfws_token variable with a new token so any successive calls to the web service will be valid.
The qryXML is a normal ColdFusion query that can be displayed using <cfoutput> or <cfloop> as with any typical database query.