JAVA 写的webService,我用soapclient客户端调用,怎么传递参数及i进去啊
如题,我现在的问题,
1. 提示“No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.” 这个怎么解决,怎么在服务端加Cross domain支持?
2. 使用SOAPClientParameters方法传递参数给wsdl. 总是不成功。
var p =new SOAPClientParameters();
p.add('key1',"1");
p.add('key2',"2");
var result= SOAPClient.invoke(url,"methodName",p,false);
alert(result);
望大家能帮帮我,在线等啊,
------解决方案--------------------你的定义里加上 addHeader("Access-Control-Allow-Origin", "*");