[wsf-c-dev][PHP]Wsdl Generation - schema types
Samisa Abeysinghe
samisa at wso2.com
Tue Dec 12 15:06:45 PST 2006
James Clark wrote:
> On Tue, 2006-12-12 at 23:12 +0700, James Clark wrote:
>
>>> I do not have the clear idea about how they are going to use those types
>>> if those type are not in PHP.But I have implemented it for all of the
>>> schema types.It is a simple thing
>>>
>> If you have a PHP doc comment,
>>
>> /**
>> * @param T x
>> */
>>
>> then T has to be the name of a *PHP* type. How would you tell that T
>> corresponds to, say, the XML Schema gYear type?
>>
>
> Similarly, suppose you have
>
> @param string x
>
> how do you decide what XML Schema type should be used for string? What
> if the string is holding binary data, so that it needs to be base64
> encoded in the XML? How do you handle different encodings for the
> string (e.g. UTF-8 vs ISO-8859-1)? What if the string is holding an ISO
> 8601 date-time stamp?
>
> It doesn't seem at all simple to me.
>
The only solution that I could see for this is to define our XSD type
mapping rules.
Users have to adhere to those rules, while writing annotations, when
providing services as well as when consuming services.
So the use of types would be limited to those defined and supported by
our WSDL generation - given the weak typing nature of PHP, I do not see
any other way to solve this situation.
Samisa...
--
Samisa Abeysinghe : http://www.wso2.org/ (WSO2 Oxygen Tank - Web Services Developers' Portal)
More information about the Wsf-c-dev
mailing list