Joined: 01 Sep 2009 |
Posts: 1 |
|
|
|
Posted: Mon Aug 31, 2009 12:47 am |
|
|
|
|
|
Hi All,
I am getting error when trying to write a client script with nusoap to access a .asmx?WSDl file. Please help me if anyone know the solution.
Here I am giving my code as well as error that I getting.
Fault
Array
(
[faultcode] => soap:Server
[faultstring] => Server was unable to process request. ---> Conversion from type 'DBNull' to type 'Integer' is not valid.
[detail] =>
)
Request
POST /CatalystWebService/CatalystCRMWebservice.asmx HTTP/1.0
Host: devlon2.worldsecuresystems.com
User-Agent: NuSOAP/0.7.3 (1.114)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: "http://tempuri_org/CatalystDeveloperService/CatalystCRMWebservice/OrderList_Retrieve"
Content-Length: 459
<?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:ns8557="http://tempuri_org"><SOAP-ENV:Body><OrderList_Retrieve xmlns="http://tempuri_org/CatalystDeveloperService/CatalystCRMWebservice"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
Response
HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Length: 449
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 01 Sep 2009 05:18:49 GMT
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Server was unable to process request. ---> Conversion from type 'DBNull' to type 'Integer' is not valid.</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>
Here is the code
require_once('lib/nusoap.php');
ini_set("soap.wsdl_cache_enabled", "0");
$proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
$proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
$proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
$proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
$client = new nusoap_client("https://devlon2.worldsecuresystems.com/CatalystWebService/CatalystCRMWebservice.asmx?WSDL", 'wsdl',
$proxyhost, $proxyport, $proxyusername, $proxypassword);
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
$client->setUseCurl($useCURL);
$client->loadWSDL();
$params->username = 'satya@satya.com';
$params->Request->password = '4Kn54v6S';
$params->Request->siteId = '50124';
$client->setCredentials('satya@satya.com', '4Kn54v6S', '50124');
$result = $client->call('OrderList_Retrieve', array());
// Check for a fault
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
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>';
print_r($result);
echo '</pre>';
}
}
echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
Thanks & Regards,
Satya
|
|