The difference between calling WebService using jquery Ajax and calling WebService using pure JS Ajax is that
The former can run normally on IE, chrome, and Firefox, while the latter can only run normally on IE, and the former has pure cross-origin access problems.
1. Create a web project named cxf_javasclient, and paste the client code generated by calling the WebService Service using spring method into the new project,
Export the cxf core jar package to the Lin directory.
2. Import the jquery JAR File
32.16jquery_ws.html
Create a new HTML file named jquery_ws.html under webroot. the code is as follows:
<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en"> <HTML>
4. Deploy the cxf_rjclient to Tomcat.
5. Enter http: // localhost: 8080/cxf_javasclient/jquery_ws.html in the address bar for testing.
The following is an illustration of jquery's cross-origin access problem: