From: alwin on
hi!

i am trying to retrieve data from microsoft crm, to do this i need to use
webservices. i can correctly connect but then i try to use the 'retrieve'
function and it complains about a parameter.
it seems to me cf wants to construct an abstract java class, which ofcourse
fails. constructing the "com.microsoft.schemas.crm._2006.Query.ColumnSet"
class via create object fails (the class i can use) because it can not be
found.

anyone had this error before or has some pointers about how to solve it?

alwin

--[ the error ]--

Error converting CFML arguments to Java classes for web service invocation.
Unable to create web service argument class
com.microsoft.schemas.crm._2006.Query.ColumnSetBase. Error:
java.lang.InstantiationException. Often this is because the web service
defines an abstract complexType as an input to an operation. You must create
an actual instance of this type in Java. The error occurred in
D:\www\cs.alwin\crm\webserviceTest\account.cfm: line 12

10 : username="-"
11 : password="-"
12 : returnVariable = "returnVar" argumentcollection="#arguments#">
13 : </cfinvoke>
14 : <cfoutput>#returnVar#</cfoutput>


--[the code]--

<cfset arguments = structnew() />

<cfset arguments["entityName"] = "Account" />

<cfset arguments["id"] = "3DB1F426-316F-DB11-8277-003048528AA5" />

<cfset arguments["columnSet"] = structnew() />

<cfset arguments["columnSet"].attributes = arraynew(1) />

<cfset arguments["columnSet"].attributes[1] = "accountid" />

<cfinvoke

webservice = "http://myhost/mscrmservices/2006/CrmService.asmx?wsdl"

method="Retrieve"

username="-"

password="-"

returnVariable = "returnVar" argumentcollection="#arguments#">

</cfinvoke>

<cfoutput>#returnVar#</cfoutput>