consuming webservices in VB.net thru javascript

Discussion in 'ASP .Net Web Services' started by Bhagwati, Mar 5, 2004.

  1. Bhagwati

    Bhagwati Guest

    Hello all,
    I am creating a webservice in VB.net and accessing thru the
    client side javascript . I am passing a xmldom object in the script and
    trying to receive it in the format of xmldocument in the webservice. But
    somehow this does not work.

    function myxml()

    {

    var domDoc= new ActiveXObject("Microsoft.XMLDOM");

    //PI

    var mystring;

    var pi =domDoc.createProcessingInstruction("xml","version='1.0'");

    domDoc.insertBefore(pi,domDoc.childNodes.item(0));


    var root = domDoc.createNode(1,'ROOTElement','');

    //first para : NodeType(1 means NodeElement), second para: name of node,
    third para : namespace


    domDoc.appendChild(root);


    var firstChild = domDoc.createNode(1,'FName','');

    root.appendChild(firstChild);

    firstChild.text = document.Form1.mybox.value;


    var secondChild = domDoc.createNode(1,'SecondChild','');

    root.appendChild(secondChild);


    //attributes of the secondChild element


    secondChild.setAttribute('revision','1.0');

    alert(domDoc.xml);

    service.useService("http://localhost/DynamicUI/dynamicui.asmx?WSDL","ui");

    mystring=service.ui.callService(fun,"Getxml",domDoc);

    alert(mystring);

    alert("i called the getxml service");

    }

    And the signature of the webservice method is

    <WebMethod()> Public Function Getxml(ByVal myxml As XmlDocument) As String

    Plz help asap

    Regards,

    Bhagwati
    Bhagwati, Mar 5, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    371
  2. Baccarin

    Consuming WebServices using HttpWebRequest class

    Baccarin, Jul 15, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    152
    Baccarin
    Jul 15, 2003
  3. Anoop M

    Consuming .NET Webservices in Java and PHP

    Anoop M, Mar 7, 2007, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    186
    John Saunders
    Mar 7, 2007
  4. THTB
    Replies:
    0
    Views:
    184
  5. Max Williams
    Replies:
    3
    Views:
    169
    Robert Klemme
    Jan 6, 2009
Loading...

Share This Page