Hi,
I recently downloaded nusoap and one of the sample files was connecting to a asmx web service.
The code I have is:
<?php
/* $Id: wsdlclient10.php,v 1.2 2007/04/13 14:22:09 snichol Exp $
* WSDL client sample.
* Demonstrates de-serialization of a document/literal array (added nusoap.php 1.73).
* Service: WSDL
* Payload: document/literal
* Transport: http
* Authentication: none
*/
require_once('../lib/nusoap.php');
$soapOptions = array (
'trace' => true,
'proxy_host' => 'ben.mycompany.co.uk',
'proxy_port' => 8080,
'proxy_login' => 'MY_NT_DOMAIN\thegunnner',
'proxy_password' => 'mypassword',
);
$client = new soapclient('http://www.abundanttech.com/WebServices ... .asmx?WSDL', $soapOptions);
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
$client->setUseCurl(false);
$result = $client->call('getCountries', array(), '', '', false, true);
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
$err = $client->getError();
if ($err) {
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
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>';
?>
The error I'm getting back is:
wsdl error: HTTP ERROR: cURL ERROR: 7: couldn't connect to host
url: http://www.abundanttech.com:80/WebServi ... .asmx?WSDL
http_code: 0
header_size: 0
request_size: 0
filetime: -1
ssl_verify_result: 0
redirect_count: 0
total_time: 0
namelookup_time: 0
connect_time: 0
pretransfer_time: 0
size_upload: 0
size_download: 0
speed_download: 0
speed_upload: 0
download_content_length: 0
upload_content_length: 0
starttransfer_time: 0
redirect_time: 0
REQUEST
RESPONSE
DEBUG (a lot of stuff in here)
Is it just my connection to my proxy not correct as I'm thinking that's where the problem lies.
Thanks,
web services- connectinf to asmx?wsdl via my proxy
Moderator: General Moderators