House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Search cf-talk

July 04, 2009

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Home /  Groups /  ColdFusion Talk (CF-Talk)

WSDL CFC Problem

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Leder
07/17/2005 03:24 PM

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

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
07/17/2005 03:32 PM

> 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!

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mike Nicholls
07/17/2005 05:15 PM

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.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Leder
07/17/2005 06:03 PM

>> 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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Leder
07/17/2005 09:03 PM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James Holmes
07/17/2005 10:27 PM

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):

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Leder
07/17/2005 11:03 PM

Should I register as an ordinary mapping or as a webservice in CF admin? Mark

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Leder
07/17/2005 11:16 PM

>> 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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James Holmes
07/17/2005 11:48 PM

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!!!

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
07/17/2005 10:08 PM

----- 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!

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mark Leder
07/17/2005 10:20 PM

>> 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


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists