Listing 1:
<cfscript>
//serviceURL = attributes.serviceURL;
serviceURL = "http://ww6.borland.com/webservices/BorlandBabel/
BorlandBabel.exe/wsdl/IBorlandBabel";
serviceData = structNew();
</cfscript>
<!--- // get WSDL File --->
<cfhttp url="#serviceURL#" method="GET" resolveurl="false">
<!--- // create CFML XML document --->
<cfset wsdl = xmlParse("#cfhttp.fileContent#")>
<cfscript>
// test for RPC validity
str = "//*[contains(name(), 'binding')][@style='rpc']";
rpcArray = XMLSearch(wsdl, str); 
if ( arrayLen(rpcArray) )
{
// discover service name
str = "//*[contains(name(), 'service')]";
serviceArray = XMLSearch(wsdl, str);
if( arrayLen(serviceArray) )
serviceName = serviceArray[1].XMLAttributes.name;

// discover the methods
str = "//*[contains(name(), 'binding')]/*[contains(name(), 
'operation')][@name]";
methodArray = XMLSearch(wsdl, str);
// for each method returned get the properties for this method
for( i=1; i lte arrayLen(methodArray); i=i+1 )
{
mStruct = methodArray[i];
// method name
methodName = mStruct.XMLAttributes.name;
// write some code here to store this off into DB or wherever
[methodId = storeMethod(methodName);]
// discover the children nodes which will be our input,
output and fault codes
str = "//*[contains(name(), 'binding')]/*[contains(name(), 'operation')][@name='#methodName#']/*";
mDetailsArray = XMLSearch(wsdl, str);
for( j=1; j lte arrayLen(mDetailsArray); j=j+1 )
{
param = mDetailsArray[j];
paramName = param.XMLName;
// store these with the service [messageId =
storeMessage(methodId, paramName);] 
// discover the internal reference for each message
str = "//*[contains(name(), 'portType')]/*[contains(name(), 'operation')]

[@name='#methodName#']/*[contains(name(), '#paramName#')]";
portData = XMLSearch(wsdl, str);
// if we have a port definition
if( arrayLen(portData) gt 0)
{
ref = listLast(portData[1].XMLAttributes.message, ":");
// discover the datatypes with the internal reference to the message element
str = "//*[contains(name(), 'message')][@name='#ref#']/*";
partArray = XMLSearch(wsdl, str);
dump(partArray);
// for each message discover it's parts (if any)
for( c=1; c lte arrayLen(partArray); c=c+1 )
{
part = partArray[c];
partName = part.XMLAttributes.Name;
partType = listLast(part.XMLAttributes.Type, ":");
// store each of these with the message data for this method 
}
}else // we did not have a port definition
msg = "No port defined";
}

}else // we do not have a valid RPC Style service
msg = "Not a valid RPC Style Web service";
</cfscript>