C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,211 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I need to pull data from Android Java side with web service. But the examples I've looked at on the internet don't match my code. I can't pull the data as I am a beginner in webservice and java. I filled data into DataTable on webservice side. However, in the example I saw, the data was drawn as follows.
What code should I write to get output like this on SOAP webservice side?
I am importing data from DataTable like this but what I want is as above.
public class MG_ATI : System.Web.Services.WebService
{
DataTable atiDT = new DataTable();
string connStr ="";
[WebMethod]
public DataTable Ytir()
{
using (MySqlConnection conn = new MySqlConnection(connStr))
{
conn.Open();
using (MySqlCommand cmd = new MySqlCommand("SELECT ID, isAdi, isOlusturulmaTarihi, isDurum FROM is ORDER BY isDurum ASC, isOlusturulmaTarihi DESC", conn))
{
using (MySqlDataReader dr = cmd.ExecuteReader())
{
atiDT.Load(dr);
}
conn.Close();
}
}
return atiDT;
}
}