Sorry if this has been asked and answered already, but...
I'm exploring web services for the first time, and have already run into a
puzzler. It seems that I get a rather ugly error message if I try to return a
complex object (query, structure) from my web service, whereas a simple string
value returns properly. Here is my code:
The web service:
<cfcomponent>
<cffunction name="test" access="remote" returntype="string" output="no">
<cfargument name="name" type="string" required="no">
<cfreturn "Hello " & arguments.name>
</cffunction>
</cfcomponent>
The invokation:
<cfinvoke
webservice="http://[theurl]/helloworld.cfc?wsdl"
method="test"
returnvariable="astring">
<cfinvokeargument name="name" value="Joe Bob">
</cfinvoke>
<cfdump var=#astring#>
This works fine.
However, if I change the web service to this:
<cfcomponent>
<cffunction name="test" access="remote" returntype="struct" output="no">
<cfargument name="name" type="string" required="no">
<cfset s = structNew()>
<cfset s.name = arguments.name>
<cfreturn s>
</cffunction>
</cfcomponent>
.....I get a rather hideous (and unhelpful) looking error message that starts
out like this:
"Could not perform web service invocation "test" because AxisFault faultCode:",
and then goes on to say something about "no such operation 'getMessage'.
I've searched the web for answers, and all I've found so far are a bunch of
other people who seem to have the same problem, but no solutions.
Thanks in advance for any help,
Ben Mueller
Sr. Software Engineer
Cognitive Arts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204350
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54