Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research on Zend_Soap classmap feature #16

Open
moyarada opened this issue Sep 1, 2010 · 2 comments
Open

Research on Zend_Soap classmap feature #16

moyarada opened this issue Sep 1, 2010 · 2 comments

Comments

@moyarada
Copy link
Collaborator

moyarada commented Sep 1, 2010

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:

array('SOAP Type' => 'PHP Class',
       'SOAP Type' => 'PHP Class',
        ....
      )
@moyarada
Copy link
Collaborator Author

moyarada commented Sep 1, 2010

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.

@moyarada
Copy link
Collaborator Author

First implementation of a custome SoapServer requires further development. However, prototype worked really fine returning fully initialized bindings to a service method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants