Dynamics Mobile request document question

paszigorpaszigor Member Posts: 28
edited 2008-09-22 in Dynamics Mobile
Hi All,
Once I created a new order in "Mobile Sales" application and trying to synchronize I am receiving following error message in equest document section:

"Client found response content type of 'text/html'; charset 'utf-8', but expected 'text/xml'. WebException."

My document's header:
<?xml version="1.0" encoding="utf-8" ?>

but once I have investigated RequestDatabase, field CallParameters contains value:
<?xml version="1.0" encoding="utf-16" ?>

I suspect this is a problem.

How to enforce the document to be in UTF-16 or change in this field utf value?

Thank you
Igor

Comments

  • imurphyimurphy Member Posts: 308
    Had exactly the same problem some time back.

    I've never done this from Nav but from vb.net this is what you would do:
    Dim oXmldoc As New System.Xml.XmlDocument
    oXmldoc.LoadXml(oDataSet.GetXml)
    oXmldoc.PrependChild(oXmldoc.CreateXmlDeclaration("1.0", "utf-16", ""))
    

    You should be able to find the equivalent syntax in C/AL quite easily if you're already generating a file.

    Ian
  • paszigorpaszigor Member Posts: 28
    It is not from within NAV and this header is added automatically. That is why I suppose it is something to do with configuration files.

    Cheers,
    Igor
  • wochmwochm Member Posts: 26
    What if you used:

    XMLWriter.Settings.Encoding
  • paszigorpaszigor Member Posts: 28
    No access to source code :cry: , so I still think it is something to do with configuration files.

    Regards,
    Igor
  • AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
    [Topic moved from NAV/Navision to Dynamics Mobile forum]
Sign In or Register to comment.