Beste,
Ik probeer met AFAS Profit via SOAP connectie te maken. Ik moet de volgende wsdl gebruiken volgens AFAS.
https://profitweb.afasonline.nl/profitservices/updateconnector.asmx?wsdl
Als ik deze URL in de browser invoer, moet ik eerst inloggen voordat ik de wsdl te zien krijg. Dus gebruik ik in PHP de login methode als:
<?php
$wsdl = "https://profitweb.afasonline.nl/profitservices/updateconnector.asmx?wsdl";
$login = 'gebruikersnaam';
$password = 'wachtwoord';
$client = new SoapClient( $wsdl, array('login' => $login, 'password' => $password, 'trace' => 1, 'exceptions' => 0));
?>
Ik krijg dan echter deze foutmelding:
Warning: SoapClient::SoapClient(https://profitweb.afasonline.nl/profitservices/updateconnector.asmx?wsdl): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized ( The server requires authorization to fulfill the request. Access to the Web server is denied. Cont in C:\xampp\htdocs\test.nl\soap.php on line 9
Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "https://profitweb.afasonline.nl/profitservices/updateconnector.asmx?wsdl" in C:\xampp\htdocs\test.nl\soap.php on line 9
Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://profitweb.afasonline.nl/profitservices/updateconnector.asmx?wsdl' : failed to load external entity "https://profitweb.afasonline.nl/profitservices/updateconnector.asmx?wsdl" in C:\xampp\htdocs\test.nl\soap.php on line 9
Hoe krijg ik connectie met deze SOAP service..?
17.240 views