Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: axis and soap from javascript ?

From: "news.comcast.giganews.com" <geoffmcgrath@-----.--->
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




transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent