>- see footer for list info -< See below, Russ Terry ----- Original Message -----
> *From:* "Snake" <[EMAIL PROTECTED]> > *To:* <[EMAIL PROTECTED]>, "'Coldfusion Development'" > <[email protected]> > *Date:* Tue, 7 Oct 2008 14:56:46 +0100 > > A direct cfinvoke is not calling it as a web service, thus a different > result. then why: <cfinvoke webservice = "http://xyz.com/service.php?class=webServices&wsdl" method = "createPlayer" returnvariable = "success" username = 'joe' password = 'pass'> Is that not calling a web service? > what I usually do in such situations is to comment out the arguments > one at > a time until I find the cause of the problem. > You will of course need to comment out the argument in the cfc so > that it is > not required, rather than in your invoker. > > You should also trying invoking the web services it from a non CF > source as > that is how it will be used eventually. Try SOAPUI which is a handy > tool for > such purposes. I may have totally got the wrong end of the webservice stick here, which is why I'm asking stupid questions. The problem is that I have to consume a service that is not CF, on XYZ's server, which works if I use <cfinvoke> with arguments. What I was (perhaps wrongly) trying to do was to gather all the bulk of the code in the <cfinvoke>s from around the system - into a cfc that would have all the security stuff (passwords etc) and creation, perhaps, of a webservice object, and methods, in just the one place to which I could send the info from the point of consumption to receive a success/fail result - which is all I need. We are passing info from us (in CF) to them (in php). I've decided to create a central file to be invoked the point of consumption. That will have all the cfinvokes and a cfswitch; the webserver object will be created at the top of the file. Having laid myself totally open to laughter and ridicule on this subject, I have appreciated the help offered, guys. > > > > -- > Russ Michaels > Certified ColdFusion Professional > My Blog: www.russ.michaels.me.uk > Tel: 0845 8620034 > Fax: 07092 300330 > Skype: russmichaels > > Commerical ColdFusion & BlueDragon Hosting: www.cfmxhosting.co.uk > FREE CFML Developer hosting : www.cfdeveloper.co.uk > > > > Russ > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Terry Riley > Sent: 07 October 2008 14:25 > To: [email protected] > Subject: RE: [CF-Dev] CFMX6.1 and web services > > >- see footer for list info -< > Yup, I knew that..... > > Was trying to figure why I got the error any way but a direct > <cfinvoke>. Have been aweay from it for a few days; will have another > crack tomorrow. > > Cheers > > ----- Original Message ----- > > > *From:* "Snake" <[EMAIL PROTECTED]> > > *To:* <[EMAIL PROTECTED]>, "'Coldfusion Development'" > > <[email protected]> > > *Date:* Fri, 3 Oct 2008 12:51:44 +0100 > > > > A CFC with access="remote" is a web service, you do not need to > > roll your > > own. > > > > > > Russ > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Terry Riley > > Sent: 03 October 2008 11:42 > > To: [email protected] > > Subject: RE: [CF-Dev] CFMX6.1 and web services > > > > >- see footer for list info -< > > Thanks, Russ > > See below > > Cheers > > Terry > > ----- Original Message ----- > > > > > *From:* "Snake" <[EMAIL PROTECTED]> > > > *To:* <[EMAIL PROTECTED]>, "'Coldfusion Development'" > > > <[email protected]> > > > *Date:* Thu, 2 Oct 2008 18:20:56 +0100 > > > > > > When invoking a cfc as a web service you cannot have optional > > > arguments, they all must be passed, maybe this your issue. > > > > Putting all params in the <cfinvoke> makes no difference. Same > > > error. > > > > > > > Also is there any reason to not make the original component a > > > remote web site rather than creating another CFC that wraps it ? > > > > I must be having a thicko morning :-) but I don't actually > > understand that... I have no control over the webservice being > > consumed, and rather than having large <cfinvoke>s all over my > > site's code, I thought it would be useful to have the majority of > > the code, like authorisation and creation of the service object, > > all in a cfc and call from elsewhere in the code with small > > <cfinvoke>s that carry just the method name and the parameters. Not > > a good idea? > > > > > > > Russ > > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On Behalf Of Terry > > > Riley > > > Sent: 02 October 2008 17:32 > > > To: [email protected] > > > Subject: [CF-Dev] CFMX6.1 and web services > > > > > > >- 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 -< > > > > > > > > > > > > > > > > > > -- > > > No virus found in this incoming message. > > > Checked by AVG. > > > Version: 7.5.523 / Virus Database: 270.7.5/1702 - Release Date: > > > 01/10/2008 09:05 > > > > > > > > > > > > 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 -< > > > > > > > > > > > > -- > > 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 -< > > > > > > -- > 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.6/1713 - Release Date: 07/10/2008 18:40 _______________________________________________ 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 -<
