InfoPath JScript -> WebService - InfoPath Dev
in

InfoPath Dev

InfoPath JScript -> WebService

Last post 12-03-2006 11:28 PM by diaboloche. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-30-2006 06:52 AM

    InfoPath JScript -> WebService

    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 !
  • 12-02-2006 01:26 AM In reply to

    Re: InfoPath JScript -> WebService

    HELP :(
  • 12-03-2006 07:50 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: InfoPath JScript -> WebService

    Hi Diaboloche,

    Can you use Try and Catch for your method and let us know which statement is going wrong and what is the error(Exception) you are getting?
  • 12-03-2006 11:28 PM In reply to

    Re: InfoPath JScript -> WebService

    Hi,

    I don't have an error... but nothing occurs...
    My messageBox "OK" functions...

    :(
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.