web service wsdl problem
I have a very simple web service cfc file that uses another cfc component in the returntype. Both cfc files are on the same directory in the server. It fails to register (wsdl) on the CF server. If I change the returntype of the web service call to "any" it would work. Anyone has any idea? Below is the code:
----------
authentication_wsapi.cfc
<cfcomponent>
<cffunction name="getManagers"
access="remote"
returntype="User"
output="no">
<cfobject component="User" name="ret">
<cfreturn ret>
</cffunction>
</cfcomponent>
-----------
User.cfc
<cfcomponent>
<cfproperty name="loginName" type="string">
</cfcomponent>
-----------
url to test:
http://wsapi.my.com/authentication_wsapi.cfc?wsdl
-----------
Error I got:
AXIS error
Sorry, something seems to have gone wrong... here are the details:
Exception - java.lang.NoClassDefFoundError: user
java.lang.NoClassDefFoundError: user
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethod(Class.java:1935)
at org.apache.axis.description.JavaServiceDesc.loadServiceDescByIntrospection(JavaServiceDesc.java:863)
-------------
If I modify authentication_wsapi.cfc as below (only difference is the returntype) it will work:
<cfcomponent>
<cffunction name="getManagers"
access="remote"
returntype="any" <----- changed from "User" to "any"
output="no">
<cfobject component="User" name="ret">
<cfreturn ret>
</cffunction>
</cfcomponent>
----------------------
It seems authentication_wsapi.cfc can not see the User.cfc on the same dir. BUT the "cfobject" call to create the User component is not complaining though. Any help will be apprecriated!
