I've been tearing my hair out with this one:
I have a complex application with lots of CFCs that we want to
web-service.
The CFCs are in a directory outside the webroot, with a mapping set up
to it : call it /mycomponents/
I have a directory /ws/ under the webroot with it's own Application.cfm,
where I've put the webservice interface CFCs
If I put a "noddy" method into a webservice CFC, like:
<cfcomponent displayname="myWebService">
<cffunction name="sayHello" access="remote"
returntype="string">
<cfargument name="myName" type="string"
required="true" />
<cfreturn "Hello #arguments.myName#" />
</cffunction>
</cfcomponent>
Then I can view the wsdl and call the method, with no problems
The trouble comes when I want to return one of the CFCs from the main
application, under /mycomponents/
<cfcomponent displayname="myWebService">
<cffunction name="getPersonByID" access="remote"
returntype="mycomponents.person">
<cfargument name="intPersonID" type="numeric"
required="true" />
<cfscript>
objPerson = CreateObject(
"component", "mycomponents/person" );
objPerson.init();
objReturnPerson =
objPerson.getPersonByID( arguments.intPersonID );
</cfscript>
<cfreturn objReturnPerson />
</cffunction>
</cfcomponent>
I get an Axis fault :
coldfusion.xml.rpc.SkeletonClassLoader$UnresolvedCFCDataTypeException :
Could not resolve CFC datatype mycomponents.person
I've tried many different ways of referring to mycomponents/person.cfc
in the returntype, none of them work.
There's a macromedia technote describing a similar fault to this, when
instantiating components as local variables in webservice CFCs, the
workaround is to put a mapping into jrun-web.xml
I've tried that, and it doesn't work for me.
If I copy the person.cfc into the same directory as the webservice CFC,
it works OK, but I don't want to have to put the webservice CFCs in the
same directory as the back-end CFCs, for various reasons that I won't
bore you with.
I've spent about two hours googling looking for a solution, and all I
can find is people having the same problem. No-one seems to have found a
fix.
So has anyone got any ideas that they'd like to share?
Thanks,
Alistair Davidson
Senior Technical Developer
Headshift.com
------------------------------------------
HEADSHIFT >> www.headshift.com <BLOCKED::http://www.headshift.com/>
T: 020 7357 7358
------------------------------------------
smarter > simpler > social >
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

