0 Replies Latest reply on Sep 4, 2006 8:26 AM by ptamk

    Passing object to cfc webservice

    ptamk
      Hi

      Does anyone have an example of creating an object in flex and passing it to a coldfusion webservice and parsing the object in the cfc.

      I have successfully called CFC web services with simple data types strings etc even arrays however no luck with passing an object to cold fusion



      My code looks something like this


      // create the oHLM object
      oHLM = new HighLevelMessageClass();

      // Assign some arbitrary value to the STEST property
      oHLM.STEST ="ABCD";


      // call the webservice
      var token: AsyncToken = AsyncToken(MenuService.TestObj(oHLM,"abc"));
      token.addResponder(new TokenResponder(handleHLMR,
      "Error HighLevelMessageRequest"));




      My CFC containing the TestObj function
      ...
      <cffunction name="TestObj" access="remote" returnType="string">
      <cfargument name="myObj" type="struct" required="true">
      <cfargument name="Arg2" type="string" required="true">

      <cfreturn myObj.STEST>


      </cffunction>
      ...

      This call fails as I guess coldfusion doesn’t understand the object been passed in.

      Any ideas ?