Código PHP:
Que es lo que me puede fallar??El error que me da Ver original
<?php // Pull in the NuSOAP code require_once('lib/nusoap.php'); // Create the client instance $client = new soapclient('http://www.b-kin.com/bcim/Account/AccountService.asmx?WSDL', true); // Check for an error $err = $client->getError(); if ($err) { // Display the error echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; // At this point, you know the call that follows will fail } $proxy= $client->getProxy(); //EL USer y el pass no los pongo $header = '<UserCredentials><userName></userName><passWord></passWord></UserCredentials>'; $client->setHeaders($header); $parametros=array('SearchAccounts.searchRequest.Search.CriteriaCollection.SearchCriteria[0].Attribute' => 'Name','SearchAccounts.searchRequest.Search.CriteriaCollection.SearchCriteria[0].CompareOperator' => 'Contains','SearchAccounts.searchRequest.Search.CriteriaCollection.SearchCriteria[0].Value' => 'c','SearchAccounts.searchRequest.Search.SortDirection' => 'ASC','SearchAccounts.searchRequest.Search.Context' => 'All','SearchAccounts.searchRequest.Search.IsForAllUsers' => 'false','SearchAccounts.searchRequest.PageSize' => '0','SearchAccounts.searchRequest.SortField' => 'Name','SearchAccounts.searchRequest.SortOrder' => 'ASC','SearchAccounts.searchRequest.Columns' => 'Name,Email,AccountId','SearchAccounts.searchRequest.CurrentPageIndex' => 0); $result = $client->call('SearchAccounts',$parametros); // Check for a fault if ($client->fault) { echo '<h2>Fault</h2><pre>'; echo '</pre>'; } else { // Check for errors $err = $client->getError(); if ($err) { // Display the error echo '<h2>Error</h2><pre>' . $err . '</pre>'; } else { // Display the result echo '<h2>Result</h2><pre>'; echo '</pre>'; } } // Display the request and response echo '<h2>Request</h2>'; echo '<h2>Response</h2>'; // Display the debug messages echo '<h2>Debug</h2>'; ?>
Código HTML:
Ver original
Array ( [faultcode] => soap:Server [faultstring] => Server was unable to process request. ---> Object reference not set to an instance of an object. [detail] => )
Saludos