c# - Ksoap2 : Calling DateTime datatype on .NET Web Service -


i have wcf web service. service have tested on .net platform.

i use ksoap 2 generate java classes file consume service. when use ksoap2, datetime datatype becomes string (due java doesn't have datetime datatype comparable datetime in .net)

so, @ getter attribute object, don't know how set value :

for example :

student.birth = "12/12/2013" student.birth = "2013/12/12" 

i have tested on case, maybe because format not true, exception :

this value cannot set null  

i don't know value. guess birth field above.

so. question : how use datetime data type in ksoap ? structure should put in datetime string ?

thanks :)

my guess use datetime.format strings

http://msdn.microsoft.com/en-us/library/8kb3ddd4%28v=vs.110%29.aspx

public class dateexample {     private datetime _dt;     public string dt     {                 {             return _dt.tostring("hh:mm:ss tt",                 system.globalization.cultureinfo.invariantculture);             // displays 06:09:01 pm          }         private set { }     } } 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -