public function testEncoding() { $server = new Server(); $this->assertNull($server->getEncoding()); $server->setEncoding('ISO-8859-1'); $this->assertEquals('ISO-8859-1', $server->getEncoding()); $this->setExpectedException('Zend\\Soap\\Exception\\InvalidArgumentException', 'Invalid encoding specified'); $server->setEncoding(array('UTF-8')); }
public function testEncoding() { $server = new Server(); $this->assertNull($server->getEncoding()); $server->setEncoding('ISO-8859-1'); $this->assertEquals('ISO-8859-1', $server->getEncoding()); try { $server->setEncoding(array('UTF-8')); $this->fail('Non-string encoding values should fail'); } catch (\Exception $e) { // success } }
public function soapAction() { $soap = new Soap(null, array('uri' => $this->_WSDL_URI . "/wsdl", 'encoding' => 'UTF-8')); $soap->setClass('\\Application\\Webservices\\gpa'); $soap->setEncoding('UTF-8'); $soap->registerFaultException(array('Exception')); $soap->handle(); return $this->setTerminal(); }