本文介绍了使用ArrayOfint参数消耗wcf webservice的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用WCF Web服务。
I am trying to consume a WCF webservice.
< cfdump>
p>
<cfdump>
shows the function as
getVwEmpByLocs(com.microsoft.schemas._2003._10.serialization.arrays.ArrayOfint)
UPDATE:
<cfset wsUser = createobject("webservice", "http://xxxxxxx/cardService.svc?wsdl")>
<cfdump var="#wsUser#">
<cfset locationID = []>
<cfset locationID[1] = 2092>
<cfset stResult = wsUser.GetVwEmpByLocs(javacast('int[]', locationID))>
错误:
消息参数类型不匹配
推荐答案
@Leigh和一些Google我发现了以下有关。这个问题(和@Leigh指的是)特别感兴趣的是第2号(朝向页面底部)的项目符号项。如果引用的页面被删除,我将在这里包括该信息。
After reading the comments from @Leigh and a little Google'ing I found the following article about Debugging ColdFusion Webservices. Of particular interest for this question (and what @Leigh was referring too) is the bullet item under number 2 (towards the bottom of the page). I will include that information here in case the referenced page is ever removed.
<s:complexType name="ArrayOfInt">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="int" type="s:int" />
</s:sequence>
</s:complexType>
<cfset objGroupIds = StructNew()>
<cfset objGroupIds._int = ListToArray("627303")>
<cfset callResult = myObj.getUser(objGroupIds)>
这篇关于使用ArrayOfint参数消耗wcf webservice的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!