need help from expert on xmlhttp post 
Author Message
 need help from expert on xmlhttp post

Hello all:

I use xmlhttp SOAPAction to send an xml to server and get xml back.
everything is working in PC, but not working in Mac. Here is the code in
javascript how I send: I need this working in both PC and Mac.
var strSoap= "";
var chr = String.fromCharCode(13)

strSoap += '<?xml version="1.0" encoding="utf-8"?>'+ chr;

strSoap += '<soap:Envelope
xmlns:xsi=" http://www.*-*-*.com/ ;
xmlns:xsd=" http://www.*-*-*.com/ ;
xmlns:soap=" http://www.*-*-*.com/ ;>'+ chr;

strSoap += '<soap:Body>'+ chr;

strSoap += '<' + method + ' xmlns="' + xmlns + '">'+ chr;

for (i=0;i<varArray.length;i++) {

strSoap += '<' + varArray[i][1] + '>' + varArray[i][2] + '</' +
varArray[i][1] + '>' + chr

Quote:
};

strSoap += '</' + method + '>' + chr;

strSoap += '</soap:Body>'+ chr;

strSoap += '</soap:Envelope>' + chr;

//still working here

var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

var xmldom = new ActiveXObject("MSXML2.DOMDocument");

xmlhttp.Open("POST", wservuri,false);

xmlhttp.setRequestHeader("Content-Type","text/xml; charset=utf-8");

st = xmlns + "/" + method;

xmlhttp.setRequestHeader("SOAPAction:",st);

//not woking here:   alert("Message Sent : " + chr + strSoap);

xmlhttp.Send(strSoap);

//not woking here: alert("Message Sent : " + chr + strSoap + chr + chr +
"Message Received: " + chr + xmlhttp.responseTEXT);

xmldom.loadXML(xmlhttp.responseTEXT);

//end coding

Thanks for any suggestion.

-amyj



Sat, 23 Apr 2005 08:23:22 GMT  
 need help from expert on xmlhttp post
I found the solutions is to apply the xsl xml on server site instead of
client.

-amyj


Quote:
> Hello all:

> I use xmlhttp SOAPAction to send an xml to server and get xml back.
> everything is working in PC, but not working in Mac. Here is the code in
> javascript how I send: I need this working in both PC and Mac.
> var strSoap= "";
> var chr = String.fromCharCode(13)

> strSoap += '<?xml version="1.0" encoding="utf-8"?>'+ chr;

> strSoap += '<soap:Envelope
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+ chr;

> strSoap += '<soap:Body>'+ chr;

> strSoap += '<' + method + ' xmlns="' + xmlns + '">'+ chr;

> for (i=0;i<varArray.length;i++) {

> strSoap += '<' + varArray[i][1] + '>' + varArray[i][2] + '</' +
> varArray[i][1] + '>' + chr

> };

> strSoap += '</' + method + '>' + chr;

> strSoap += '</soap:Body>'+ chr;

> strSoap += '</soap:Envelope>' + chr;

> //still working here

> var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

> var xmldom = new ActiveXObject("MSXML2.DOMDocument");

> xmlhttp.Open("POST", wservuri,false);

> xmlhttp.setRequestHeader("Content-Type","text/xml; charset=utf-8");

> st = xmlns + "/" + method;

> xmlhttp.setRequestHeader("SOAPAction:",st);

> //not woking here:   alert("Message Sent : " + chr + strSoap);

> xmlhttp.Send(strSoap);

> //not woking here: alert("Message Sent : " + chr + strSoap + chr + chr +
> "Message Received: " + chr + xmlhttp.responseTEXT);

> xmldom.loadXML(xmlhttp.responseTEXT);

> //end coding

> Thanks for any suggestion.

> -amyj



Sat, 30 Apr 2005 03:57:06 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. how to xmlhttp to post a file

2. Simulating POST method for forms using XMLHTTP

3. XMLHTTP XMLDOM Need help

4. xmlhttp: retrieve POSTed data within ASP

5. Can XMLHTTP be used to POST?

6. Problem with xmlhttp post

7. Need help with XMLHTTP

8. help, help, help...I'm begging here :-\ RE RE POST simple code help needed

9. JOB POSTING: Basic AND Unix Expert Sought ...

10. Expert help needed - OLE field for CSV text files

11. Need Experts Help Please

12. .Net expert help needed

 

 
Powered by phpBB® Forum Software