• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Problem with CFMX web service function return

New Here ,
Jul 27, 2006 Jul 27, 2006

Copy link to clipboard

Copied

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.
TOPICS
Advanced techniques

Views

298

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 27, 2006 Jul 27, 2006

Copy link to clipboard

Copied

Have you tried returntype="any"?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 27, 2006 Jul 27, 2006

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation