Question
How do you format a complex data type for a web service?
Hi, I am getting an error message that seems to be well
documented on the web, but I can't seem to find any information
about how to resolve it. I am trying to pass an array to a web
service but I get the error message:
Web service operation with parameters cannot be found.
I am formatting my array like this:
<cfset arrayResidueTests = ArrayNew(1)>
<cfset structResidueTest = StructNew()>
<cfif arguments.qryBatch.recordcount GT 0>
<cfloop query="arguments.qryBatch">
<cfset structResidueTest.Label = NIRCal>
<cfset structResidueTest.KPIN = Left(GrowerNumber,4)>
<cfset structResidueTest.ResidueTypeCode = 'O'>
<cfset structResidueTest.CollectionDate = DateFormat(SampCollectDt,'dd-mm-yyyy')>
<cfset structResidueTest.DispatchDate = DateFormat(IntendHarvDt,'dd-mm-yyyy')>
<cfscript>
ArrayAppend(arrayResidueTests, structResidueTest);
</cfscript>
</cfloop>
</cfif>
<cfdump var="#arrayResidueTests#">
and I invoke the web serivce like this:
<cfinvoke webservice="https://mobiledatacapture.zespri.com/agfirst.asmx?wsdl"
method="SubmitResidueTests"
returnvariable="local.retVar">
<cfinvokeargument name="ResidueTests" value="#arrayResidueTests#">
</cfinvoke>
and finally, this is the wsdl describing the web service:
https://mobiledatacapture.zespri.com/agfirst.asmx?wsdl
I have been talking directly to the (.NET) developers who built the web service but they haven't been able to give me any bright ideas either!! Hope someone can help me with this - any comments would be much appreciated.
Thank you.
Web service operation with parameters cannot be found.
I am formatting my array like this:
<cfset arrayResidueTests = ArrayNew(1)>
<cfset structResidueTest = StructNew()>
<cfif arguments.qryBatch.recordcount GT 0>
<cfloop query="arguments.qryBatch">
<cfset structResidueTest.Label = NIRCal>
<cfset structResidueTest.KPIN = Left(GrowerNumber,4)>
<cfset structResidueTest.ResidueTypeCode = 'O'>
<cfset structResidueTest.CollectionDate = DateFormat(SampCollectDt,'dd-mm-yyyy')>
<cfset structResidueTest.DispatchDate = DateFormat(IntendHarvDt,'dd-mm-yyyy')>
<cfscript>
ArrayAppend(arrayResidueTests, structResidueTest);
</cfscript>
</cfloop>
</cfif>
<cfdump var="#arrayResidueTests#">
and I invoke the web serivce like this:
<cfinvoke webservice="https://mobiledatacapture.zespri.com/agfirst.asmx?wsdl"
method="SubmitResidueTests"
returnvariable="local.retVar">
<cfinvokeargument name="ResidueTests" value="#arrayResidueTests#">
</cfinvoke>
and finally, this is the wsdl describing the web service:
https://mobiledatacapture.zespri.com/agfirst.asmx?wsdl
I have been talking directly to the (.NET) developers who built the web service but they haven't been able to give me any bright ideas either!! Hope someone can help me with this - any comments would be much appreciated.
Thank you.