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

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));

Related

PHP Fatal error: Uncaught SoapFault exception in error_log

I'm doing some requests to an external service, problem is that sometimes the external service is not responding (I think their server is offline or something like that).
The problem with that is the error which is written each time on the error_log:
[07-May-2022 04:31:05 UTC] PHP Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /path/file.php:115
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://app.mela...', 'http://app.mela...', 1, 0)
....
....
How to avoid to write that error inside error log?
The code inside /path/file.php:115 is this:
$response = $this->client->getOrders($userId,$order,$orderColumn,$orderType,$limitStart,$limitSize);
Thanks for your help.

Getting error while executing SOAP API Url

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.

simpleexcel : I get an error when I changed the host

Recently I have changed my host. On the previous host, every thing was ok, but now on the new host I get following error..
Please direct me to the host so I can solve this problem ASAP???
Fatal error: Uncaught exception 'Exception' with message 'Document namespace isn't a valid Excel XML 2003 Spreadsheet' in /home/jalali/public_html/admin/SimpleExcel/Parser/XMLParser.php:198
Stack trace:
#0 /home/jalali/public_html/admin/SimpleExcel/Parser/XMLParser.php(305): SimpleExcel\Parser\XMLParser->parseDOM(Object(SimpleXMLElement))
#1 /home/jalali/public_html/admin/#dmin.php(28): SimpleExcel\Parser\XMLParser->loadFile('../archive/1371...')
#2 {main} thrown in /home/jalali/public_html/admin/SimpleExcel/Parser/XMLParser.php on line 198

I'm getting "Fatal error: Uncaught SoapFault exception: [Client] SoapClient::SoapClient() Stack trace: #0 SoapClient->SoapClient(NULL, Array) #1 "

I'm getting with my hotel provider:
Fatal error: Uncaught SoapFault exception: [Client] SoapClient::SoapClient() Stack trace: #0 SoapClient->SoapClient(NULL, Array) #1
I managed once to make a booking but then start getting this message.
Fatal error: Uncaught SoapFault exception: [Client] SoapClient::SoapClient() [soapclient.soapclient]: 'uri' option is required in nonWSDL mode in /home/fanzy44/public_html/FLuxuryWorld.com/HotelCollection/wp-content/themes/agility-child/single-bookhotel.php:1983
Stack trace:
#0 /home/fanzy44/public_html/FLuxuryWorld.com/HotelCollection/wp-content/themes/agility-child/single-bookhotel.php(1983): SoapClient->SoapClient(NULL, Array)
#1 /home/fanzy44/public_html/FLuxuryWorld.com/HotelCollection/wp-includes/template-loader.php(47): include('/home/fanzy44/p...')
#2 /home/fanzy44/public_html/FLuxuryWorld.com/HotelCollection/wp-blog-header.php(16): require_once('/home/fanzy44/p...')
#3 /home/fanzy44/public_html/FLuxuryWorld.com/HotelCollection/index.php(17): require('/home/fanzy44/p...')
#4 {main} thrown in /home/fanzy44/public_html/FLuxuryWorld.com/HotelCollection/wp-content/themes/agility-child/single-bookhotel.php on line 1983
According to the exception,
Uncaught SoapFault exception: ... 'uri' option is required in nonWSDL mode
So, referring to the SoapClient documentation:
options
An array of options. If working in WSDL mode, this parameter is optional. If working in non-WSDL mode, the location and uri options must be set, where location is the URL of the SOAP server to send the request to, and uri is the target namespace of the SOAP service.
Looking at your code:
$client = new SoapClient($hotelProBookingURL, array('trace' => 1));
What's the value of $hotelProBookingURL? If it's null, you're missing necessary options, causing your error.

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

Categories