WSDL connection doing strange things
-
giovedì 7 giugno 2012 09:06
Hey,
I'm sorry if this is a very odd question. Also my programming knowledge is patchy.
Basically, I am looking after a CRM 2011 system that has a bunch of code to bring in new users from an external system. It uses mostly "early bounds" iorgservice (which I understand is the "CRM 2011 way" of doing things) and also some older code which uses WSDL (CRM 4?). At least, I think it's WSDL.. it seems to point to http://crm/MSCrmServices/2007/CrmServiceWsdl.aspx
I'm pretty comfortable with the early bounds stuff and LINQ etc, but the code which uses WSDL has recently started playing up. A few days ago our CRM server had a hard reboot. There was then a SQL error which caused logs to blow up and fill the HDD - CRM fell over. I cleared the logs and repaired the error with DBCC (the repair did not need 'allow_data_loss' so i figured it was fine).
Since then, any of our code that uses WSDL has two apparent problems:
1. Using the CrmWS.CrmService to create a record seems to fail. It returns a guid and doesn't throw an exception, but it doesn't create the record. Creating one with the IOrganizationService works fine.
2. Using fetchxml (CrmService.Fetch) to retrieve record guids is not finding any records that were created in the last few days. Using the equivalent LINQ code provides me with the record.
This is all code that has been happily in place and functioning for a year until the other day. If anyone has any suggestions, I would realllllllllllllllly appreciate it. My options at the moment include 1. converting all the code to the new iorgservice thing (might take 4-5 hours, but i'm afraid there's still an underlying problem), or 2. restore to the backup from a few days ago (not really an option - would lose too much data)
Thanks
James
Tutte le risposte
-
giovedì 7 giugno 2012 22:58
The database shouldn't have any effect on the 2007 (CRM 4) endpoint, unless some configuration settings were changed inadvertantly. If you could share some of the code for (1) that is failing, it'd be helpful. Also, if it is returning an id, have you checked the DB to make sure the record wasn't actually created?
As far as the query goes, one way to verify that the Fetch is not incorrect for some reason is to run the query against the 2011 endpoint (IOrganizationService) using FetchXml (use IOrganizationService.RetrieveMultiple using a FetchExpression).
Michael
-
giovedì 7 giugno 2012 23:32
The database shouldn't have any effect on the 2007 (CRM 4) endpoint, unless some configuration settings were changed inadvertantly. If you could share some of the code for (1) that is failing, it'd be helpful. Also, if it is returning an id, have you checked the DB to make sure the record wasn't actually created?
Agreed; issues with the CRM Database and your code no longer working is very likely correlative, not causative.
Is the CRM multi-tenanted? Or is there an alternate dev/staging environment. In the absence of exceptions and with Create requests returning a GUID, the operations are clearly working; perhaps the 2007 endpoint code is pointing at the wrong place (be it Server and/or Org)?
You could try enabling CRM tracing. If the really code is failing, you should be able to see evidence of, and more explicit information regarding, such in the trace log files.
--pogo (pat) @ pogo69.wordpress.com