Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

EWS 2.0 Exchange 2010 Create/Update contact http://schemas.microsoft.com/exchange/services/2006/types:BusinessHomePage' element is invalid

$
0
0

Hi All, 

I've built a windows service which retrieves contact data from a web service and creates/updates contacts in exchange using EWS.

I am receiving the error: 

7608Exception12/8/2013 3:45:48 PMThe request failed schema validation: The 'http://schemas.microsoft.com/exchange/services/2006/types:BusinessHomePage' element is invalid - The value 'http://www.fdcreports.com (redirecting to Elsevier web)' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:anyURI' - The string 'http://www.fdcreports.com (redirecting to Elsevier web)' is not a valid Uri value.

This error causes the create/update of the contact in exchange to fail.

Obviously the URI is invalid as it contains some extra text and there are many examples of this (or multiple URLs in the data). However, my client points out to me that in Outlook and Outlook web access it is possible to save any text you like in this field when creating a contact. I would like to have my windows service do the same, and client requires it.  

I guess what I want to ask; is there a way to bypass the schema validation and let the Contact.Update/Create call run successfully even if the URI is not a valid URI??

Code is fairly straight forward:

Microsoft.Exchange.WebServices.Data.Contact nContact = new Microsoft.Exchange.WebServices.Data.Contact(EWSService);
                    nContact.FileAsMapping = FileAsMapping.SurnameCommaGivenName;
                    nContact.GivenName = ResultSet.GetString(ResultSet.GetOrdinal("FirstName"));
                    nContact.Surname = ResultSet.GetString(ResultSet.GetOrdinal("LastName"));
nContact.BusinessHomePage = ResultSet.GetString(ResultSet.GetOrdinal("WebSite"));

nContact.Save(TargetFolderId);

Any help would be really appreciated!

Cheers

Lucas


LucasF


Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>