Getting error while executing SOAP API Url - php

After executing the following URL from SOAP API concept, getting error of WSDL.
URL: http://139.5.19.140:7047/DynamicsNAV71/WS/B.%20Jain%20Pharma-2017/Codeunit/customer
I getting a common error of WSDL :
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://139.5.19.140:7047/DynamicsNAV71/WS/B.%20Jain%20Pharma-2017/Codeunit/customer' : Document is empty in /home/Useracbglm9a/public_html/nav_con/php_nav_lib/Navision.php:11 Stack trace: #0 /home/Useracbglm9a/public_html/nav_con/php_nav_lib/Navision.php(11): SoapClient->SoapClient('http://139.5.19...', Array) #1 /home/Useracbglm9a/public_html/nav_con/my_customer.php(135): NTLMSoapClient->__construct('http://139.5.19...') #2 {main} thrown in /home/axbl3cbglm9a/public_html/nav_con/php_nav_lib/Navision.php on line 11
After Researching for this error i got that mainly this problem is of openssl extension of PHP.
I'm using PHP version: 7.1 with centOS 7.0
But i didn't get this extension of openssl in phpIniEditor.
Now i got confused that what exactly the problem is.!!!
Please Help & require your valuable support and feedback. Thanks in advance. Your Support is really appreciable.

Related

Error 500 laravel after install

I installed LAMP on centos7 with php 7.
Then I installed Laravel using composer but I get error 500 in the browser and the following error in apache:
PHP Fatal error: Uncaught RuntimeException: PHP's json extension is required to use Monolog's NormalizerFormatter in /var/www/html/blog/vendor/monolog/monolog/src/Mon$PHP
Fatal error: Uncaught RuntimeException: PHP's json extension is required to use Monolog's NormalizerFormatter in /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php:34
Stack trace:\n#0 /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php(42): Monolog\Formatter\\NormalizerFormatter->__construct(NULL)
#1 /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php(184): Monolog\\Formatter\LineFormatter->__construct()
#2 /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php(112): Monolog\\Handler\\AbstractHandler->getDefaultFormatter()
#3 /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(35): Monolog\\Handler\\AbstractHandler->getFormatter()
#4 /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Logger.php(337): Monolog\\Handler\\AbstractProcessingHandler->handle(Array)
#5 /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Logger.php(616): Monolog\\Logger->addRecord(400, Objec in /var/www/html/blog/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php on line 34
Can anybody please point me to the right direction?
Laravel 5.3, 5.2, 5.1 ,5.0 and lower are not supported yet by PHP 7.
Hope newer version will support the php 7

Squareconnect fails to retrieve location_id

I am trying to embed square payment method to my site through its documentation given in the link below.
https://docs.connect.squareup.com/articles/processing-payment-php/
After receiving nonce, I am trying to get the location id as defined in the documentation. In console it always returns the following error:
Fatal error: Uncaught exception 'SquareConnect\ApiException' with message 'API call to https://connect.squareup.com/v2/locations failed: SSL certificate problem: unable to get local issuer certificate' in C:\xampp\htdocs\my_project\vendor\square\connect\lib\ApiClient.php:245
Stack trace:
#0 C:\xampp\htdocs\my_project\vendor\square\connect\lib\Api\LocationApi.php(165): SquareConnect\ApiClient->callApi('/v2/locations', 'GET', Array, '', Array, '\\SquareConnect\\...')
#1 C:\xampp\htdocs\my_project\vendor\square\connect\lib\Api\LocationApi.php(105): SquareConnect\Api\LocationApi->listLocationsWithHttpInfo('sq0atb-a8CwQY9D...')
#2 C:\xampp\htdocs\my_project\locations-test.php(10): SquareConnect\Api\LocationApi->listLocations('sq0atb-a8CwQY9D...')
#3 {main}
thrown in C:\xampp\htdocs\my_project\vendor\square\connect\lib\ApiClient.php on line 245
You might not have the most up-to-date CA certificate bundle. Try the steps in this related StackOverflow answer and see if that works: https://stackoverflow.com/a/19149687
If that doesn't work, what operating system version and what version of PHP are you using? In an interactive PHP console (php -a), what is the output of echo OPENSSL_VERSION_TEXT;? Finally, what is the output of openssl s_client -connect connect.squareup.com:443 (in cmd, not the PHP console)?

Mantis SOAP-Error accessing mantisconnect.php (Eclipse Mylyn-Plugin)

I installed Mantis BT 1.2.19 on my server and it works well. To benefit from it in my Eclipse-IDE (Mars) I installed the Task-Repo Plugin for Mantis and tried to add the connection.
When I click on "Validate settings" in Eclipse I get the following error:
SOAP-ERROR: Parsing WSDL: Couldn't load from '/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl' : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
In my error-log on the server are the following entries
[14-Oct-2015 11:25:05 Europe/Berlin] [mantisconnect.php] Error Type: SYSTEM WARNING,
Error Description: SoapServer::SoapServer(): I/O warning : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
Stack Trace:
mantisconnect.php L121 SoapServer(<string>'mantisconnect.wsdl', <Array> { ['features'] => 5 })
[14-Oct-2015 11:25:05 Europe/Berlin] PHP Warning: Uncaught SoapFault exception: [Server] Error Type: SYSTEM WARNING,
Error Description: SoapServer::SoapServer(): I/O warning : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl" in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php:107
Stack trace:
#0 /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php(530): SoapActions::sendSoapFault('Server', 'Error Type: SYS...')
#1 [internal function]: mc_error_handler(2, 'SoapServer::Soa...', '/var/www/vhosts...', 121, Array)
#2 /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.php(121): SoapServer->SoapServer('mantisconnect.w...', Array)
#3 {main}
thrown in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php on line 107
[14-Oct-2015 11:25:05 Europe/Berlin] PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from '/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl' : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.php on line 121
The errors above are produced by the Mantis plugin on accessing the URL
188.109.171.76 - - [14/Oct/2015:11:25:05 +0200] "POST /mantis/api/soap/mantisconnect.php HTTP/1.0" 500 1067 "-" "Mylyn/3.17.0 Mylyn-Mantis Connector/3.10.1 Apache Axis/1.4 Eclipse (org.eclipse.epp.package.jee.product) HttpClient/3.1 Java/1.8.0_60 (Oracle) Windows 7/6.1 (amd64; de_DE)"
But even a "normal" GET-access to the URL mentioned above produces the same error
https://{myhost}/mantis/api/soap/mantisconnect.php
No error is produced on accessing
https://{myhost}/mantis/api/soap/mantisconnect.php?wsdl
To solve the problem on my own I checked several ideas:
The file IS existant ... {myhost} is just a placeholder here obviously - placed by me
I switched to the context of the webserver www-data and tried accessing the file ... it IS accessible
So I´ve no idea...
PHP version is 5.5.9-1ubuntu4.13 on Ubuntu 14.04.3 LTS
€dit:
Tracked down the error to the following PHP-line in mantis/api/soap/mantisconnect.php
$server = new SoapServer("mantisconnect.wsdl",
array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS)
);
I don´t understand why there an error is thrown - because as I said: it exists and is readable by the webserver...
€edit2:
I replaced the line
$server = new SoapServer("mantisconnect.wsdl",
with
$server = new SoapServer("http://{myhost}/mantis/api/soap/mantisconnect.wsdl",
THIS works... so I´ve a "solution" but I don´t know why the access via file does not work
I Think I found the answere on my own (my workaround failed some hours later - with same error again).
Seems to be a bug in PHP (on Ubuntu) as mentioned here
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1160336
Unresolved since 2013
:-(
My current workaround is disabling soap.wsdl_cache_enabled in php.ini which seems to help for the moment.

Parsing WSDL: xx already defined

When I try to execute following PHP code:
$client = new SoapClient("https://.../translationManagementService/XTRFService?wsdl");
I get:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: 'createCustomer' already defined in /data/r/e/reachlocalization.com/web/createuser.php:31 Stack trace: #0 /data/r/e/reachlocalization.com/web/createuser.php(31): SoapClient->SoapClient('https://.......') #1 {main} thrown in /data/r/e/reachlocalization.com/web/createuser.php on line 31
Am I doing something wrong or is this server related?
This is PHP bug #45282.
You can try Pear SOAP implementation.
Try to connect to ?singleWsdl instead of ?wsdl

SOAP exercises. Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing

I'm doing some SOAP exercises based on this example: http://www.vankouteren.eu/blog/2009/03/simple-php-soap-example/
But, I cannot get that to work on WAMP.
Error which I'm getting is:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL:
Couldn't load from 'http://footballpool.dataaccess.eu/data/info.wso?WSDL' :
failed to load external entity "http://footballpool.dataaccess.eu/data/info.wso?WSDL"
in C:\Documents and Settings\USER\Desktop\Dropbox\wamp\soap\index.php:5 Stack trace:
#0 C:\Documents and Settings\USER\Desktop\Dropbox\wamp\soap\index.php(5): SoapClient->SoapClient('http://football...')
#1 {main} thrown in C:\Documents and Settings\USER\Desktop\Dropbox\wamp\soap\index.php on line 5
Line 5 is: $client = new SoapClient("http://footballpool.dataaccess.eu/data/info.wso?WSDL");
Uncle Google does not know the answer. Any suggestion much appreciated.
Port 8080 on that host seems to be closed, that will be the problem. Contact them.
Actually, try using a proxy server like this:
$client = new SoapClient(“http://someaddress?WSDL”, array(‘proxy_host’ => “example.proxy.com”,’proxy_port’ => portnumber));

Categories