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
Posted by Benjamin Eberlei (beberlei) on 2008-10-26T10:45:44.000+0000
Fixed in trunk.
Posted by Wil Sinclair (wil) on 2008-11-13T14:10:11.000+0000
Changing issues in preparation for the 1.7.0 release.