I work on a projet which use a Soap based webservice queried by PHP and 2 native smartphone apps (ios and android) , after some edits made by the webservice development team, things were broken on PHP side but no problems from smartphone apps.
here is a simple script to reproduce the problem
<?php
error_reporting(E_ALL);
$url = 'http://www.xxxxx.com/service.awws?wsdl';
$sKey = 'thekey';
$client= new SoapClient($url, array('trace' => 1,
'exception' => 1,
'encoding' => 'UTF-8',
'cache_wsdl' => WSDL_CACHE_NONE));
$params = array('sKey' => $sKey, 'nLangID' => 1);
$res = $client->TPGetLocalisationVersion($params);
echo '<pre>Res : ';
print_r($res);
echo '</pre>';
?>
I get the following error:
Fatal error: Uncaught SoapFault exception:
[HTTP] Unable to parse URL in /home/xxxx/www/test.php:14 Stack trace: #0 [internal function]:
SoapClient->__doRequest('__call('TPGetLocalisati...', Array) #2 /home/tmpweb/www/test.php(14):
SoapClient->TPGetLocalisationVersion(Array) #3 {main} thrown in /home/xxxx/www/test.php on line 14
the method TPGetLocalisationVersion exists and the parameters are correct.
this code used to work some days ago.
I can also fetch the wsdl from the PHP Webserver using wget.
I tested the WSDL file with some online tool and it seems ok.
Any suggestions to debug this? I m sure the WSDL is not cached as I m on a dedicated server and completly disabled WSDL cache in php.ini
problem solved , the problem was in the soap:adress inside the WSDL (bad value)
Related
i have installed testlink 1.9.16 and mantis bugtracker 2.3.1 on wamp server 3.0.6.
i tried to integrate mantis and teslink on soap interface . but i'm getting these errors:
-in testlink events : "SOAP Fault: (code: Client, string: looks like we got no XML document)"
-in C:\wamp64\logs\php_error.log :
[22-Apr-2017 13:06:53 UTC] PHP Fatal error: Uncaught SoapFault exception: [Server] Error Type: SYSTEM WARNING,
Error Description: Cannot modify header information - headers already sent in C:\wamp64\www\mantis\api\soap\mc_api.php:668
Stack trace:
#0 [internal function]: mc_error_handler(2, 'Cannot modify h...', 'C:\\wamp64\\www\\m...', 84, Array)
#1 C:\wamp64\www\mantis\api\soap\mantisconnect.php(84): SoapServer->handle()
#2 {main}
thrown in C:\wamp64\www\mantis\api\soap\mc_api.php on line 668
this is my configuration for mantisbt in testlink:
<!-- Template mantissoapInterface -->
<issuetracker>
<username>administrator</username>
<password>toor</password>
<uribase>http://localhost/mantis/</uribase>
<uriwsdl>http://localhost/mantis/api/soap/mantisconnect.php?wsdl</uriwsdl>
<uriview>http://localhost/mantis/view.php?id=</uriview>
<uricreate>http://localhost/mantis/</uricreate>
<!-- Configure This if you want be able TO CREATE ISSUES -->
<project>demo_bt</project>
<category>selenium</category>
</issuetracker>
Anybody have any idea about this?
thanks.
Please remove the comments in your configuration and check. Check my config please
<issuetracker>
<username>administrator</username>
<password>admin123</password>
<uribase>http://localhost/mantis/</uribase>
<uriwsdl>http://localhost/mantis/api/soap/mantisconnect.php?wsdl</uriwsdl>
<uriview>http://localhost/mantis/view.php?id=</uriview>
<uricreate>http://localhost/mantis/</uricreate>
<project>Testing</project>
<category>development</category>
<resolvedstatus>
<status><code>80</code><verbose>resolved</verbose></status>
<status><code>90</code><verbose>closed</verbose></status>
</resolvedstatus>
</issuetracker>
i solved the issue. the problem was that i was using an api key which it belongs to the administrator of redmine, so i created a new project with new members and i used the api key of the manager of this new project and it's working ffine now .
I've got an API that's dependent of SOAP to be able to work correctly, but the site that I'm working on is using amazon AWS, and I found out that amazon doesn't support SOAP from here on their note section: http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
Is their any other way to load SOAP on AWS? The API I'm using requires SOAP to be able to get values from a provider.
object(SoapClient)#1 (4) { ["_login"]=> string(17) "site-staging" ["_password"]=> string(9) "password" ["_soap_version"]=> int(1) ["sdl"]=> resource(2) of type (Unknown) }
Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /var/www/html/status.php:26 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://cpsandb...', '', 1, 0) #1 /var/www/html/status.php(26): SoapClient->__soapCall('getUploadCatalo...', Array, Array) #2 {main} thrown in /var/www/html/status.php on line 26
So from what I understand is that we're having issues requesting SOAP request from other url services outside of amazon.
I'm trying to access WSDL(Web Service Definition Language) file using SoapClient() of PHP. I found that WSDL file is authenticated. I tried with passing credentials on an array by another parameter and active SSL on my server, still I'm getting an error.
Here is the code I'm using:
$client = new
SoapClient("https://webservices.chargepointportal.net:8081/coulomb_api_1.1.wsdl",array("trace"
=> "1","Username" => "username","Password" => "password"));
Here is the error I'm getting:
Warning:
SoapClient::SoapClient(https://webservices.chargepointportal.net:8081/coulomb_api_1.1.wsdl)
[soapclient.soapclient]: failed to open stream: Connection timed out
in PATH_TO_FILE on line 80
Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning
: failed to load external entity
"https://webservices.chargepointportal.net:8081/coulomb_api_1.1.wsdl"
in PATH_TO_FILE on line 80
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL: Couldn't load from
'https://webservices.chargepointportal.net:8081/coulomb_api_1.1.wsdl'
: failed to load external entity
"https://webservices.chargepointportal.net:8081/coulomb_api_1.1.wsdl"
in PATH_TO_FILE:80 Stack trace: #0
/home2/wingstec/public_html/widget/API/index.php(80):
SoapClient->SoapClient('https://webserv...', Array) #1 {main} thrown
in PATH_TO_FILE on line 80
It seems that error says file not exist at the path we given but when we run that path directly on browser then we're getting that file
Can anyone help me to figure out what the exactly problem is?
First make sure you have the right to access website from your hosting account or server - check first if you can access a http webservice (without the s). If not, check if allow_url_fopen is set to true in php.ini.
Then, if you are trying to establish a https connection, you need a local certificate.
See if you can add one and instantiate your Soap object using something like
new SoapClient($wsdl, array('local_cert' => $pathToLocalCert));
Hi I have a problem trying to configure Zend Frame work in test server, I have the project working fine in my local mac computer, I upload all the file to my root html docs in my test server, exactly like I have it in my local, but for some reason I can't found my controllers, the error I have is this
An error occurred
Page not found
Exception information:
Message: Invalid controller specified (MessageBroker)
Stack trace:
#0 /var/www/html/magentoreviewsZF/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /var/www/html/magentoreviewsZF/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#2 /var/www/html/magentoreviewsZF/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#3 /var/www/html/magentoreviewsZF/public/index.php(26): Zend_Application->run()
#4 {main}
Request Parameters:
array (
'controller' => 'MessageBroker',
'action' => 'index',
'module' => 'default',
)
I have see in other post that changing the RewriteBase in the htaccess do the trick, but don't work for me, also I have the default structure, also the index controller and the error controller works, if I go directly to their path.
so is working is just my MessageBroker controller is not been found, why!, please anybody can point me to the right direction, I really don't know what else to do, thanks!!!
Iam not sure, but let me guess: Test Server = Windows ? Production = Linux ?
Take care about the filename / classname of your Controller on linux its case sensetive so name you Controller:
class MessagebrokerController extends Zend_Controller_Action
{}
And your filename: MessagebrokerController.php
I'm using the new facebook graph API and getting an odd error when I push to a web server.
My Code is pretty simple with fbmain.php calling facebook.php
<?php
include_once "fbmain.php";
$ab = $facebook->api('/cocacola/feed');
echo ($ab['data']['0']['message']);
When I run this locally, it works great without any errors.
When I run it on my server, I get the error:
Parse error: parse error, unexpected '{' in /home/content/w/e/s/wesbos/html/clients/audiobooks/wp-content/themes/ab/fb/fbmain.php on line 6
The part of fbmain.php its saying is causing the problem is :
try{
include_once "facebook.php";
}
Any idea why this wouldn't work on my server?
Turned out I was running PHP 4.x and try{} was only introduced in php5. Problem solved.