zimbra-api / soap-api

Zimbra SOAP client in PHP language
BSD 3-Clause "New" or "Revised" License
61 stars 48 forks source link

Fatal error: Uncaught GuzzleHttp\Exception\ServerException: Server Error #51

Open orlyinomcoke opened 2 years ago

orlyinomcoke commented 2 years ago

Hi everyone, I followed all instructions upon installing this API wrapper but I cant seem to make any successful request. Here is the sample code i got from here.

<?php

// This file is generated by Composer require_once 'vendor/autoload.php';

$api = \Zimbra\Admin\AdminFactory::instance('https://zim.dominionoutsourcing.com:7071/service/admin/soap'); $api->auth('api.admin', 'password');

?>

Full error when running the script. I am having this error both locally and our dev server which is hosted in amazon. Would really appreciate any help from you guys! Thank you very much!!

Fatal error: Uncaught GuzzleHttp\Exception\ServerException: Server error: POST https://zim.[ourdomain].com:7071/service/admin/soap resulted in a `500 Server Error` response: </soap:Hea (truncated...) in C:\xampp\htdocs\zimbra-api-master\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php:113 Stack trace: #0 C:\xampp\htdocs\zimbra-api-master\vendor\guzzlehttp\guzzle\src\Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 C:\xampp\htdocs\zimbra-api-master\vendor\guzzlehttp\promises\src\Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response)) #2 C:\xampp\htdocs\zimbra-api-master\vendor\guzzlehttp\promises\src\Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL) #3 C:\xampp\htdocs\zimbra-api-master\vendor\guzzlehttp\promises\src\Ta in C:\xampp\htdocs\zimbra-api-master\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php on line 113

xtrap029 commented 2 years ago

Same issue with mine. Make sure to use admin credentials for auth.