- see footer for list info -<
I'd also suggest to look at http://www.fusion-reactor.com/fd/ as this
will work with cf 6.1, and will save you a lot of debugging time.
--------------------------------------------------
Big Mad Kev
Adobe Community Expert (ColdFusion)
email: [EMAIL PROTECTED]
blog: http://inner-rhythm.co.uk/blog
--------------------------------------------------
On 7 Oct 2008, at 14:25, Terry Riley wrote:
- 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 -<
_______________________________________________
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 -<