Developer forum

Forum » Integration » Import fails with: The call to member LoadXml failed

Import fails with: The call to member LoadXml failed

Lars Larsen
Reply

Hi

I have a Data Integration job which is using the Dynamicweb provider. The job used to run without problems, but suddenly it fails with this error:

ti, 19 maj 2015 13:48:55: Starting scheduled task: Data Product & User Import from NAV
ti, 19 maj 2015 13:48:55: Request: <GetEcomData shopId="SHOP5"><tables><Products type="all"/><Currencies type="all"/><Languages type="all"/><Manufacturers  type="all"/><Units type="all"/></tables></GetEcomData>.
ti, 19 maj 2015 13:48:58: This message is for C/AL programmers: The call to member LoadXml failed: Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 1, position 14..
ti, 19 maj 2015 13:48:58: Scheduled task: Data Product & User Import from NAV failed.

I have tested the request with the test app, and then it works. But it doesn't when the job is being started as a scheduled task. Then it fails with the error above. Any idea of what is going wrong?


Replies

 
Jonas Krarup Dam
Reply

Hi Lars,

I have seen this problem once before, but I have not yet been able to reproduce it in a local environment, so unfortunately I do not have a solution for it (yet).

However, I do have a workaround.

In Batch integration, you have set up a scheduled task with the addin-type "Import data addin", for retrieving data from NAV.

If you replace this scheduled task with a task based on the addin-type "Import data with custom XML addin", and manually enter the XML you see above, you should be able to get it to work.

Please note that if you are importing both products and users, you will have to set up two seperate scheuled tasks for this.

Regards, Jonas

 
Lars Larsen
Reply

Hi Jonas

Thanks for your answer. The problem seems to be the starting part of the XML sendt to NAV, because it works if I sends the request using the test app. Therefore I would really like to see the complete XML sendt to NAV. So do you know of a way to debug that?

 
Lars Larsen
Reply

Hi Jonas

I have just tried to do an import with a new scheduled task based on the addin-type "Import data with custom request addin". The name of the addin isn't exactly the same as you wrote. But isn't it that addin you meant? Anyway the job fails with this error:

on, 20 maj 2015 08:24:29 Starting scheduled task: Import Product data from NAV  
on, 20 maj 2015 08:24:29 Request: <GetEcomData shopId="SHOP5"><tables><Products type="all"/><Currencies type="all"/><Languages type="all"/><Manufacturers type="all"/><Units type="all"/></tables></GetEcomData> - See more at: http://developer.dynamicweb.com/forum.aspx?ThreadID=41185&PID=48#sthash.GA2jK7J7.dpuf.  
on, 20 maj 2015 08:24:30 This message is for C/AL programmers: The call to member LoadXml failed: Data at the root level is invalid. Line 1, position 177..  
on, 20 maj 2015 08:24:30 Scheduled task: Import Product data from NAV failed.

I have attached the job definition. I have removed the values in the fields "Web service URL" and "Security key" after having runned the job and just before screenshoting the image.

Have I missed something or what is wrong?

Capture.PNG
 
Jonas Krarup Dam
Reply

Hmm - that's strange - especially since there's only 175 characters in the XML that's being sent to NAV, and it's complaining about an error in  position 177...

Do you know if any changes have been made to NAV or Dynamicweb - upgrades or security updates?

I seem to recall that this is an NAV 2009R2 - is that correct?

I'm trying to set up a similar import locally, and I will let you know if/when I find out what's going on.

/Jonas

 
Jonas Krarup Dam
Reply
This post has been marked as an answer

I found the problem. It was a bug that was introduced when we added logging of the requests that are sent via the scheduled task addins.

I have fixed it in bug #17381.

It will be included in the next hotfix.

/Jonas

Votes for this answer: 1
 
Lars Larsen
Reply

Great you found out what was wrong. When is the hotfix available?

 
Lars Larsen
Reply

Has now been fixed in 8.6.1.10

 

You must be logged in to post in the forum