jeudi 28 avril 2016

Array ( [faultcode] => S:Client [faultstring] => Cannot find dispatch method for {}parameters ) 1

Hello so i have a web service in java to be called by a php client, trying to call the bagi method

@WebService(serviceName = "CobainServer")
public class CobainServer {

    @WebMethod(operationName = "bagi")
    public double bagi(@WebParam(name = "angka1") int angka1, @WebParam(name = "angka2") int angka2) {
        //TODO write your implementation code here:
        return (angka1*1.0)/angka2;
    }
}

And I have a client in php using nusoap

<?php
ini_set('error_reporting', E_STRICT);
require_once "nusoap.php";

$client = new nusoapclient("http://localhost:8080/PBP2016SoapServerB/CobainServer?WSDL",true);
$error  = $client->getError();

if ($error) {
    echo "<h2>Constructor error</h2><pre>" . $error . "</pre>";
}   

$result = $client->call('bagi',array('angka1'=>'50','angka2'=>'5','http://CobainServer/'));
print_r($result);

?>

it shows error "Array ( [faultcode] => S:Client [faultstring] => Cannot find dispatch method for {}parameters )"

Please help




Aucun commentaire:

Enregistrer un commentaire