my android code is:
the .net webservice code:
<%@ WebService Language="C#" Class="WebServiceDemo" %>
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.SqlClient;
[WebService(Namespace = "http://tempuri.org/", Description = "Webservice dimostrativo per JavaScript SOAP Client")]
public class WebServiceDemo : WebService
{
[WebMethod(Description = "Hello World!")]
public
string HelloWorld()
{
return "Hello World!";
}
[WebMethod(Description = "Hello [YOUR NAME HERE]")]
public string HelloTo(string name)
{
//return "Hello " + name + "!";
int count = 1;
int rows;
//string shital = "www.ixifoto.com";
//SqlConnection myConnection = new SqlConnection(@"Data Source=208.91.198.196.76;Initial Catalog=webdata;User Id=ixi;Password=web1234;");
SqlConnection myConnection = new SqlConnection(@"Data Source=209.62.85.76;Initial Catalog=Ils;User Id=ibase;Password=123456;");
try
{
myConnection.Open();
SqlCommand myCommand = new SqlCommand();
myCommand.Connection = myConnection;
// myCommand.CommandText = "insert into test123 (rec_name,city)values('" + shital + "','" + name + "')";
myCommand.CommandText = "insert into test123 (city)values('" + name + "')";
myCommand.Parameters.Add("@value", SqlDbType.VarChar).Value = name;
//rows = myCommand.ExecuteNonQuery();
myCommand.ExecuteNonQuery();
//SqlDataReader myReader = myCommand.ExecuteReader();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
finally
{
myConnection.Close();
}
return "Done!!!";
}
should i post the xml soap which comes under the webservices when executed?