Hi,
Firstly, sorry for my english...
I have a problem.
I want to make communicate InfoPath and a WS in line of code.
I tested :
var objXH= new ActiveXObject("MSXML2.XMLHTTP.3.0");
objXH.open("PUT","http://10.20.20.103:90/WS/Service.asmx/InsertAnnonce", true);
objXH.setRequestHeader("Content","application/x-www-form-urlencoded");
strPostXMLText=Client.text; //XDocument.UI.Alert(strPostXMLText);
/*
strPostXMLText = strPostXMLText.replace(/\+/g, "%2B");
strPostXMLText = strPostXMLText.replace(/\&/g, "%26");
*/
objXH.send(strPostXMLText);
XDocument.UI.Alert("OK");
I don't have an error but that does not function...
Why ? :-(
For information, my WS (VS2005 C#) :
public void InsertAnnonce(string IDClient)
{
//---Création connexion---//
SqlConnection Connexion = new SqlConnection(Con);
//---Création procédure---//
SqlCommand Req = new SqlCommand("TEST", Connexion);
Req.CommandType = CommandType.StoredProcedure;
//---Définition des paramètres---//
Req.Parameters.Add("@IDClient", SqlDbType.Int);
//---Attribution des valeurs---//
Req.Parameters["@IDClient"].Value = Convert.ToInt32(IDClient);
//---Execution---//
Connexion.Open();
Req.ExecuteNonQuery();
Connexion.Close();
}
Can somebody help me?
Thanks !