You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Wermus Fernando <fe...@xlnet.net.ar> on 2003/10/01 15:36:27 UTC

RE: problems with setting soapAction to method name

I´m a newbie, but I give you my javascript client code, my be it could help.


<html>
<head>
<script languaje="javascript">
function enviar(){
	var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.4.0");
	xmlhttp.open("POST",
"http://127.0.0.1:8080/axis/Calculator.jws",true);

	xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4) {
		   alert(xmlhttp.responseText)
		}
	}
	xmlhttp.setRequestHeader("Content-Type", "text/xml")
	xmlhttp.setRequestHeader("User-Agent", "XML Spy")
	xmlhttp.setRequestHeader("SOAPAction", "''")
	xmlhttp.setRequestHeader("Host", "127.0.0.1")
	xmlhttp.setRequestHeader("Cache-Control", "no-cache")
//Content-Length: 469

	var miSoap='<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV
:Body><m:add xmlns:m="http://DefaultNamespace"><i1
xsi:type="xsd:int">4</i1><i2
xsi:type="xsd:int">5</i2></m:add></SOAP-ENV:Body></SOAP-ENV:Envelope>'
	xmlhttp.send(miSoap);

}

</script>
</head>
<body>
<input type="button" onclick="enviar()" value="enviar">
<input type="area" name="msg" >
</body>
</html>