Server did not recognize the value of HTTP Header SOAPAction

Hai All,

I have add webreference in the project. but for some methods produce error

Server did not recognize the value of HTTP Header SOAPAction

I give the function definition below. can anyone tell me how to overcome the issue please

[WebMethod]
public string GetCurrentTaskStatusNameSDQ(Guid? CurrentTaskActionId, string CurrentLanguage, string DefaultLanguage, bool isServicedesk = false)
{
try
{
string result = "";
result = DLTasks.GetCurrentTaskStatusNameSDQ(CurrentTaskActionId, CurrentLanguage, DefaultLanguage, isServicedesk);
return result;
}
catch (Exception ex)
{
UtilityLayer.Common.ErrorLog(DateTime.Now.ToString() + ex.Message + "CheckError" + ex.StackTrace + " " + "ServiceDesk - GetCurrentTaskStatusName");
return "";
}
}





DLTasks :


public static string GetCurrentTaskStatusNameSDQ(Guid? CurrentTaskActionId, string CurrentLanguage, string DefaultLanguage, bool isServicedesk = false)
{
DLConnection conn = new DLConnection();

string GetCurrentTaskName = "";
string qry = "";
SqlDataReader dr = null;
try
{
if (isServicedesk == true)
conn.CreateServiceDeskSolidConnection();
else
conn.CreateConnection();

qry = "SELECT COALESCE(ttal.Name,ttal1.Name) AS CurrentaskActionName FROM tasktypeactions tta \n" +
"LEFT JOIN Tasktypeactionloc ttal ON tta.id=ttal.TaskTypeActionID AND ttal.Locale=@CurrentLanguage \n" +
"LEFT JOIN Tasktypeactionloc ttal1 ON tta.id=ttal1.TaskTypeActionID AND ttal1.Locale=@DefaultLanguage \n" +
"WHERE tta.id=@CurrentTaskActionId ORDER BY sequencenumber ";

SqlCommand cmd = new SqlCommand(qry, conn.con);

SqlParameter param = new SqlParameter("@CurrentTaskActionId", SqlDbType.UniqueIdentifier);
param.Direction = ParameterDirection.Input;
param.Value = CurrentTaskActionId;
cmd.Parameters.Add(param);

param = new SqlParameter("@CurrentLanguage", SqlDbType.VarChar, 5);
param.Direction = ParameterDirection.Input;
param.Value = CurrentLanguage;
cmd.Parameters.Add(param);

param = new SqlParameter("@DefaultLanguage", SqlDbType.VarChar, 5);
param.Direction = ParameterDirection.Input;
param.Value = DefaultLanguage;
cmd.Parameters.Add(param);

dr = cmd.ExecuteReader();

if (dr.Read())
{
object value = dr[0];
if (value != null && value.ToString() != "")
{
GetCurrentTaskName = value.ToString();
}
}
dr.Close();
conn.CloseConnection();

return GetCurrentTaskName;

}
catch (Exception Ex)
{
if (!dr.IsClosed) dr.Close();
conn.CloseConnection();
UtilityLayer.Common.ErrorLog(DateTime.Now.ToString() + Ex.Message + " " + Ex.StackTrace + " " + "DLTasks - GetCurrentTaskStatusNameSDQ");
return "";
}
}