- Problem with SDK sample code
- Posted by JR on June 9th, 2004
I am trying to run the sample that is in the Microsoft CRM
Version 1.2 SDK under "How To --> Creating a Query 1". The
sample runs fine until it actually calls the
Microsoft.Crm.Platform.Proxy.CRMQuery.Create() method and
then it throws the following exception:
SOAP Server Application Faulted
A parse error was encountered in the XML
A tag was encountered where data was expected at line1,
column 227
I cut and pasted this code verbatim and I don't see
anything wrong with the XML that gets passed into the
Create() method.
I can run the sample in "How To --> Creating a Query 2"
just fine.
Any suggestions are welcome.
Thanks.
-jr
- Posted by John O'Donnell on June 9th, 2004
I looked a the code and there seems to be an issue wit the fetchxml part ie
this code
// This is "select * from Account" and will return all
// accounts for which you have read access
String strFetchXml = String.Concat("<fetchxml><fetch><",
"entity name='Account'",
"><all-attributes /></entity",
"></fetch></fetchxml>");
compare this code with the same example from CRM 1.0 and you get this
CRM v1.0 SDK
// This is "select * from Account" and will return all
// accounts for which you have read access
string strFetchXml = "<fetch mapping='logical'><entity
name='account'>";
strFetchXml += "<all-attributes/></entity></fetch>";
you need to compare the CRM 1.0 and CRM 1.2 versions and see if you can fix
the fetchxml line.
"JR" <anonymous@discussions.microsoft.com> wrote in message
news:1a1bd01c44e5c$7a313720$a601280a@phx.gbl...
- Posted by JR on June 11th, 2004
Well it is curious that there is such a difference in the
SDK code between 1.0 and 1.2 but it turns out the help
inlcuded in the downloaded 1.2 SDK has the same code that
is in the online help for the 1.0 SDK.
When I tried the code in the online 1.2 SDK as you posted
below, I just received a different error message.
Makes me wonder if someone at Microsoft has actually run
this code.
- Posted by John O'Donnell on June 15th, 2004
actually i checked a number of pages in the online sdk. A number of pages
have slight corruptions on them in that there are a few weird characters
here and there. I have reported it to Microsoft and hopefully someone will
take a look.
"JR" <anonymous@discussions.microsoft.com> wrote in message
news:1af1e01c44fb7$776c9230$a601280a@phx.gbl...