Re: [ANN] WSO2 Web Services Framework for PHP v2.0.0 Released
[email protected] (Exception e)
| Newsgroups | php.soap |
|---|---|
| Message-ID | <[email protected]> |
Nandika Jayawardana schreef:
> WSO2 Web Services Framework for PHP v2.0.0 Released
>
> It's Key features include, secure services and clients with WS-Security
> support,
> binary attachments with MTOM, automatic WSDL generation (code first model),
> WSDL mode for both services and clients (contract first model)
> and interoperability with .NET and J2EE.
Your feature list is really cool, I've previously looked at it but I was
deterred by your examples
(http://wso2.org/project/wsf/php/2.0.0/docs/manual_content.html#Quick).
Where is the automatic WSDL-generation part?
I see you using code like this:
$reqPayloadString = <<<XML
<ns1:doSpellingSuggestion
x:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:GoogleSearch"
xmlns:x="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<key xsi:type="xsd:string">your_key_here</key>
<phrase xsi:type="xsd:string">tamperature</phrase>
</ns1:doSpellingSuggestion>
XML;
But that's just the marshalled code that shouldn't be in a program. I
think that a SOAP-library is meant to explicitly hide
communication-details from the application code.
Compare this to the Zend Framework way, all you need is this:
// return WSDL file of your service
if(isset($_GET['wsdl'])) {
$autodiscover = new Zend_Soap_AutoDiscover();
$autodiscover->setClass('HelloWorldService');
$autodiscover->handle();
// handling soap requests
} else {
// pointing to the current file here
$soap = new Zend_Soap_Server("http://example.com/soap.php?wsdl");
$soap->setClass('HelloWorldService');
$soap->handle();
}
I obviously miss something. How do achieve something similar with you
library?