SOAP uses a different date and time format
Q Dynamics Nav (2013)
I have some code available with soap services to start a port XML
. If I enter the correct URI for this code to start the port, the data XML
is imported to OK. Also, if I just run the function XMLPORT.IMPORT
from NAV
, it will import the data file correctly XML
.
But if I use the class SoapHttpClientProtocol
to run the codeunit, then the dates that are in the XML data are imported back. The months and days change. I tried to copy my regional settings to the Network Service account with no luck.
Any other possible fixes or reasons why the data format during a call is different from the other?
So, in my long lost search for why this error is happening, I finally came across this:
http://blogs.msdn.com/b/nav/archive/2012/11/07/nav-2013-soap-web-services-on-a-multilanguage-environment.aspx
All SOAP operations are forced to use the EN-US culture and CANNOT be changed. But it looks like this was brought back in a new 2013 R2 build in April. You just need to add:
<add key="ServicesCultureDefaultUserPersonalization" value="true"/>
to your CustomSettings.config file (if you are using a service instance, make sure you change it in the folder [path-to-NAV]\71\Service\Instances\
) and it should use whatever culture you have in the user personalization table