Error using SoapClient function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am new to PHP.  I am trying to write a page that will access a web service
which I have written.  The web service is written in .net and I have written
a page to access the service using ASP.net and this works 100%.  However i
need to use PHP to access this data also.  I have written the following
script:

---------------------------------------------------------------------------------------------------------
<?php
require_once('./nusoap/nusoap.php');
$client = new SoapClient("http://10.0.4.10/ifs/custord.asmx?wsdl";,
array('login' => 'user','password' => 'pass'));
$param=array('CustomerID'=>'101385'); 
echo $client->call('GetCustomerName', $param);
?>
---------------------------------------------------------------------------------------------------------

When I run this i get the following error:

---------------------------------------------------------------------------------------------------------
PHP Warning: SoapClient::SoapClient(http://10.0.4.10/ifs/custord.asmx?wsdl)
[function.SoapClient-SoapClient]: failed to open stream: HTTP request
failed! HTTP/1.1 401 Access Denied in C:\Inetpub\wwwroot\dom.php on line 6
PHP Warning: SoapClient::SoapClient() [function.SoapClient-SoapClient]: I/O
warning : failed to load external entity
"http://10.0.4.10/ifs/custord.asmx?wsdl"; in C:\Inetpub\wwwroot\dom.php on
line 6 PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from
'http://10.0.4.10/ifs/custord.asmx?wsdl' in C:\Inetpub\wwwroot\dom.php on
line 6 PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR:
Parsing WSDL: Couldn't load from 'http://10.0.4.10/ifs/custord.asmx?wsdl' in
C:\Inetpub\wwwroot\dom.php:6 Stack trace: #0 C:\Inetpub\wwwroot\dom.php(6):
SoapClient->SoapClient('http://10.0.4.1...', Array) #1 {main} thrown in
C:\Inetpub\wwwroot\dom.php on line 6 
---------------------------------------------------------------------------------------------------------

It mentions an access denied 401 message.  I am assuming that my login and
password parameters are not being accepted.  Can anybody help me out with
this?  Would be really grateful.

Kind regards,
Dom
-- 
View this message in context: http://www.nabble.com/Error-using-SoapClient-function-tf3374945.html#a9391990
Sent from the Php - Soap mailing list archive at Nabble.com.

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux