Parsing WSDL: xx already defined - php

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

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.

PHP Fatal error: Uncaught Error: Class 'Google\Ads\GoogleAds\Examples\Utils\ArgumentParser' not found in

I'm trying to use google_ads_api to generate keywords idea.
I found an error when I execute generateKeywordsIdeas.php file.
PS C:\xampp\htdocs\google_ads_api> php GenerateKeywordIdeas.php
PHP Fatal error: Uncaught Error: Class 'Google\Ads\GoogleAds\Examples\Utils\ArgumentParser' not found in C:\xampp\htdocs\google_ads_api\GenerateKeywordIdeas.php:67
Stack trace:
#0 C:\xampp\htdocs\google_ads_api\GenerateKeywordIdeas.php(212): Google\Ads\GoogleAds\Examples\Planning\GenerateKeywordIdeas::main()
#1 {main}
thrown in C:\xampp\htdocs\google_ads_api\GenerateKeywordIdeas.php on line 67
Fatal error: Uncaught Error: Class 'Google\Ads\GoogleAds\Examples\Utils\ArgumentParser' not found in C:\xampp\htdocs\google_ads_api\GenerateKeywordIdeas.php:67
Stack trace:
#0 C:\xampp\htdocs\google_ads_api\GenerateKeywordIdeas.php(212): Google\Ads\GoogleAds\Examples\Planning\GenerateKeywordIdeas::main()
#1 {main}
thrown in C:\xampp\htdocs\google_ads_api\GenerateKeywordIdeas.php on line 67
Here is file structure of my project
Why this error happens..? can anybody explain..?
Sounds like your missing required files from the 'examples' directory? They're excluded from the ZIP when you download the package from github. You can grab them here:
https://downgit.github.io/#/home?url=https://github.com/googleads/google-ads-php/tree/master/examples

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.

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