SOAP on Amazon AWS - How to run it? - soap

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.

Related

GuzzleHttp\Exception\ConnectException: cURL error 28 when using Google Cloud Speech PHP API

Following Google's instructions to the letter.
This is what I get:
Fatal error: Uncaught GuzzleHttp\Exception\ConnectException: cURL error 28: Connection timed out after 500 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) in C:\xampp\htdocs\ModernMT\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:207 Stack trace: #0 C:\xampp\htdocs\ModernMT\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(162): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 C:\xampp\htdocs\ModernMT\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(109): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2 C:\xampp\htdocs\ModernMT\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php(45): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #3 C:\xampp\htdocs\ModernMT\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php(30): GuzzleH in C:\xampp\htdocs\ModernMT\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 207
This happens right after:
# Instantiates a client
$client = new SpeechClient();
Straight from the developers of Google Cloud:
After investigating a bit further, it looks like this is a bug in the google/auth dependency. We just merged a fix, and it should be tagged by the end of the day. You can wait for that (watch this page for v1.11.1), or you could require guzzlehttp/guzzle at ^6.5 to get it working right now. Sorry for the trouble, and thanks for bringing it to our attention!

testlink integration with mantis(interface:SOAP)

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 .

resolve SoapFault exception: [HTTP] Unable to parse URL

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)

Error using SoapClient() in PHP

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

New Server: Zend_Session_Exception "session has already been started" http to https & vice versa

I'm trying to move a website to a new host (MediaTemple.)
When you stick to http, or https everything is fine. When going from http->https or https->http you get the error.
Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'session has already been started by session.auto-start or session_start()'
in /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/Session.php:462
Stack trace:
#0 /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/Session/Namespace.php(143): Zend_Session::start(true)
#1 /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/Auth/Storage/Session.php(87): Zend_Session_Namespace->__construct('Zend_Auth')
#2 /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/Auth.php(91): Zend_Auth_Storage_Session->__construct()
#3 /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/Auth.php(141): Zend_Auth->getStorage()
#4 /var/www/vhosts/FakeSite.com/httpdocs/application/layouts/layout.phtml(12): Zend_Auth->hasIdentity()
#5 /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/View.php(108): include('/var/www/vhosts...')
#6 /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/View/Abstract.php(831): Zend_View->_run('/var/www/vhosts...')
#7 /var/www/vh in /var/www/vhosts/FakeSite.com/httpdocs/library/Zend/Session.php on line 462
Session path is writable, and seems to work fine if you stick to one protocol. There are no session_start() calls, and session.auto-start is 0.
Code is running on 3 other servers fine. It must be a configuration issue, but I haven't been able to find it
Sure looks like the server is configured with session.auto_start = 1.
So, maybe add to configs/application.ini:
phpSettings.session.auto_start = 0
I think you have a plugin(or other library), which calls session_start() function
I had the same problem, when tried to create facebook resource
I figured finally it out.
Problem was that PHP on http was running as an Apache module, and PHP on https was running as a FastCGI module.
I assume those run as different users on MediaTemple or something. The session would get created by one, and not be able to be read by the other because another user owned the file.