我有一个.NET服务,我需要从ColdFusion调用。该服务要求我将对象作为参数传递。当我转储服务时,输出如下所示:
我用来调用该服务的代码是:
<cfset employeenumbers = arrayNew(1)>
<cfset employeenumbers[1] = "152786">
<cfset employeenumbers[2] = "210562">
<cfset employeenumbers[3] = "200788">
<cfset context = createObject(".NET","com.microsoft.schemas.dynamics._2010._01.datacontracts.CallContextE")>
<cfset context.Company = 'US03'>
<cfinvoke webservice="http://050-aos-08.tubecityims.com:8101/DynamicsAx/Services/TCCWorkerPayDecryptService?wsdl" method="empPayList" returnvariable="answer" refreshwsdl="true">
<cfinvokeargument name="CallContextE" value="#context#">
<cfinvokeargument name="_empList" value="#employeenumbers#">
</cfinvoke>
<cfoutput>#answer#</cfoutput>
我得到的错误是:
类 com.microsoft.schemas.dynamics._2010._01.datacontracts.CallContextE 在指定的程序集列表中找不到。
更新
这是WSDL:
<wsdl:operation name="empPayList">
<soap12:operation soapAction="tempuri.org/TCCWorkerSalaryDecryptService/empPayList"; style="document"/>
<wsdl:input name="TCCWorkerSalaryDecryptServiceEmpPayListRequest">
<soap12:header message="i0:TCCWorkerSalaryDecryptServiceEmpPayListRequest_Headers" part="context" use="literal"/>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="TCCWorkerSalaryDecryptServiceEmpPayListResponse">
<soap12:body use="literal"/>
</wsdl:output>