Skip to main content
Participant
July 27, 2006
Question

Problem with CFMX web service function return

  • July 27, 2006
  • 1 reply
  • 332 views
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.
This topic has been closed for replies.

1 reply

Participant
July 27, 2006
Have you tried returntype="any"?
mwiley63Author
Participant
July 27, 2006
Yes, I have tried it and return type any does not work in this situation since this function is being consumed by a web service. It needs to be in the form of an array of arbritrary type that is defined in a cfc file. Since this is WSDL the returntype has to be specified to every last bit.