Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java _ Microsoft XML challenge

 
Sumanth Tarigopula
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I m developing one application wherein i have to send information from a Microsoft ASP page requesting XML from a jsp page on the server side.
Client Side ASP Code (JavaScript) is as follows:
var xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");
var qryRequest = new ActiveXObject("MSXML2.DOMDocument");
var qryResponse = new ActiveXObject("MSXML2.DOMDocument");
var sURL = "http://serverip/foo.jsp";
xmlhttp.Open("POST",sURL, false);
xmlhttp.Send(qryRequest.xml);
qryResponse.loadXML(xmlhttp.responseXML.xml);
alert(qryResponse.xml)
The Server JSP Page is as simple as :
<%
out.print ("<?xmlversion=\"1.0\"?><Name>foo</Name>");
%>
i get the response in client application properly when we use xmlhttp.responseText instead of xmlhttp.responseXML
Is there a way we can have the jsp page return a format for xmlhttp.responseXML intead of xmlhttp.responseText?

Thx in advance
Sumanth
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!