We understand that it not a universal solution but with limitations we had and since we where aware of the fact the legacy solution was a IE only solution so we concluded it to be the best option available, we are open to any new solutions that anybody out there might have or come across, please do share with us.
Sample Code
var xmlObj = new ActiveXObject("Msxml2.DOMDocument") ;
// Creating Soap Envelope as string
var sXml = "<?xml version=\"1.0\" ?>" ;
sXml += "<soap:Envelope "
sXml += "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " ;
sXml += "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " ;
sXml += "xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" ;
sXml += "<soap:Body>" ;
sXml += "<SubmitResult xmlns=\"http://tempuri.org/\">" ; // Method Reference
sXml = sXml + "<ID>" + vID + "</SRID>" ; // Parameter values being set vID contains a valid Id
sXml = sXml + "<Result>" + vResult + "</Result>" ; // vResult is valid result to be sent to database
sXml += "</SubmitResult></soap:Body></soap:Envelope>"
// Try to parse the XML string into DOM object
xmlObj.loadXML(sXml) ;
//To see the validated XML string is well-formed
var xmlHTTP = new ActiveXObject("Msxml2.XMLHTTP") ;
xmlHTTP.Open ( "Post", serviceUrl , false) ;
xmlHTTP.setRequestHeader("SOAPAction", "http://tempuri.org/SubmitResult") ;
xmlHTTP.setRequestHeader("Content-Type", "text/xml; charset=utf-8" ) ;
xmlHTTP.Send(xmlObj.xml) ;
// Getting Result
var xmlResponse = xmlHTTP.responseXML ;
if(xmlResponse != null)
{
alert('Data submitted.');
}
This worked well for us and client accepted the solution, if there are any other ways to do the same please do share with us, we are always willing to learn.
Aking Web Tech a leading IT company & Provides web services :- website Development in just 1,999 Rs/-, software development like {Billing software, School Management Software, Inventory Software, ERP, CRM}, Domain & Hosting , SEO
ReplyDeletewebsite development in indore