Web Service Complex Datatypes
Does ColdFusion support nested complex data types when building Web Services? See example CFCs below. I keep getting a ServiceMethodNotFoundException. In my SubmitNoticeOfAppt.cfc, the cfargument data type is NoticeOfAppointment.CFC which references other CFCs that define complex data types. The complex types are needed to support a really complex XML document that must be NIEM (National Information Exchange Model) compliant. Originally tried passing the NIEM XML doument as a string, but receive deserialization errors, encounter child element. Could get around the error by wrapping the XML string in <![CDATA[ ... ]]>, but this convention is not NIEM compliant.
DocumentIssueDate.cfc
<cfcomponent displayname="DocumentIssueDate" output="false">
<cfproperty name="Date" type="date" required="No">
</cfcomponent>
DocumentAugmentation.cfc
<cfcomponent displayname="DocumentAugmentation" output="false">
<cfproperty name="DocumentIssueDate" type="any" required="No">
</cfcomponent>
DocumentIdentification.cfc
<cfcomponent displayname="DocumentIdentification" output="false">
<cfproperty name="IdentificationID" type="numeric" required="Yes">
<cfproperty name="IdentificationCategoryDescriptionText" type="string" required="No">
</cfcomponent>
NoticeOfAppointment.cfc
<cfcomponent displayname="NoticeOfAppointment" output="false">
<cfproperty name="DocumentIdentification" type="any" required="Yes">
<cfproperty name="DocumentAugmentation" type="any" required="Yes">
</cfcomponent>
SubmitNoticeOfAppt.cfc
<cfcomponent style="document">
<cffunction name="SubmitNoticeOfAppt" returnType="string" output="false" access="remote">
<!---Arguments--->
<cfargument name="NoticeOfApptXml" type="NoticeOfAppointment" required="Yes">
<cfreturn "Notice of Appointment successfully received">
</cffunction>
</cfcomponent>
Sample NoticeOfAppointment.xml (Stripped down, actual message contains almost 200 elements with 20+ complex datatypes)
<NoticeOfAppointment>
<DocumentIdentification>
<IdentificationID>000021199</IdentificationID>
<IdentificationCategoryDescriptionText/>
</DocumentIdentification>
<DocumentAugmentation>
<DocumentIssueDate>
<Date>2011-04-07</Date>
</DocumentIssueDate>
</DocumentAugmentation>
</NoticeOfAppointment>
