|
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
WSDL CFC Problem
Hi All,Mark Leder 07/17/05 03:24 P > Trying to use a cfc to return a list of folders on my serverDave Watts 07/17/05 03:32 P We've had this error too; it's a ColdFusion bug with webservices that'sMike Nicholls 07/17/05 05:15 P >> We've had this error too; it's a ColdFusion bug with webservices that'sMark Leder 07/17/05 06:03 P I've created a mapping in CFMX7 called /webservices which points to the dirMark Leder 07/17/05 09:03 P The mapping and the web path need to read the same. By this I mean thatJames Holmes 07/17/05 10:27 P Should I register as an ordinary mapping or as a webservice in CF admin?Mark Leder 07/17/05 11:03 P >> The mapping and the web path need to read the same. By this I mean thatMark Leder 07/17/05 11:16 P I know.James Holmes 07/17/05 11:48 P > I've created a mapping in CFMX7 called /webservices whichDave Watts 07/17/05 10:08 P >> What happens if you try invoking the WSDL URLMark Leder 07/17/05 10:20 P Hi All, Trying to use a cfc to return a list of folders on my server (website folders). The cfc chokes when I point to the cfc with ?wsdl appended at the end, stating Axis can't resolve the cfc datatype. I've tried returntypes of structures, queries, any, all with the same failure. When I run just a cfdirectory command without using a CFC, the results are as expected. What's wrong? <cfcomponent> <cffunction access="remote" name="listServerDirectory" output="false"> <cfdirectory action="list" directory="c:\inetpub\websites\" name="serverWebsites" sort="Name"> <cfreturn serverWebsites> </cffunction> </cfcomponent> Thanks, Mark > Trying to use a cfc to return a list of folders on my server > (website folders). The cfc chokes when I point to the cfc with > ?wsdl appended at the end, stating Axis can't resolve the cfc > datatype. I've tried returntypes of structures, queries, any, > all with the same failure. First, you must use a specific returntype with web services, such as struct or query. Second, it may be the case that the "query" object returned by CFDIRECTORY isn't the same as a regular query object as far as Axis is concerned. So, you might try taking the data from that CFDIRECTORY and putting it in a regular query object that you create using QueryNew. Finally, it's worth noting that non-CF web services might have trouble consuming a query object from a CFC web service, so you might want to send back the data in a different format. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! We've had this error too; it's a ColdFusion bug with webservices that's been present since CFMX 6.1 Updater 1. See http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid= 7&threadid=881689&forumid=1 for some possible workarounds. >> We've had this error too; it's a ColdFusion bug with webservices that's been present since CFMX 6.1 Updater 1. Thanks, I'm still battling with this issue. I've even tried Ray Camdens Cfdirectory function from CFLib with the same results. Mark I've created a mapping in CFMX7 called /webservices which points to the dir where the cfc's are located. Regardless if I call webservice directly from the mapping, or use an absolute URL, I get this message (mapping shown): Could not generate stub objects for web service invocation. Name: webservices/SimpleCreditRating.cfc?wsdl. WSDL: webservices/SimpleCreditRating.cfc?wsdl. java.net.MalformedURLException: no protocol: webservices/SimpleCreditRating.cfc?wsdl It is recommended that you use a web browser to retrieve and examine the requested WSDL document for correctness. If the requested WSDL document can't be retrieved or it is dynamically generated, it is likely that the target web service has programming errors. Here's the invocation: <cfinvoke webservice="http://www.mysite.com/cf-inf/cfcomponents/SimpleCreditRating.cfc ?wsdl" method="getCreditRating" returnvariable="creditRating" ssn="000000001" /> So how am I supposed to look at the WSDL if it won't work? These tests I'm running from code downloaded from Forta's CFMX7 Advanced Book. (chapter 24, simple credit rating) I'm running out of ideas. Thanks, Mark The mapping and the web path need to read the same. By this I mean that http://www.mysite.com/cf-inf/cfcomponents/SimpleCreditRating.cfc needs to include the mapping in it, so the mapping needs to map /cf-inf/cfcomponents/ to {webroot}/cf-inf/cfcomponents/. If you have more than one site on this server, something unique to that site name needs to be in the mapped path and you component will have to move. Trust me, done it all before and this is necessary. > I've created a mapping in CFMX7 called /webservices which points to the dir > where the cfc's are located. Regardless if I call webservice directly from > the mapping, or use an absolute URL, I get this message (mapping shown): Should I register as an ordinary mapping or as a webservice in CF admin? Mark >> The mapping and the web path need to read the same. By this I mean that >> http://www.mysite.com/cf-inf/cfcomponents/SimpleCreditRating.cfc needs to include the mapping in it, so the mapping needs to map /cf-inf/cfcomponents/ to {webroot}/cf-inf/cfcomponents/. If you have more than one site on this server, something unique to that site name needs to be in the mapped path and you component will have to move. ===================== Your suggestion worked! Thanks for your help!!! Mark I know. This should be part of the documentation or similar, if they aren't going to fix it post-updater. > Your suggestion worked! > Thanks for your help!!! ----- Excess quoted text cut - see Original Post for more ----- What happens if you try invoking the WSDL URL (http://www.mysite.com/cf-inf/cfcomponents/SimpleCreditRating.cfc?wsdl) directly from within a browser? That's what the error message suggests you do. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! >> What happens if you try invoking the WSDL URL >>(http://www.mysite.com/cf-inf/cfcomponents/SimpleCreditRating.cfc?wsdl) >> directly from within a browser? That's what the error message suggests you do. I get the message as shown in my previous post (either way of calling the URL a browser, same problem). Mark
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||