I am getting the following error when trying to create a new SoapClient.
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://api.mindbodyonline.com/0_5/ClassService.asmx?wsdl' : failed to load external entity "https://api.mindbodyonline.com/0_5/ClassService.asmx?wsdl" in C:\xampp\htdocs\Work\Ice\default\soaptest.php:8 Stack trace: #0 C:\xampp\htdocs\Work\Ice\default\soaptest.php(8): SoapClient->SoapClient('https://api.min...') #1 {main} thrown in C:\xampp\htdocs\Work\Ice\default\soaptest.php on line 8
what would cause the WSDL to not load?
Enable openssl in your php.ini you load the WSDL over https this is only working when the openssl module is enabled.
Not sure if this might be the case with you but if you are using the PHP classes provided on the Minbody API on Github, note that they have recently updated them. I had the same problem with classService.php. If you are using classService.php, update the constructor function to the following (same will apply to other services):
function __construct($debug = false)
{
$endpointUrl = "https://" . GetApiHostname() . "/0_5/ClassService.asmx";
$wsdlUrl = $endpointUrl . "?wsdl";
$this->debug = $debug;
$option = array();
if ($debug)
{
$option = array('trace'=>1);
}
$this->client = new soapclient($wsdlUrl, $option);
$this->client->__setLocation($endpointUrl);
}
Related
I am using the following to run the php file under xampp htdocs with foldername as kraken but i am getting an error
<?php
require_once 'KrakenAPIClient.php';
$key = 'dfdfdfdf';
$secret = 'dfdfdfdf';
// set which platform to use (currently only beta is operational, live available soon)
$beta = false;
$url = $beta ? 'https://api.beta.kraken.com' : 'https://api.kraken.com';
$sslverify = $beta ? false : true;
$version = 0;
$kraken = new KrakenAPI($key, $secret, $url, $version, $sslverify);
error i am getting is:
Fatal error: Uncaught Error: Class 'KrakenAPI' not found in C:\xampp\htdocs\kraken\example.php:21 Stack trace: #0 {main} thrown in C:\xampp\htdocs\kraken\example.php on line 21
You'd need to alias the class with use, before being able to skip it's name-space:
use \Payward\KrakenAPI;
Also see the PHP manual which I've linked for a more detailed explanation.
I'm trying to integrate cargo system to my website. Then I'm using their webservice.
But I've an error like that:
"Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't find in "
And error show me that line: 2 second. And that line has that code:
$client = new SoapClient("http://customerservices.araskargo.com.tr/ArasCargoCustomerIntegrationService/ArasCargoIntegrationService.svc");
And here's my full code:
<?php
$client = new SoapClient("http://customerservices.araskargo.com.tr/ArasCargoCustomerIntegrationService/ArasCargoIntegrationService.svc");
$queryInfo = "<QueryInfo>".
"<QueryType>2</QueryType>".
"<Date>07.10.2015</Date>".
"</QueryInfo>";
$loginInfo = "<LoginInfo>".
"<UserName>xxx</UserName>".
"<Password>xxx</Password>".
"<CustomerCode>xxx</CustomerCode>".
"</LoginInfo>";
$result = $client->GetQueryXML(array('loginInfo'=>$loginInfo,'queryInfo'=>$queryInfo));
echo $result;
How can I solve my problem?
The url you're passing to SoapClient is not that of a wsdl file. You maybe meant to use:
$client = new SoapClient("http://customerservices.araskargo.com.tr/ArasCargoCustomerIntegrationService/ArasCargoIntegrationService.svc?singleWsdl");
We have wsdl :
http://xxxxxxxxxxxxxxx.com/XXXX_Beta_3_API/webservice.asmx?wsdl
IN PHP FILE : i have created a Class with some arrays in it..
class Crmtet {
public $abc;
public $abc2;
public $abc3;
public $abc4;
}
$client = new SoapClient(http://xxxxxxxxxxxxxxx.com/XXXX_Beta_3_API/webservice.asmx?wsdl);
$obj = new Crmtet();
$obj->abc= "Test";
$obj->abc2= "Test2";
$obj->abc3= "Test3";
$obj->abc4= "Test4";
$result = $client->CRM_Warehouse_Master_Insert($obj)->CRM_Warehouse_Master_InsertResult;
echo"re".$result;
But i am getting below error :
Fatal error: Uncaught SoapFault exception: [soap:Server] Server was
unable to process request. ---> Object reference not set to an
instance of an object. in
E:\EasyPHP-12.1\www\test\inserwarrecrm.php:60 Stack trace: #0
E:\EasyPHP-12.1\www\test\inserwarrecrm.php(60):
SoapClient->__call('CRM_Warehouse_M...', Array) #1
E:\EasyPHP-12.1\www\test\inserwarrecrm.php(60):
SoapClient->CRM_Warehouse_Master_Insert(Object(Crmtet)) #2 {main}
thrown in E:\EasyPHP-12.1\www\test\inserwarrecrm.php on line 60
What is the issue.. can anyone help..??
I am trying to implement the whatsAPI but I always get this error
"There was a problem trying to request the code".
Here is the full error that is showing in my console:
####start of error notice#####
[12-Mar-2013 22:44:59] PHP Notice: Undefined property: stdClass::$reason in /Applications/MAMP/htdocs/whatsapp/test/whatsprot.class.php on line 1268
[12-Mar-2013 22:44:59] PHP Fatal error: Uncaught exception 'Exception' with message 'There was a problem trying to request the code.' in /Applications/MAMP/htdocs/whatsapp/test/whatsprot.class.php:1269
Stack trace:
#0 /Applications/MAMP/htdocs/whatsapp/test/test.php(36): WhatsProt->checkCredentials()
#1 {main}
thrown in /Applications/MAMP/htdocs/whatsapp/test/whatsprot.class.php on line 1269
####end of error notice#####
these are my credentials for initializing the class
$userPhone = '8801770648732';
$userIdentity = '352264050503669';
$userName = 'shishir';
$destinationPhone = '8801713206053';
$debug = TRUE;
$whatsapp = new WhatsProt($userPhone, $userIdentity, $userName, $debug);
and for the requesting a requestCode
$service_type = "sms";
$country_code = "BD";
$language_code = "en";
$request_code = $whatsapp->requestCode($service_type, $country_code, $language_code);
Every time it stuck at the $whatsapp->requestCode with that error. I'm not sure what i am doing wrong . Can anyone help me on this?
It's look like you don't have curl extension.
This Exception is thrown by checkCredentials method.
Check if your phpinfo shows curl.
$param['websiteConfigID'] = 729872;
$param['numberOfRecords'] = 10;
$param['numberOfRecords'] = 10;
$client = new SoapClient(WSDL);
$result = $client->__soapCall('GetTicketsStringInputs', array('parameters' => $param));
$result holding this error message....
Fatal error: Uncaught SoapFault exception:
[Client] Function ("GetTicketsStringInputs") is not a valid method for this service in /home/fmticket/public_html/inc/genericLib.php:279
Stack trace:
#0 /home/fmticket/public_html/inc/genericLib.php(279): SoapClient->__soapCall('GetTicketsStrin...', Array)
#1 /home/fmticket/public_html/resultsTicket.php(12): getTickets(Array)
#2 {main} thrown in /home/fmticket/public_html/inc/genericLib.php on line 279
how to resolve it?? plz help.
Your code is calling the remote GetTicketsStringInputs function :
$client->__soapCall('GetTicketsStringInputs', ...
The Fatal error you get indicates :
Function ("GetTicketsStringInputs") is not a valid method for this service
It seems pretty clear : the method you're trying to call doesn't exist, it is not provided by the remote web-service.
So, to fix that Fatal Error, you have to stop calling that function ;-)
You should check the WSDL of your webservice : does it really export such a method ?