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
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