You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preliminary Zend_Soap didn't work with namespaces and objects received in service classes weren't equal to specified in WSDL.
There should be implemented a method, which returns a classmap for given service class.
For example,
$service = new services\ExampleService();
$legkoXml = new xsd2php\Wsdl($service);
$soap = new Zend_Soap_Server("http://localhost/api/soap.php?wsdl");
$soap->setObject($service);
$soap->setClassmap($legkoXml->getClassMap());
$soap->handle();
getClassMap() should return an associative array as follows:
There is no point of using Zend_Soap_Server, as it adds little value to SoapServer.
SoapServer supports type mapping as follows
'typemap' => array(
array('type_name' => 'TName', 'type_ns' => 't:NS', 'from_xml' => 'callback', 'to_xml' => 'callback')
)
Where "from_xml" and "to_xml" are callbacks used for marshalling/unmarshalling SOAP messages. This is where LegkoXML could be integrated.
My idea is to implement SoapServer based class, which encapsulates type mapping, so that incoming and outgoing SOAP messages marshalled/unmarshalled according to their XML Schema.
First implementation of a custome SoapServer requires further development. However, prototype worked really fine returning fully initialized bindings to a service method
Preliminary Zend_Soap didn't work with namespaces and objects received in service classes weren't equal to specified in WSDL.
There should be implemented a method, which returns a classmap for given service class.
For example,
$service = new services\ExampleService();
$legkoXml = new xsd2php\Wsdl($service);
$soap = new Zend_Soap_Server("http://localhost/api/soap.php?wsdl");
$soap->setObject($service);
$soap->setClassmap($legkoXml->getClassMap());
$soap->handle();
getClassMap() should return an associative array as follows:
The text was updated successfully, but these errors were encountered: