I was getting a blank page merely b/c I had turned on error
handling and
had not actual error page defined yet. I have turned it off
and now I
am getting the dreaded
Web service operation "getMembersByState" with parameters {}
could not
be found.
YUCK. Also I had another question - I have a basic
understanding of
structures and arrays so I thought this might work as a way
to call the
cfinvoke but I can't test it until I have resolved the issue
above. Can
I call the function using argumentcollection="#URL#" if the
state is
defined in the url? But lets worry about the first problem
first right :)
Thanks again,
Chris
Chris Luksha wrote:
> Tim - Thank you so much, that at least explained to me
what in the world
> I was doing wrong in testing the silly thing. So now I
have put back
> the original query function to pull all the data. And
using this link
> as you mentioned
>
http://www.femsa.org/cfc/getMembers.cfc?method=getMembersByState&state=IL
> works great. You can even still call
>
http://www.femsa.org/cfc/getMembers.cfc?method=members
and get the silly
> little text.
>
> Now I m probably just not understanding how to call the
cfc at this
> point. I thought I had it right but I am getting a blank
page when
> calling the cfc from another domain via cfinvoke.
>
> Here is what I am doing...
>
> The cfc states this:
>
> <cffunction name="getMembersByState" access="remote"
> returntype="query" hint="Members by State"
description="FInd and return
> member listing by state">
> <cfargument name="state" required="yes"
default="">
> <cfset var rsGetMembers="">
> <cfquery name="rsGetMembers"
datasource="#request.dsn#"
> username="#request.dsnusrnm#"
password="#request.dsnpwd#" >
> SELECT member_id, city as member_City, company_name as
> member_Name, dba_name as member_DBA
> FROM members_tbl
> WHERE Active = 1
> AND state = '#arguments.state#'
> ORDER BY company_name
> </cfquery>
> <cfreturn rsGetMembers>
> </cffunction>
>
> The cfinvoke states this:
>
> <cfinvoke webservice="
http://www.femsa.org/cfc/getMembers.cfc?wsdl"
> method="getMembersByState"
> returnvariable="rsGetMembers">
> <cfinvokeargument name="state" value="al"/>
> </cfinvoke>
>
> <cfoutput query="rsGetMembers">
> #member_name#<br />
> </cfoutput>
>
> Now I would think this should return a list of member
names - or at
> least if I used a cfdump - I would see the whole thing.
But niether the
> code above, nor a cfdump results in anythin on the page.
>
> Am I missing somehting in how I call the cfc?
>
> Thanks for all the patience and help Tim,
> Chris
>
> cecropin wrote:
>
>> Chris,
>>
>> I apologize. I must have been a bit sleepy yesterday
when I answered
>> this question. There are a couple of things going
on. The first is
>> that your webservice component is working just fine
at this time.
>> I'll get back to that in a second.
>>
>> When you use the URL
http://www.femsa.org/cfc/getMembers.cfc,
it in
>> turn redirects you to
>>
http://www.femsa.org/CFIDE/componentutils/cfcexplorer.cfc?method=getcfcinhtml&na
>>
>> me=cfc.getMembers&path=/cfc/getMembers.cfc
>> which is where you're really getting the error
message. What's
>> happening here is that you are actually invoking an
out of the box CF
>> application with inspects your CFC. The error that
you're getting is
>> because CF is unable to find the directory
>> D:\inetpub\wwwroot-ct\CFIDE\administrator\cftags. I
think CFIDE is a
>> virtual directory and either the security settings
are so tight that
>> the service account running ColdFusion cannot access
the
>> administrator/cftags directory or there's something
wrong w/ the
>> install. For instance I was able to locate this
resource
>>
http://www.femsa.org/CFIDE/images/required.gif,
but not
>>
http://www.femsa.org/CFIDE/administrator/aboutcf.cfm
or
>>
http://www.femsa.org/CFIDE/administrator/cfadmin.css
>>
>> Getting back to the webservice you should test it
like so
>>
http://www.femsa.org/cfc/getMembers.cfc?method=firstws
and
>>
http://www.femsa.org/cfc/getMembers.cfc?method=members.
>>
>> The global error handler in your app is not
executing, because
>> application.cfm from
>>
D:\inetpub\wwwroot-ct\CFIDE\componentutils\Application.cfm is being
>> executed and that doesn't have an error handler.
>>
>> Does this make sense so far? At this point it's
either a permissions
>> or install issue happening when you try to inspect
your CFC, but I
>> think this is besides the point, because your
original question was
>> about your getMembersByState webservice. Can you put
that function
>> back in and then use a method call like
>>
http://www.femsa.org/cfc/getMembers.cfc?method=getMembersByState&state=IL
>> or whatever is appropriate for your service.
>>
>> Looking at your original code. I only see 2 issues,
1 the access must
>> be remote. This was pointed out, and 2 you must use
the "arguments"
>> scope w/ an s at the end not "argument".
>>
>> Hope this helps.
>>
>> -Tim
>>
>
--
Chris Luksha
Echo Web Services
Making Your Website Resound
603-831-0099
http://www.echowebservices.com/
CAN-SPAM Compliant Email Newsletters - only $.05 per
Subscriber
http://www.echowebservices.com/email