Web site Promotion WebService method in Java:
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 calls the WebService method:
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 "program returns:", Print_r (Array_count_values ($STR));
} else {
echo "Error:", $err;
}
?>
which
' URI ' is namespace.
' arg0 ' is the default parameter name and cannot be changed.
The parameters of the Java Web site promotion method must be of type object. (fblww-0312)
From Internet Marketing
http://www.bkjia.com/PHPjc/478323.html www.bkjia.com true http://www.bkjia.com/PHPjc/478323.html techarticle Web site Promotion in Java WebService Method: Public String Findcode (Object code) {Elementnsimpl Ens = (elementnsimpl) code; String num = ens.gettextcontent (); SYSTEM.OUT.PRINTLN (code) ...