javascript - calling webservice using jquery -


i trying call jax-ws webservice javascript using jquery. here html code

 <html>   <head>     <title>calling web service jquery</title>     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>     <script type="text/javascript">         $(document).ready(function () {             $("#btncallwebservice").click(function (event) {               var soaprequest = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"+"<soapenv:envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/xmlschema-instance/\" xmlns:xsd=\"http://www.w3.org/2001/xmlschema/\" xmlns:core=\"http://core.codon.com/\"><soapenv:body><core:rectangle><length>" + "12"+ "</length><breadth>" + "10"+ "</breadth></core:rectangle></soapenv:body></soapenv:envelope>";               var url11 = "http://localhost:8090/area?wsdl";           $.ajax({                 type: "post",                 url: url11,                 contenttype:  "text/xml; charset=\"utf-8\"",                 datatype: "xml",                 data: soaprequest,          processdata: false,                 success: processsuccess,                 error: processerror             });          });     });      function processsuccess(data, status, req) {         if (status == "success")         alert(req.responsetext + " @@@" + status);             $("#response").text();     }      function processerror(data, status, req) {         alert(req.responsetext + " " + status);     }        </script>  </head> <body> <h3>     calling web services jquery/ajax  </h3>      <input id="btncallwebservice" value="call web service" type="button" />    <div id="response" />  </body>  </html> 

this code working ie , getting response alert xml format. not working on mozilla..whats wrong code. can please me out. in advance

make sure web service returning xml output header generation/contenttype set text/xml. although ie don't care ff , chrome did.

setting content-type header should solved it.


Comments