Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / July 2007



Tip: Looking for answers? Try searching our database.

Webservice -> returnType complexData

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Res Nuessle - 26 Jul 2007 08:41 GMT
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! ;)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.