时间:2021-07-01 10:21:17 帮助过:3人阅读
public String findCode(Object code) {
ElementNSImpl ens = (ElementNSImpl)code;
String num = ens.getTextContent();
System.out.println(code);
SqlSearch sqlSearch = new SqlSearch();
String result = sqlSearch.findCode(String.valueOf(num));
sqlSearch = null;
return result;
}
PHP调用Webservice方法:
require_once("lib/nusoap.php");
$client = new soapclient('http://192.168.0.108:8080/data/DataPort?wsdl',array('uri'=>'http://ws.data.com/'));
$str=$client->call("findCode",array("arg0"=>"123456"));
if (!$err=$client->getError()) {
echo " 程序返回 :",print_r(array_count_values($str));
} else {
echo " 错误 :",$err;
}
?>
其中:
'uri'是namespace。
'arg0'是默认参数名,不能改。
Java网站推广方法的参数必须是Object类型。(fblww-0312)
http://www.bkjia.com/PHPjc/478323.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/478323.htmlTechArticleJava中的网站推广Webservice方法: public String findCode(Object code) { ElementNSImpl ens = (ElementNSImpl)code; String num = ens.getTextContent(); System.out.println(code)...