Hi,

i have a problem where i need to create an Array of Structs and pass it from CFMX to .Net Web Service.

firstly can CF pass complex datatypes to non-CFMX web services ??

if it can then......

i have created a Array of Structs.. .eg

<cfset stForm.rtReqArray = ArrayNew(1)>
<cfset stForm.rtReqStruct = StructNew()>

<cfset stForm.rtReqStruct["rtCode"] = JavaCast("string", "1S")>  <!--- room type code --->
<cfset stForm.rtReqStruct["rtReq"] = JavaCast("int", "1")> <!--- no of beds or room required --->
<cfset stForm.rtReqStruct["rtAdultCount"] = JavaCast("int", "1")> <!--- no of Adults --->
<cfset stForm.rtReqStruct["rtChildCount"] = JavaCast("int", "0")> <!--- no of Youths --->
<cfset stForm.rtReqStruct["rtRoomCost"] = JavaCast("double", "20.00")> <!--- Total Cost per Room Type --->

<cfset stForm.rtReqArray[1] = stForm.rtReqStruct>
....etc

but i seem to be getting an error as shown below .. (Book is the function i call on the Web Service)
you do not get to see the "Array of Structs" in the error mesg since it gets truncated.

<cfset stSendBooking.rtReqArray = stForm.rtReqArray>
<cfset stSendBooking.email = stForm.email>
etc.....

<cfset stLocal.returnBookStatus = stLocal.ws.Book(Application.chartWebServiceRevisionNo, stLocal.Code, Application.CallerID,
stSendBooking, "stLocal.returnBookingChartsBRN", "stLocal.returnBookingTotalCost", "stLocal.returnErrorMessage")>

"Web service operation "Book"  with parameters
{1,BLUEMTNS,SCOTTY,[EMAIL PROTECTED],CARDAUTH={123},USERATETABLE={Y},ORIGBKGNO={e4b1c0e5},RTREQARRAY={[Ljava.lang.Objec
t;@1d143d1},COMM={},PMCODE={XVCD},ARRDATE={06 Aug
04},RTMAX={1},FIRSTNAME={Joel},DEPTIME={},CARDNO={5123456789012346},LASTNAME={Nath},TOTALCOST={70.0},COUNTRY={Australia},ARRTIME={},
ADDRESS={302/182-190 hampden Road},STATE={NSW},PGCODE={},AGNCOD={},POSC={2064},DEPDATE={10 Aug 04},FAX={},PHONE={61 02
94112746},CARDEXP={0405},},stLocal.returnBookingChartsBRN,stLocal.returnBookingTotalCost,stLocal.returnErrorMessage} could not be
found.
"

i have checked the array name and struct keys etc... to be correct..
i have also used the toArray() function to convert the CF Array to Java Array.. but i have a feeling that the struct is having
problems...

if i take the "Array of Structs" out of the call then it seems fine..


any suggestion would be most helpful....

Cheers
Joel

.ps

the args for the function call..

'
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to