-Matt
On Mar 5, 2004, at 2:45 PM, Burns, John wrote:
> I changed it to make it so both arguments are required. Now, I have my
> call looking like this:
>
> <cfset myObj.listID = 4>
> <cfset myObj.memberStatus = 1>
> <cfset myObj =
>
> createObject("webservice","http://www.truthwebdesign.com/com/
> siteManager
> /mailingList.cfc?wsdl")>
> <cfset lists = myObj.getMembers()>
> <cfdump var="#lists#">
>
> Now I get the error:
>
> Web service operation "getMembers" with parameters {} could not be
> found.��
>
>
> The error occurred in /home/serve/truth/wstest.cfm: line 13
>
>
> 11 :
> 12 :
> 13 : <cfset lists = myObj.getMembers()>
> 14 : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> 15 : <html>
>
> Am I missing something?��Do I have to pass parameters in a different
> way
> when I'm calling this as a web service?��Can I not do myObj.listID = 4
> and have that get passed?
>
> John Burns
>
>
> -----Original Message-----
> From: Barney Boisvert [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 05, 2004 1:15 PM
> To: CF-Talk
> Subject: RE: web services question
>
> You can't have optional parameters on web services.
>
> > -----Original Message-----
> > From: Burns, John [mailto:[EMAIL PROTECTED]
> > Sent: Friday, March 05, 2004 9:26 AM
> > To: CF-Talk
> > Subject: web services question
> >
> > Ok, I'm just now starting to use some web services from CFCs and I'm
> > running into some problems.��Here's the deal:
> >��
> > I have a CFC with 1 function in it called "getMembers" and it has 2
> > arguments.��1 is required the other is not.��This works fine when I
> > call it as a CFC, however, when I call it as a web service, I get an
> > error.
> > The error just says "LISTID" and says to enable robust exception
> > errors.
> > I requested that my hosting company turn that on, but in the
> meantime,
>
> > I'm stuck.��If I remove the arguments and just hardcode those values
> > into the CFC, I can call it as a webservice without a
> problem.��Below
> > are code examples:
> >��
> >��
> > MAILINGLIST.CFC
> >��
> > <cfcomponent>
> >��<cffunction name="getMembers" access="remote" returntype="query">
> >���<cfargument name="listID" displayname="listID" hint="The listID"
> > required="yes" type="numeric" default="4">
> >���<cfargument name="memberStatus" displayname="memberStatus"
> hint="The
>
> > member status" required="no" type="numeric" default="1">
> >��� <cfquery datasource="global" name="addresses">
> >�����select MemberEmail as address
> >�����from EmailListMembers
> >�����where ListID = #arguments.listID# and MemberStatus =
> > #arguments.memberStatus#
> >��� </cfquery>
> >���<cfreturn addresses>
> >��</cffunction>
> > </cfcomponent>
> >��
> > -----------------------------------------------------------
> > COMPONENTTEST.CFM
> >��
> > <cfset myObj =
> > createObject("component","truth.com.siteManager.mailingList")>
> > <cfset MyObj.listID = 4>
> > <cfset addresses = myObj.getMembers()>
> >��
> > <cfdump var="#addresses#">
> >��
> > ---------------------------------------------------------
> > WEBSERVICETEST.CFM
> >��
> > <cfset myObj =
> > createObject("webservice","http://www.truthwebdesign.com/com/s
> > iteManager
> > /mailingList.cfc?wsdl")>
> > <cfset myObj.listID = 4>
> > <cfset addresses = myObj.getMembers()>
> >��
> > <cfdump var="#addresses#">
> >��
> >��
> > Any ideas?��Also, if I try making the 2 arguments not required and
> > have defaults for them and remove the <cfset myObj.listID = 4> line
> > from the webservicetest.cfm file, I get an error that says "Web
> > service operation "getMembers" with parameters {} could not be
> found."
> >��
> > Please help.
> >��
> > John Burns
> >
> >
> >
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

