Re: [soaplite] How can I get rid of a "Cannot encode 'item' element as 'hash'"warning
- Hi Duncan
Thanks for the response, I did do a search of the archives, but probably
didn't frame my search criteria properly, I'll have another look.
On Thu, 2004-06-10 at 22:34, Duncan Cameron wrote:
> Alan O'Keefe wrote:
> >Hi all
> >I am running a SOAP::Lite service, (SOAP::Transport::HTTP), which
> >returns an array of hashes to a nuSOAP PHP client, it all works fine,
> >except that the Daemon running the SOAP service outputs the following
> >warning for each hash in the array:
> >Cannot encode 'item' element as 'hash'. Will be encoded as 'map' instead
> >Everything works perfectly, I just want to stop the warning message.
> The warning is probably caused by one of your hash keys having a character that is not valid in an XML element name. Possibly a space character but it could be almost anything.
> The solution is to either change your hash keys or explicitly type the hash as a map type. I don't remember the syntax offhand but it might be
> SOAP::Data->type('map', \%hash)
> If you search the archives of this list you should find that this has been asked in the past and get an example.
> Duncan Cameron
Alan O'Keefe <alan@...>
O'Keefe Systems Consulting