Exemplo n.º 1
0
 /**
  * @runInSeparateProcess
  */
 public function testHandle()
 {
     $scriptUri = 'http://localhost/MyService.php';
     $this->server->setClass('\\ZendTest\\Soap\\TestAsset\\Test');
     ob_start();
     $this->server->handle();
     $actualWsdl = ob_get_clean();
     $this->assertNotEmpty($actualWsdl, "WSDL content was not outputted.");
     $this->assertContains($scriptUri, $actualWsdl, "Script URL was not found in WSDL content.");
 }
Exemplo n.º 2
0
    /**
     * @group ZF-5330
     */
    public function testDumpOrXmlOfAutoDiscover()
    {
        $server = new AutoDiscover();
        $server->addFunction('\ZendTest\Soap\TestAsset\TestFunc');

        ob_start();
        $server->handle();
        $wsdlOutput = ob_get_clean();

        $this->assertEquals(
            $this->sanitizeWsdlXmlOutputForOsCompability($wsdlOutput),
            $this->sanitizeWsdlXmlOutputForOsCompability($server->toXml())
        );

        ob_start();
        $server->dump(false);
        $wsdlOutput = ob_get_clean();

        $this->assertEquals(
            $this->sanitizeWsdlXmlOutputForOsCompability($wsdlOutput),
            $this->sanitizeWsdlXmlOutputForOsCompability($server->toXml())
        );
    }
Exemplo n.º 3
0
 public function WsdlAction()
 {
     $wsdl = new AutoDiscover();
     $wsdl->setClass('\\Application\\Webservices\\gpa')->setUri($this->_WSDL_URI . '/soap');
     //print_r($wsdl);
     $wsdl->handle();
     /* $wsdl = $wsdl->generate();
        $wsdl = $wsdl->toDomDocument();
        // geramos o XML dando um echo no $wsdl->saveXML() 
        echo $wsdl->saveXML();
            
        header('Content-type: application/xml');
        echo $wsdl->toXml();
        exit();*/
     return $this->setTerminal();
 }