|
1. wex5环境3.6
2. webservice(使用apache cxf开发的webservice,url:http://192.168.1.60:8090/ecif_service/service/cmp?wsdl)
我查看了轮胎中其他关于webservice调用的帖子,还是没有解决问题,求助!!
1)我使用cordovaHTTP调用方式,只能获取到url在浏览器中显示的内容,而并不是调用webservice暴露的接口
- cordovaHTTP.get("http://192.168.1.60:8090/ecif_service/service/cmp/hello", {
- partyId : "abc"
- }, {
- }, function(response) {
- console.log("success");
- console.log(response);
- }, function(response) {
- console.log("error");
- console.log(response);
- });
复制代码
2)采用ajax方式,则后台报错
- $.ajax({
- type: "get",
- url: "http://192.168.1.60:8090/ecif_service/service/cmp/hello?wsdl",
- dataType: "jsonp",
- jsonp: "CallBack",
- success: function(response){
- console.log("success");
- console.log(response);
- },
- error: function(e){
- console.log("error");
- console.log(e);
- }
- });
复制代码 3)修改普通ajax调用
- $.ajax({
- url: "http://192.168.1.60:8090/ecif_service/service/cmp?wsdl",
- success: function(response){
- console.log("success");
- console.log(response);
- },
- error: function(e){
- console.log("error");
- console.log(e);
- }
- });
复制代码
以上。
难道只能通过在后台新建一个servlet中间层,再中间层再去调用webservice接口?
|
|