Open GoogleCodeExporter opened 8 years ago
The project is migrating to github. If you believe this issue is still valid
and should be tracked please file a new issue at
https://github.com/simpligility/ksoap2-android/issues
Original comment by mosa...@gmail.com
on 7 Aug 2015 at 5:35
I can not write English well. excuse me!!
I had this problem when i return custom class "clsResult" in WCF methods:
[OperationContract]
[WebInvoke(Method = "POST",
UriTemplate = "/GetSessionChange/pageIndex={pageIndex}&pageSize=pageSize}& DTUpdate={DTUpdate}",
BodyStyle = WebMessageBodyStyle.Wrapped,
ResponseFormat = WebMessageFormat.Json)]
clsResult GetSessionChange(int pageIndex , int pageSize , long DTUpdate );
this class has a proprty of object type with "result" name that filled with a list.
[DataContract]
public class clsResult
{
private bool runStatus= true;
private object result =null;
when i call this method with ksoap2 in android "Connection reset by peer" exception occurred.
i changed this class to:
[DataContract]
public class clsResult<T>
{
private bool runStatus= true;
private List<T> result;
and service to:
[OperationContract]
[WebInvoke(Method = "POST",
UriTemplate = "/GetSessionChange/pageIndex={pageIndex}&pageSize=pageSize}& DTUpdate={DTUpdate}",
BodyStyle = WebMessageBodyStyle.Wrapped,
ResponseFormat = WebMessageFormat.Json)]
clsResult<MSession> GetSessionChange(int pageIndex , int pageSize , long DTUpdate );
that MSession was a custom class. with these changes "Connection reset by peer" does not occurred.
Original issue reported on code.google.com by
smohanra...@gmail.com
on 31 Mar 2015 at 5:21