Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Describing hashes in WSDL?by jhourcle (Prior) |
on Apr 25, 2005 at 23:28 UTC ( [id://451381]=note: print w/replies, xml ) | Need Help?? |
'proper' is completely subjective. Every SOAP toolkit seems to have its own little quirks, and finding something that completely interoperates can be a royal pain in the ass. If there is a limited number of valid keys that are going to be in the hash, I would bless the hashref ( so that SOAP::Lite will give it a specific datatype ), and would define the hash as being an 'all' complex type, and not a 'sequence', as it allows the elements to appear in any order, but no more than one occurance each. If you don't know what the valid keys might be, you can force SOAP::Lite to serialize it as a mapping, but I didn't have much luck with that in my WSDL, because it seems that apache no longer makes that file available, and I don't know exactly how to define it. (it seems to be an array of items, each having two elements (a key and value, but I can't remember what they were called... just mess with the 'as_mapping' function in SOAP::Lite, and you'll see what I'm talking about). And if that didn't help... try the soaplite mailing list
In Section
Seekers of Perl Wisdom
|
|