I am writng a program in php which is accessing a web services code is : error_reporting(0); require_once('../lib/nusoap.php'); $client = new nusoap_client("https://abc_ws?wsdl", 'WSDL'); $error = $client->getError(); if ($error) { die("client construction error: {$error}\n"); } $client->setCredentials('login', '123456', 'basic'); $param = array(param1' => '1234567899'); $result = $client->call('MyGetOperation', $param); if ($client->fault) { print_r($result); } Code (markup): and this is my request and response Request : <?xml version="1.0" encoding="ISO-8859-1"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns6153="http://tempuri.org"> <SOAP-ENV:Body> <CDES-GET-Request xmlns="http://url.com/cdes/services"/> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Code (markup): and i am getting response : <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body><soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>cvc-complex-type.2.4.b: The content of element 'My-GET-Request' is not complete. One of '{"http://url.com/cdes/services":param1}' is expected.</faultstring> </soap:Fault> </soap:Body> </soap:Envelope> Code (markup): I am newbe in web services and php, so suggest me the way of how solve it Thanks,
no real experience with soap, but $param = array(param1' => '1234567899'); Code (markup): there is a single quote missing, properbly the reason why it doesnt recieve the required param element
That would cause syntax error, so I guess the real code is fine. The problem why no-one is answering you could be one of the following reasons: 1) You did not supply WDSL file with your code. So it is not possible to know what kind of parameters should be supplied 2) SOAP is quite tough, not everyone understands it.