<script type="text/javascript">
function post() {
var xmlhttp=false;
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
{
try
{
xmlhttp = new XMLHttpRequest();
}
catch (e)
{
xmlhttp=false;
}
}
if (!xmlhttp && window.createRequest)
{
try
{
xmlhttp = window.createRequest();
}
catch (e)
{
xmlhttp=false;
}
}
var dest = "http://localhost:8080/cxf-ws/services/UserManager";
xmlhttp.open("POST", dest, true);
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState==4)
{ document.getElementById("result").innerHTML = xmlhttp.responseText;
}
};
xmlhttp.setRequestHeader("Man", "POST " + dest + " HTTP/1.1");
xmlhttp.setRequestHeader("MessageType", "CALL");
xmlhttp.setRequestHeader("Content-Type", "text/xml");
var soapmess = "<?xml version='1.0' encoding='UTF-8'?>" + '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">' + "<SOAP-ENV:Body>" + "<Insert> <userId>2005221104210066</userId> <userName>Leon Cao</userName> <userEmail>caohongliang2@163.com</userEmail> <userAge>23</userAge> </Insert> " + "</SOAP-ENV:Body> </SOAP-ENV:Envelope>";
xmlhttp.send(soapmess);
}
</script>
07-12
1719

“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交