consuming webservices in VB.net thru javascript

B

Bhagwati

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top