Kiran Karale

Kiran Karale

  • NA
  • 390
  • 210.6k

Cosme Webservice in Android

Apr 23 2012 11:40 AM
hi,
Everybody 

Im trying to give a return type instead of dataset in form of xml document, I dont know whether this is right or wrong why because when this web service is being consumed on android im getting error as shown in picture and my code in web servcie at server is as follows 
error see in Attachment


[WebMethod]
public XmlDocument GetTechnicianHomePage(string userid)
{
DataSet ds = null;

con.ConString = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();
con.CmdType = CommandType.StoredProcedure;
con.CmdString = "ProcSearch_ServiceReq_AndriodImmediateAction";

SqlParameter user_code = new SqlParameter("@user_id", SqlDbType.NVarChar,500);
user_code.SqlValue = userid;

ds = con.LoadDataSet(user_code);

SoapException se = new SoapException("Fault occurred", SoapException.ClientFaultCode, Context.Request.Url.AbsoluteUri);

 XmlDocument xd = new XmlDocument();

 xd.LoadXml(ds.GetXml());

return xd;


throw se; 

and give me suggestion how to send proper xml through webservice and consume it in android through parsing..
its very urgent help me