>- see footer for list info -<
Thanks, Duncan
See below
Cheers
Terry
----- Original Message -----

> *From:* "Duncan Cumming" <[EMAIL PROTECTED]>
> *To:* <[email protected]>
> *Date:* Fri, 03 Oct 2008 11:00:15 +0100
> 
> >- see footer for list info -<
> Two things, neither of which are probably to blame for your error.
> 
> In your second example you don't wrap your string arguments in quotes.
> Before:
> <cfinvokeargument name = "mitoo_player_id" value="#new_player_id#" />
> After: 
> <cfinvokeargument name="mitoo_player_id" value=#new_player_id# />

Changed that, but it made no difference, unfortunately.
 
> 
> Also, I'd be loath to create a variable called Arguments, given that 
> there is a scope called Arguments.

Changed that also, to no avail.

> 
> Fife Council requests that you "Think Green" and only print this 
> email if absolutely necessary
> 
> >>> "Terry Riley" <[EMAIL PROTECTED]> 02/10/2008 17:32 >>>
> >- see footer for list info -<
> Long post warning....
> 
> Am a newcomer to web services, but learning fairly quickly.
> And I cannot move to CF7 or CF8 yet, so I hope the answer doesn't 
> absolutely involve any upgrade!
> 
> I have created cfcs and relevant functions for others to get data 
> from our server, and have created a number of discrete <cfinvoke>s to 
> pass data back to a particular web service (not CF).
> 
> If the service is consumed as follows:
> 
> <cfinvoke 
>       webservice = "http://xyz.com/service.php?class=webServices&wsdl";
>       method = "createPlayer"
>       returnvariable = "success"
>       username = 'joe'
>       password = 'pass'>
>               <cfinvokeargument name = "mitoo_player_id" 
> value="#new_player_id#" />
>               <cfinvokeargument name = "gr_player_firstname" 
> value="#new_player_firstname#" />
>               <cfinvokeargument name = "gr_player_lastname" 
> value="#new_player_lastname#" />
>               <cfinvokeargument name = "mitoo_team_ids" 
> value="#new_player_team_ids#" />
> </cfinvoke>
> <cfoutput>#success.success_code#</cfoutput>
> 
> I have no problems and get back the required success object. However, 
> I want to stick all of these invokes inside a cfc as functions, 
> requesting them as <cfinvokewith parameters from outside, as and when 
> > the need araises (ie trying to reuse some code like the generation 
> of the webservice object)
> 
> If the params are passed via an invoke such as:
> 
> <cfinvoke component="gr_webServices" method="createPlayer" 
> returnvariable="gr_player_id">
>       <cfinvokeargument name="mitoo_player_id" value=#new_player_id# />
>       <cfinvokeargument name="gr_player_firstname" 
> value=#new_player_firstname# />
>       <cfinvokeargument name="gr_player_lastname" 
> value=#new_player_lastname# />
>       <cfinvokeargument name="mitoo_team_ids" value=#new_player_team_ids# 
> />    
> </cfinvoke>
> 
> and the component contains:
> 
> <cfcomponent>
> 
>       <cffunction name="createPlayer" access="public" username="fred" 
> password="bloggs" returntype="numeric" output="no">
>               <cfargument name="mitoo_player_id" type="numeric" 
> required="true" hint="the latest player added">
>           <cfargument name="gr_player_firstname" type="string" 
> required="true" hint="the latest player's first name">
>           <cfargument name="gr_player_lastname" type="string" 
> required="true" hint="the latest player's last name">
>           <cfargument name="mitoo_team_ids" type="array" required="true" 
> hint="teams the player is signed to">
>               <cfset var gr_player_id = ''>
>               <cfscript>
>               ws = 
> createObject("webservice","http://xyz.com/service.php?class=webService
> s&ws
> dl");
>                       gr_player_id = ws.createPlayer(arguments);
>                       return gr_player_id;
>           </cfscript>
>       </cffunction> 
> </cfcomponent>
> 
> I get yer actual error screen which includes:
> 
> 
> Web service operation "createPlayer" with parameters 
> {{GR_PLAYER_FIRSTNAME={Terry},GR_PLAYER_LASTNAME={Riley},MITOO_PLAYER_
> ID={
> 1},MITOO_TEAM_IDS={[123]},}} could not be found. 
> 
> Now I've tried to simulate the the invoke in other ways, such as:
> 
> <cfset gr_webServices = createObject("webservice", 
> "http://xyz.com/service.php?class=webServices&wsdl";)>
> 
> <cfscript>
>       arguments = StructNew();
>       arguments.mitoo_team_ids = #new_player_team_ids#;
>       arguments.mitoo_player_id = #new_player_id#;
>       arguments.gr_player_firstname = #new_player_firstname#;
>       arguments.gr_player_lastname = #new_player_lastname#;
> 
>       success = gr_webServices.createPlayer(arguments);
>       return success;
> </cfscript>
> 
> and I get the same error as above.
> 
> It looks to me as though the invoke through the cfc (or through the 
> script method above) is creating another empty variable (see the 
> comma before the closing double bracket), but the arguments structure 
> prior to submission (whichever way I do it) contains only the four 
> pairs, not an empty fifth, as shown by using <cfdump>.
> 
> I've searched the googleverse for an answer, to no avail, so I though 
> I would ask my old gurus if they know the answer.
> 
> Any help - positive or negative - is welcome.
> 
> Terry
> http://www.confexdb.co.uk/ 
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG. 
> Version: 7.5.523 / Virus Database: 270.7.5/1702 - Release Date: 
> 01/10/2008 09:05
> 
> 
> 
> _______________________________________________
> 
> For details on ALL mailing lists and for joining or leaving lists, go 
> to http://list.cfdeveloper.co.uk/mailman/listinfo 
> 
> --
> CFDeveloper Sponsors:-
> >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your 
> help -<
> 
> **********************************************************************
> This email and any files transmitted with it are confidential and 
> intended solely for the use of the individual or entity to whom they 
> are addressed and should not be disclosed to any other party. If you 
> have received this email in error please notify your system manager 
> and the sender of this message.
> 
> This email message has been swept for the presence of computer 
> viruses but no guarantee is given that this e-mail message and any 
> attachments are free from viruses.
> 
> Fife Council reserves the right to monitor the content of all 
> incoming and outgoing email.
> 
> Fife Council
> ************************************************
> 
> 
> _______________________________________________
> 
> For details on ALL mailing lists and for joining or leaving lists, go 
> to http://list.cfdeveloper.co.uk/mailman/listinfo
> 
> --
> CFDeveloper Sponsors:-
> >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your 
> help -<
> 
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG. 
> Version: 7.5.523 / Virus Database: 270.7.5/1703 - Release Date: 
> 02/10/2008 07:46
> 
> 


Terry
http://www.confexdb.co.uk/


-- 
No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.523 / Virus Database: 270.7.5/1703 - Release Date: 02/10/2008 07:46



_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to