I try to publish a webservice, which returns a struct (component). This is the
code for the webservice:
[Q]
<cfcomponent>
<cffunction name="checkLogin" returntype="loginData" access="remote">
<cfargument name="login" type="string" required="yes">
<cfargument name="password" type="string" required="yes">
<cfobject component="loginData" name="vData">
<cfset vData.success = false>
<cfreturn vData>
</cffunction>
</cfcomponent>
[/Q]
As you see, i have "loginData" as return type. So I created a loginData.cfc in
the same directory as the webservice is:
[Q]
<cfcomponent>
<cfproperty name="success" type="boolean">
<cfproperty name="recordCount" type="int">
<cfproperty name="mandants" type="string">
</cfcomponent>
[/Q]
Now, when i try to access the webservice with the parameter ?wsdl
(service.cfc?wsdl) i get the following error:
java.lang.NoClassDefFoundError
The webservice works, if i have another returnType. The webservice is places
in [webroot]/subdir1/subdir2/
I tryed to copy the loginData.cfc to different places in the cfusionmx-folder,
such as cfx, customTags, libs, wwwroot/web-inf/lib. With no success.
Also I tryed to set a mapping, but i'm not sure, what to set there.
Can somebody help? Thanks!
jmmorgan - 26 Jul 2007 19:34 GMT
This is filing because of the
<cfproperty name="recordCount" type="int">
when I changed type="int" to type="numeric" no error was thrown and the wsdl was displayed.
Res Nuessle - 26 Jul 2007 19:41 GMT
OUUUUU.. too bad..
Thanks! ;)