Skip to Content
0
Former Member
Jul 28, 2007 at 05:40 AM

Using a Web Service as a data provider for a Crystal Report

21 Views

<p>I&#39;m trying to write a Crystal Reports XI report that uses a Web Service as the data provider. I have a Web Service written in ColdFusion that looks like this.<br /><br /><cfcomponent displayName="FindEmployee" ><br /> <cffunction name="FindEmployeeSort" access="remote" <br /> returnType="xml" output="false"><br /> <cfdump var=form><br /> <cfset myXML = ""><br /> <!--- FindEmployeeSort body ---><br /> <cfquery name="EmployeeQuery" datasource="Production"><br /> Select * from employee<br /> <cfif isdefined(&#39;form.lastname&#39;)><br /> WHERE lastname LIKE &#39;%#form.lastname#%&#39; <br /> </cfif><br /> Order by lastname asc <br /> </cfquery><br /> <cfreturn EmployeeQuery> <br /> </cffunction><br /></cfcomponent><br /><br />I can get the web service to work from a ColdFusion page (either locally or on a remote server).</p><p>When I try to create the CR data source, I get the following error:</p><p>Crystal Reports<br />! Logon Failed.<br />Details: Cannot find correspondign table information in the XML file</p><p>The steps I took were:<br />* Choose XML from the "Avalable Data Sources"<br />* Choose "Use Web Service Data Source"<br />* Choose "Use HTTP(S) WSDL" with a url of <a href="http://host/directory/FindEmployee.cfc?wsdl">http://host/directory/FindEmployee.cfc?wsdl</a><br />* Leave the "HTTP(S) Web Service User ID:" and "HTTP(S) Web Service Password:" parameters blank<br />* Accept the defaults for Services, Ports, and Methods. They are respectively FindEmployee, FindEmployee.cfc and FindEmployeeSort.<br />* Then get the error</p><p>The most likely candidate to me is the user id and password, but I have no idea what to use. I didn&#39;t have to set any login information up in the ColdFusion pages that I used to test the Web Service.</p><p>Any ideas where to go from here?</p><p>Thanks,</p><p>Brian</p>