zimbra-api / soap-api

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

Use Zimbra Api #2

Closed xrevenge closed 8 years ago

xrevenge commented 9 years ago

Hello,

I tried to install you module with composer. I took you composer.json and changed some information in order to install your module in vendor directory. I can not use you module. I tried to follow your readme, but it doesn't work.

I do that : require_once 'vendor/autoload.php'; and then $api = new \Zimbra\MailFactory::instance('https://zimbra.domain.com/service/admin/soap'); Apparently, i have a problem on this second line and I don't understand whatit doesnt work.

Thx for your help

My composer.json { "name": "zimbraAccess", "type": "library", "description": "PHP wrapper library around the Zimbra Soap API (web service)", "keywords": ["library", "soap", "web service", "client", "Zimbra API"], "license": "BSD (3-Clause) License", "authors": [ { "name": "Nguyen Van Nguyen", "email": "nguyennv1981@gmail.com", "homepage": "https://github.com/nguyennv" } ], "require": { "php": ">=5.4.0", "evenement/evenement": "~2.0", "guzzlehttp/guzzle": "5.", "phpcollection/phpcollection": "0.", "zimbra/soap-api": "dev-master" }, "suggest": { "ext-soap": "*" } }

Setitch commented 9 years ago

I fixed it using

    $js = new \Zimbra\Enum\RequestFormat('js');
    $api = new \Zimbra\Admin\Http('https://mailrelayserver.com/service/soap/', $js);

As for some reason the code provided in ,,tutorial'' was not working for me either.