/**
  * Create the client
  *
  * @param string $wsdl
  *
  * @return \MyLittle\CampaignCommander\API\SOAP\APIClient
  */
 public function createClient($wsdl)
 {
     $soapClient = $this->builder->withEncoding('UTF-8')->withSingleElementArrays()->withUserAgent('PHP/SOAP MTOM Attachments CampaignCommander')->withWsdlCacheNone()->withTrace()->withExceptions()->withSoapVersion11()->withWsdl($this->server . '/' . $wsdl)->withMtomAttachments()->build();
     $kernel = $soapClient->getSoapKernel();
     $mimeFilter = new SoapClient\Mimefilter(Helper::ATTACHMENTS_TYPE_MTOM);
     $kernel->registerFilter($mimeFilter);
     return new APIClient($soapClient, $this->login, $this->password, $this->key);
 }
 public function build()
 {
     if (!$this->soapClient) {
         $this->soapClient = parent::build();
     }
     return $this->soapClient;
 }
Esempio n. 3
0
 public function __construct()
 {
     if (function_exists('env')) {
         $this->setShopId(env('TRAY_SHOPID'));
         $this->setLogin(env('TRAY_LOGIN'));
         $this->setPwd(env('TRAY_PWD'));
         $this->setWsdl(env('TRAY_WSDL'));
     }
     $builder = SoapClientBuilder::createWithDefaults()->withEncoding('ISO-8859-1')->withTrace()->withExceptions()->withSoapVersion11()->withWsdl($this->wsdl);
     $this->soapClient = $builder->build();
 }
 /**
  * Create the client
  *
  * @param string $wsdl
  *
  * @return \MyLittle\CampaignCommander\API\SOAP\APIClient
  */
 public function createClient($wsdl)
 {
     $soapClient = $this->builder->withEncoding('UTF-8')->withSingleElementArrays()->withUserAgent('PHP/SOAP CampaignCommander')->withSoapVersion11()->withTrace()->withExceptions()->withWsdlCacheNone()->withWsdl($this->server . '/' . $wsdl)->build();
     return new APIClient($soapClient, null, null, null);
 }
 public function testCreateWithDefaults()
 {
     $builder = SoapClientBuilder::createWithDefaults();
     $this->assertInstanceOf('BeSimple\\SoapClient\\SoapClientBuilder', $builder);
     $this->assertEquals($this->mergeOptions(array('soap_version' => SOAP_1_2, 'encoding' => 'UTF-8', 'features' => SOAP_SINGLE_ELEMENT_ARRAYS, 'user_agent' => 'BeSimpleSoap')), $builder->getSoapOptions());
 }
 public static function createWithDefaults()
 {
     return parent::createWithDefaults()->withUserAgent('millennium-php')->withDefaultClassmap()->withSoapVersion12();
 }