Re: [SOAP] Re: [ANN] WSO2 Web Services Framework for PHP v2.0.0 Released

[email protected] (Nandika Jayawardana)
Newsgroups php.soap
Message-ID <[email protected]>
Exception e wrote:
> 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?
>

What you have observed is one mode of operation in WSF/PHP. Here you can 
specify the xml to be sent and received. In addition WSF/PHP also 
supports WSDL mode operation, where you can specify a wsdl and a class 
map and implement business logic while WSF/PHP takes care of handling 
xml. Also it ships with a script to generate client/server code 
corresponding to the given WSDL.

You can find further details here.
http://wso2.org/project/wsf/php/2.0.0/docs/manual.html
and from the blog
http://www.phpwebservices.blogspot.com/

Regards
Nandika
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.