Re: DocBlocking SOAP types.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nathan Rixham wrote:
> Richard Quadling wrote:
>> Hi.
>>
>> I want to docblock a set of properties to be xml primitive datatypes [1].
>>
>> Considering that this is the correct type for the XML/SOAP/WSDL
>> communication, how do I "bypass" Zend_WSDL / Zend_AutoDiscovery so
>> that these types go through cleanly. I know that as far as PHP is
>> concerned, the type is loose and it will be my responsibility to
>> encode the values accordingly. It is in the WSDL generation, and hence
>> the docblocks, that I want these types to be valid.
>>
>> I think I can achieve this by the following steps.
>>
>> 1 - Create a new concrete class from the
>> Zend_Soap_Wsdl_Strategy_Abstract abstract class, say
>> Zend_Soap_Wsdl_Strategy_W3C (as the type are defined by W3C).
>> 2 - Implement the addComplexType() method to validate the type against
>> the list and return it if is OK.
>>
>> What I am stuck on is how do I cascade from the new class so that I
>> can still drop back to the Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex.
>>
>> I think the Zend_Soap_Wsdl_Strategy_Composite is of use here, but I
>> can't quite work out how to use it.
>>
>> Any ideas would be appreciated.
>>
>> Regards,
>>
>> Richard Quadling.
>>
>> [1] http://www.w3.org/TR/xmlschema11-2/#built-in-primitive-datatypes
>>
> 
> AFAIK the Zend Soap WSDL accessor already maps up php types to xsd
> types; a PHP String maps to an xsd:string, integer to xsd:int and so forth.
> 
> XML schema 1.1 datatypes are pretty much the same as; and backwards
> compatible with the current xml schema datatypes (which are still the
> recommended standard, as 1.1 isn't a recommendation yet, work in
> progress) and use the same namespace. Thus the existing implementation
> should be xml w3c complaint both now and in the future.
> 
> All that's said purely based on the zend docs [1] and not through
> practically using Zend_Soap_Wsdl_* though!


sigh.. [1] = http://framework.zend.com/manual/en/zend.soap.wsdl.html
(specifically Type mapping) - might make more sense now!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux