Java Webservice promotion method:
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 Webservice method:
<? Php
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 return:", print_r (array_count_values ($ str ));
} Else {
Echo "error:", $ err;
}
?>
Where:
'Url' is namespace.
'Arg0' is the default parameter name and cannot be changed.
The parameter of Java website promotion method must be of the Object type. Fblww-0312)
From Network Marketing