I'm relatively new to developing CFCs, but I've searched through the newsgroups and
I've been unable to discover a way to create this WSDL structure in coorespondence
with a standard I'm attempting to implement:
<element name="SearchResult" nillable="true" type="impl:SearchResult" />
<complexType name="SearchResult">
<sequence>
<element name="ListRecords" nillable="true" type="impl:ListRecordsType" />
</sequence>
</complexType>
<complexType name="ListRecordsType">
<sequence>
<element name="totalResultsCount" type="xsd:int" />
<element maxOccurs="unbounded" name="record" nillable="true"
type="impl:recordType" />
</sequence>
</complexType>
<complexType name="recordType">
<sequence>
<element maxOccurs="1" minOccurs="0" name="metadata" nillable="true"
type="xsd:string" />
<element maxOccurs="1" minOccurs="0" name="score" type="xsd:int" />
</sequence>
</complexType>
The closest I've gotten is:
recordType.cfc
<cfcomponent displayname="recordType">
<cfproperty name="score" type="numeric">
<cfproperty name="metadata" type="string">
</cfcomponent>
ListRecordsType.cfc
<cfcomponent displayname="ListRecordsType">
<cfproperty name="record" type="recordType">
<cfproperty name="totalResultsCount" type="numeric">
</cfcomponent>
search.cfc
<cfcomponent>
<cffunction name="doSearch" access="remote" returntype="listRecordsType"
output="false">
<!--- Arguments and search here output of
L_SearchResultList/OutputStuff--->
<cfset var tempstruct=createObject("component","ListRecordsType")>
<cfset tempstruct.totalResultsCount=ListLen(L_SearchResultList)>
<cfset
tempstruct.resultElements=createObject("component","recordType")>
<cfset tempstruct.resultElements.score=100>
<cfset tempstruct.resultElements.metadata=OutputStuff>
<cfreturn tempstruct>
</cffunction>
</cfcomponent>
but so far I've been unable to figure out how to implement record as an array of
recordTypes. I've tried changing the record type to "array" rather than "recordType",
but this just gives an array of type Object and the resulting WSDL definition is off.
Is there a way to implement an array of a cfc component type with the above WSDL
definition?
Thanks,
-Lyle Barbato
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]