Skip to main content
Inspiring
February 21, 2007
Question

webservices and abstract types

  • February 21, 2007
  • 2 replies
  • 464 views
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>




This topic has been closed for replies.

2 replies

Participant
February 21, 2011

Hi, did you ever figure out how to connect to MS CRM via CF webservices?  I'd love to know what you did

Thanks,

Jill

Participant
December 3, 2007
I found out that the retrieve method accepts columnSet as a class and id as a class. These are not strings that you can pass into MSCRM 3.0. However, I have no idea how to create a .NET acceptable class and pass it in. If you figured this out, or if others have thoughts, I'd love to hear how you've gone about it.

Thank you!