&#x0 is an Invalid XML Character

ATTENTION: This forum is no longer active. Please navigate to our new support site at https://support.starfishetl.com/
Viewing 2 posts (of 2 total)
Anosh Wadia
User - Author
Post count: 19

I'm running am import from SalesLogix (SQL) --> SalesForce via the API (not using BULK).

The data I'm pushing over are SalesLogix HISTORY records to SalesForce TASKS.

I managed to get almost 2000 records over successfully, however I'm getting an error on about 50 records and all of the errors are the same:

System.Web.Services.Protocols.SoapHeaderException: Character reference "&#x0" is an invalid XML character.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at StarfishEngine.SalesforcePartner.SforceService.create(sObject[] sObjects)
at StarfishEngine.StarfishService.PostStageSalesforcePartner(rowdat& RowData, Stage st)

I am not sure which field mapping is causing the issue.

I do have the ActivityDate field mapped using the following script:

  1. Function ScriptedField
  2. 	dim dt
  3. 	dt = FormatDateXML("@@ORG:COMPLETEDDATE@@")
  4. 	ScriptedField = dt
  5. End Function

I checked and the COMPLETEDDATE on these records appears to be fine.
The other possibility I can think of is that the LONGNOTES field has some special characters which are not going over to SalesForce? I looked at the text and I'm not seeing those characters though.

Any assistance would be appreciated!


Comments (2)

Aron Hoekstra's picture Aron Hoekstra
Post count: 2

There's a scripted function for dealing with this kind of garbage data called RemoveIllegalXMLCharacters().. This should be used cautiously because it will strip data from your field, but in this case I think it's the only option you have.. It's usually caused by a note/description type field. Use it like this in a function:

  1. Function ScriptedField
  2.      ScriptedField = RemoveIllegalXMLCharacters(Origin("FieldName"))
  3. End Function

Log in to post comments
Anosh Wadia's picture Anosh Wadia
User - Author
Post count: 19

Thanks Aron, that resolved the issue.

Log in to post comments
Viewing 2 posts (of 2 total)

Forum Login

Login or sign up for our forums to connect to the user community.


You must log in to post.

Not a Member? Register.