0 Replies Latest reply on Mar 18, 2010 9:59 AM by MACRStockHolder

    CFC Explorer Error (xml return type)

    MACRStockHolder

      I am having an issue with the self documentation that ColdFusion displays in the CFC Explorer.


      Below is the simplest code that will reproduce the issue on my server.

       

      test.cfc

      <cfcomponent displayname="Test Component" output="no">
      
        <cffunction name="echoFunction" access="remote" returntype="xml">
          <cfargument name="echoArgument" type="string" required="yes">
          <cfset xmlToReturn = XMLNew()>
          <cfset xmlToReturn.xmlRoot = XMLElemNew(xmlToReturn, "TestXML")/>
          <cfset xmlToReturn.xmlRoot.xmlText = echoArgument />
          <cfreturn myResult>
        </cffunction>
      
      </cfcomponent>
      

       

      When I hit this in a browser with no parameters I am promted for my CFAdmin password and I am prested with a page that looks like this.

       

      Aviary localhost Picture 1.png

      At this point evertying looks correct.  The error happens when I click on the "xml" link that indicates the return value for the echoFunction().

       

      This link brings up a page with the following text.


      Component not found

      The component definition file for component 'MoMo.xml' cannot be  found on this server.

       

       

      It appears that it is looking for a MoMo\xml.cfc file.  I can confirm that by creating that file with the following code.

      xml.cfc

      <cfcomponent displayname="XML.cfc" output="no">
      </cfcomponent>
      

       

      Now when I click on the xml link in the CFC Explorer I get a page that looks like this.

      Aviary localhost Picture 2.png

      So it appears that CFC's don't know how to document themselves when the returntype of a function is set to "XML".  It is treating the returntype of XML as an cfc object named XML.  Or am I missing someting that allows me to define what the XML is supposed to be?  IMHO this should not be a link at all OR there should be a way of pointing it to the XSD file for the XML that funciton returns.