Hi, I hope you can help me as I can’t find a reference in the guide.
I have a controller that generates the WSDL in the index method, and I’ll provide the code below:
public function index(){
$autoDiscover = new AutoDiscover(new ArrayOfTypeSequence());
$autoDiscover->setBindingStyle(array('style' => 'document'));
$autoDiscover->setOperationBodyStyle(array('use' => 'literal'));
$autoDiscover->setClass(GoAppSoapServer::class);
$autoDiscover->setUri("http://domain/file.svc?wsdl");
header("Content-Type: text/xml");
echo $autoDiscover->generate()->toXml();
}
The class that is called has the following annotations:
/**
* Checks the license status
*
* @param string|null $sCliente Client name
* @param string|null $sDeviceLicenseNumber Device license number
* @param string|null $lastUpdatestring Last update date in string format (YYYY-MM-DD)
* @param string|null $sDeviceId Device ID
* @param bool $bCheckLicense If true, checks the license
* @param bool $bOnlyDisponibilita If true, returns only availability
* @param bool $bFullScreenPresent If true, indicates full-screen presence
* @return CheckDBSynchronizationOut Object with synchronization data
* @throws \SoapFault
*/
But if I include the created resource in the return, I get an error saying the Resource is not present in the DefaultComplexType. How can I define the return type?
Error: Cannot add a complex type CheckDBSynchronizationOut that is not an object or where class could not be found in “DefaultComplexType” strategy.