Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Zimbra-Api #3

Closed
nsasit opened this issue Apr 20, 2015 · 2 comments
Closed

Problem with Zimbra-Api #3

nsasit opened this issue Apr 20, 2015 · 2 comments

Comments

@nsasit
Copy link

nsasit commented Apr 20, 2015

Hello.
I install zimbra/soap-api and when I run the phpunit *, everything seems to be ok.
When I use this code :
$api = new \Zimbra\AdminFactory::instance('https://localhost:7071/service/admin/soap');,
I have a problem :
Parse error: syntax error, unexpected 'instance' (T_STRING), expecting variable (T_VARIABLE) or '$' in.

So I change it by :
$js = new \Zimbra\Enum\RequestFormat('js');$api = new \Zimbra\Admin\Http('https://<hostname>:7071/service/admin/soap/', $js);
but another problem :
Fatal error: Call to undefined method Zimbra\Soap\Client\Http::format() in.

Could you help me ?

Thanks

  • : php phpunit.phar --configuration vendor/zimbra/soap-api/phpunit.xml.dist --debug
@nsasit
Copy link
Author

nsasit commented Apr 21, 2015

The problem in the tutorial is that the path is incorrect :

$api = \Zimbra\Admin\AdminFactory::instance(

instead of

$api = \Zimbra\AdminFactory::instance(

With this config, I have another error :

Fatal error: Call to undefined method Zimbra\Soap\Client\Http::authToken() in

@MaizerGomes
Copy link

The first problem in the tutorial is that you cannot call "new" with a static method.

new \Zimbra\AdminFactory::instance('https://localhost:7071/service/admin/soap');

Hast to be:

\Zimbra\AdminFactory::instance('https://localhost:7071/service/admin/soap');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants