hosted-licensed.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/php
  2. <?php
  3. require_once dirname(__FILE__) . '/../../common.php';
  4. system('clear');
  5. print(Demos_Zend_Service_LiveDocx_Helper::wrapLine(
  6. PHP_EOL . 'Using Hosted Solution and Fully-Licensed Servers' .
  7. PHP_EOL .
  8. PHP_EOL . 'This sample application illustrates how to use Zend_Service_LiveDocx_MailMerge with hosted and fully-licensed LiveDocx servers, by specifying an alternative SOAP client (must be instance of Zend_Soap_Client).' .
  9. PHP_EOL .
  10. PHP_EOL)
  11. );
  12. $phpLiveDocx = new Zend_Service_LiveDocx_MailMerge();
  13. $phpLiveDocx->setWsdl('https://api.example.com/1.2/mailmerge.asmx?WSDL')
  14. ->setUsername(Demos_Zend_Service_LiveDocx_Helper::USERNAME)
  15. ->setPassword(Demos_Zend_Service_LiveDocx_Helper::PASSWORD);
  16. $phpLiveDocx->getTemplateFormats(); // then call methods as usual
  17. printf('Username : %s%sPassword : %s%s WSDL : %s%s%s',
  18. $phpLiveDocx->getUsername(),
  19. PHP_EOL,
  20. $phpLiveDocx->getPassword(),
  21. PHP_EOL,
  22. $phpLiveDocx->getWsdl(),
  23. PHP_EOL,
  24. PHP_EOL
  25. );
  26. unset($phpLiveDocx, $mySoapClient);