Issues

ZF-4170: Zend_Soap_AutoDiscover malformed WSDL

Description

With a simple class I'm unable to obtain a valid wsdl.

Following class and server code

 
######################################
 Server class
######################################
<?
class TestServer {
    /**
     * A simple test
     *
     * @param integer $param1
     * @return string
     */
    public function insert($param1) {
        return "Hello ".$param1;
    }
}
 
######################################
 Controller class
######################################

...

public function wsdlAction() {
        $this->_helper->layout->disableLayout();
        $this->_helper->viewRenderer->setNoRender(true);
        
        $this->getResponse()->setHeader('Content-Type', 'text/xml');  
        $wsdl = new Zend_Soap_AutoDiscover();
        $wsdl->setClass('TestServer');  
        $wsdl->handle();  
        exit;  
    }

...
I obtain this wsdl
 
######################################
 WSDL output
######################################


<?xml version="1.0" encoding="UTF-8"?>
www.w3.org/2001/XMLSchema"
    xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
    name="TestServer" targetNamespace="http://localhost/index.php">
    
            
            
            

That give the followings error: soap:operation expected but not found for binding "TestServerBinding", operation "insert"

The problem is that must be inside the

 
######################################
 WSDL correct code
######################################

<?xml version="1.0" encoding="UTF-8"?>
www.w3.org/2001/XMLSchema"
    xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
    name="TestServer" targetNamespace="http://localhost/index.php">
    
            
            
            

Comments

Fixed in trunk.

Changing issues in preparation for the 1.7.0 release.