/** * 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); }
/** * 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); }