NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: jari@softmade.fi on November 26, 2016, 01:32:27 AM
-
Hello
I still have problems with the time and date formats.
Webservicemethod does not correspond to the correct format.
Jari
<?xml version="1.0" encoding="utf-8"?>
<syncAuto_matkat_response xmlns="sync">
<Tilausosoitteet>
<autm_aika_date>78722</autm_aika_date>
<autm_aika_time>3060001</autm_aika_time>
</Tilausosoitteet>
</syncAuto_matkat_response>
-
go to embeds, capsesoft objects, and find SaveCurrentFieldToXml(SaveCurrentFieldToXML PROCEDURE (Long p_x,Long p_DimCounter,String p_name) and then
if p_name = 'autm_aika_date'
self.FormatCurrentField('@d02') <--- your format
END
if p_name = 'autm_aika_time'
self.FormatCurrentField('@t06') <--- your format
END
-
Thanks Osquiabro
Problem is in Netwebservisemethod and there is no need to use xFiles object extension.
I added it anyway, but it did not help.
The same problem is with json
Jari
-
>> there is no need to use xFiles object extension.
there is if you intend to override a method.
>> I added it anyway, but it did not help.
add it as an extension, make sure the object name is XML, and on the web services method property _untick_ the option to "generate the xml".
cheers
Bruce
-
Thanks Bruce and Osquiabro
Now it works fine with XML
How can I fix JSON?
Jari
-
It's the same approach with json - except it's jFiles not xFiles.
see http://www.capesoft.com/docs/jfiles/jfiles.htm