var xmlHttp; var soapRequest = "" + "" + "" + "" + ""; function createXmlHttpRequest(){ if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } else { xmlHttp = new XMLHttpRequest(); } try{ xmlHttp.open("POST","http://172.19.2.83:8080/harpegeCore-1/IndividuServiceBean"); xmlHttp.onreadystatechange = callback; xmlHttp.setRequestHeader("Content-Type", "text/xml"); xmlHttp.send(soapRequest); alert("request sent"); } catch(e){ alert(e); } } function callback(){ alert('callback called'); if(xmlHttp.readyState==4){ if(xmlHttp.status == 200){ alert("back from the call"); } } }