2 Replies Latest reply on Jul 27, 2006 8:25 AM by mwiley63

    Problem with CFMX web service function return

    mwiley63
      I made a post yesterday about a web service function I was writing, as it turns out my post was extremly incorrect for my problem. With this web service function I can return an array just fine, I can return one instance of an object just fine, however, when I try to return an array of the object I keep getting the error:

      Could not perform web service invocation "SelectGames" because AxisFault faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.generalException faultSubcode: faultString: [org.apache.axis.AxisFault : ; nested exception is: coldfusion.xml.rpc.CFCInvocationException: [java.lang.IncompatibleClassChangeError : Dependent CFC type(s) have been modified. Please refresh your web service client.]]; nested exception is: coldfusion.xml.rpc.CFCInvocationException: [org.apache.axis.AxisFault : ; nested exception is: coldfusion.xml.rpc.CFCInvocationException: [java.lang.IncompatibleClassChangeError : Dependent CFC type(s) have been modified. Please refresh your web service client.]] faultActor: faultNode: faultDetail: { http://xml.apache.org/axis/}stackTrace: AxisFault faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.generalException faultSubcode: faultString: [org.apache.axis.AxisFault : ; nested exception is: coldfusion.xml.rpc.CFCInvocationException: [java.lang.IncompatibleClassChangeError : Dependent CFC type(s) have been modifie..

      which basically means that the CF server needs restarted. However if I restart the CF server, no matter how many times I am still getting this error. If I change up my web service function to return just a normal array of integers or strings, or I change it to return one instance of the arbritrary complex type it all works just fine. I am still a little new on this subject and any enlightenment would be great. If anyone has found a way around this please let me know.

      Here is my complex type:
      <cfcomponent>
      <cfproperty name="Game_id" type="numeric">
      <cfproperty name="gameDate" type="date">
      <cfproperty name="Starttime" type="string">
      <cfproperty name="Place" type="string">
      <cfproperty name="Level" type="string">
      <cfproperty name="Sport" type="string">
      <cfproperty name="Gender" type="string">
      <cfproperty name="Opponent" type="string">
      <cfproperty name="Type" type="string">
      <cfproperty name="Link" type="string">
      </cfcomponent>

      I loop trhough a query and set a cfobject of the types above, then I append that object to an array and try t o return the array. Here is the basics of the loop:
      <cfset theArray = arrayNew(1)>
      <cfobject component = "games" name = "test>
      <cfloop query ...>
      <!--- set values to test ---->
      <cfset arrayApend(theArray, test)>
      </cfquery>
      <cfreturn theArray>

      my return type is array, I think the problem is I need to specify the return type to be an array of arbritray complex types which is impossible to do in CF. Anyone find a way to get around this?? Any feed back at all would be greatly appreciated.