Hi I seem have created a SOAP webservice using asp.net , and tested it using an PHP client to get data.And it seems for getting data the service works.
THe problem appears when I try to post the data.It seems that the server always recieve the value 0.Here is my asp.net web service code:
public void DeleteBook(int categoryId)
{
using (var conn = new OdbcConnection(connectionString))
{
conn.Open();
using (var command = new OdbcCommand())
{
command.Parameters.Add(new OdbcParameter("@CategoryId", categoryId));
command.CommandText = "DELETE FROM Books WHERE CategoryId = @CategoryId";
command.ExecuteNonQuery();
}
}
}
And here is my PHP Soap client code:
$client = new SoapClient($url);
if(isset($_POST["id"])){
$id = $_POST["id"];
echo $id;
$client->DeleteBook($id);
}
I debugged the service and it seems the DeleteBook method get's hit but the problem is that the categoryId is 0.
What am I doing wrong?