Other thing that comes to mind is, Are you setting the correct "returntype"?
Heres the code I use to talk to the web service: (all inside a CFC in a function block)
-----------code start-----------
<CFSET ccUsers = ArrayNew(1)>
<CFSET ccCount = 1>
<cfloop list="#ARGUMENTS.ccUsers#" index="iCC" delimiters=",">
<CFSET userCC = structNew()>
<CFSET userCC.userName = iCC>
<CFSET ccUsers[ccCount] = userCC>
<CFSET ccCount = ccCount + 1>
</cfloop> <cfscript>
user = structNew();
user.userName = ARGUMENTS.CreatedBy; approver = structNew();
approver.userName = ARGUMENTS.Recipient; recipients = ArrayNew(1);
recipients[1] = approver; createActionRequestBean = structNew();
createActionRequestBean.actionName = ARGUMENTS.actionName;
createActionRequestBean.applicationID = ARGUMENTS.applicationID;
createActionRequestBean.applicationLink = ARGUMENTS.approvalURL;
createActionRequestBean.applicationName =
ARGUMENTS.applicationName;createActionRequestBean.rejectionMode = ARGUMENTS.rejectionMode;
createActionRequestBean.workFlowType = ARGUMENTS.workFlowType;
createActionRequestBean.extraEmailBody = ARGUMENTS.note;
createActionRequestBean.reminderPeriod = DateAdd("h",ARGUMENTS.reminderPeriod,createDate(1970, 1, 7));
createActionRequestBean.rolloverPeriod = ARGUMENTS.rolloverPeriod;
createActionRequestBean.startDate = now();
createActionRequestBean.startRolloverDate = ARGUMENTS.startRolloverDate;
createActionRequestBean.user = user;
createActionRequestBean.recipients = recipients;
createActionRequestBean.ccUsers = ccUsers; ws = createObject("webservice", "#ARGUMENTS.WebServiceSource#");
response = ws.CreateAction(createActionRequestBean);
</cfscript>
-----------code end-----------Brent Nicholas - EclecticDetroit, LLC. http://www.EclecticDetroit.com 248.767.5516 [EMAIL PROTECTED] [EMAIL PROTECTED]
"On the other hand, you have different fingers."
From: Thomas Chiverton <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: [CFCDev] sending complex types to webservices
Date: Thu, 9 Dec 2004 11:02:03 +0000
MIME-Version: 1.0
Received: from cfczone.org ([69.43.131.101]) by mc12-f6.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Thu, 9 Dec 2004 03:02:50 -0800
Received: from monitor.bluefinger.com [195.173.84.2] by nerve.mindtool.com with ESMTP (SMTPD32-7.15) id A11820B70068; Thu, 09 Dec 2004 03:03:52 -0800
X-Message-Info: JGTYoYF78jHRvGQ2Xwlpz1GYunhqiCv8
X-RBL-Warning: OSRELAY: Please stop using relays.osirusoft.com
X-Declude-Sender: [EMAIL PROTECTED] [195.173.84.2]
X-Note: This E-mail was scanned by Declude JunkMail (www.declude.com) for spam.
X-Spam-Tests-Failed: OSRELAY [2]
Precedence: bulk
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 09 Dec 2004 11:02:50.0776 (UTC) FILETIME=[9FDD1180:01C4DDDE]
As per the CF docs, I'm trying to construct a CFC to represent the transfer objects for a webservice I am invoking. And it doesn't work, but a struct *with identical fields to the CFCs cfproperty tags* does !
The CFC version fails on the cfinvoke tag with "Could not perform web service invocation "createZone" because java.lang.IllegalArgumentException: argument type mismatch" Does cfinvoke expect a struct rather than 'any' type or something ?
There are indications on http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/webser39.htm that other people have had the same problem.
I suppose I could give my TO CFC a .toStruct(), but that isn't right according
to the docs - argh !
Anyone else consuming web services with complex arguments ?
The stuct: struct ALARMRANGE 0 CHANGEDATE 0 ID -1 NAME Head Office ?, Harpenden OWNERID 426 OWNERTYPE 1 PLATFORMID 0 VERSION 0 ZONEACTIVE 1 ZONETYPE 1
The CFC:
component com.bluefinger.saffire.zone.TO
NAME Head Office ?, Harpenden
CHANGEDATE 0
OWNERID 426
PLATFORMID 0
ZONEACTIVE 1
VERSION 0
ID -1
ZONETYPE 1
OWNERTYPE 1
ALARMRANGE 0
--
Tom Chiverton
Advanced ColdFusion Programmer
Tel: +44 (0)1749 834900
email: [EMAIL PROTECTED]
BlueFinger Limited
Underwood Business Park
Wookey Hole Road, WELLS. BA5 1AF
Tel: +44 (0)1749 834900
Fax: +44 (0)1749 834XXX
web: www.bluefinger.com
Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple Quay,
BRISTOL. BS1 6EG
*** This E-mail contains confidential information for the addressee only. If
you are not the intended recipient,
please notify us immediately. You should not use, disclose, distribute or copy
this communication if received
in error. No binding contract will result from this e-mail until such time as
a written document is signed on
behalf of the company. BlueFinger Limited cannot accept responsibility for the
completeness or accuracy of
this message as it has been transmitted over public networks.***
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at [EMAIL PROTECTED]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at [EMAIL PROTECTED]
