![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: axis and soap from javascript ? >Thread Next - Re: axis and soap from javascript ? Re: axis and soap from javascript ?To: NULL Date: 4/2/2004 7:15:00 PM >
> It's been suggested to me that I look more into the "msxml" package,
> which we have already been using to do XMLHttpRequest, and see what
> functions it includes for sending and receiving and parsing xml.
>
> Do you believe I'm on the right track ?
>
> Thanks. /Eric
>
>
Eric,
Hi...Here's an example of using Microsoft's implimentation XMLHTTP.
You'll want to do a lot more reading up about it...consider going down
to your local full-service bookstore, or looking for a text on line, or
<gasp/> googling for more info...but this will get you started:
var XMLHTTP = new ActiveXObject( 'Msxml2.XMLHTTP' );
var XMLRequest = new ActiveXObject( 'Msxml2.DOMDocument' );
var XMLResponse;
var method = 'POST';
var async = false;
// TODO: Change the string in the next line to whatever xml you need to
send...
var xmlString ='<root><content>Here is some text</content></root>';
// TODO: Change the next line to the web address of the server you are
// trying to get information from
var url = 'http://localhost/server.asp';
var bSuccessfullyLoaded = XMLRequest.loadXML( xmlString);
if( bSuccessfullyLoaded )
{
debugger;
XMLHTTP.Open( method, url, async );
XMLHTTP.Send( xmlString );
XMLResponse = XMLHTTP.responseXML;
if( 0 == XMLResponse.parseError.errorCode )
{
// TODO: Do something useful here once you
// successfully get a response...
window.alert( XMLResponse.xml );
}
else
{
// TODO: Handle the parsing error here
window.alert('A Parse Error');
}
}
Good Luck!
--Geoff McGrath
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
