[SOLVED] soap calls to backend server failing with parse_error
SOAP::Lite by default adds the value type as an attribute and Zimbra doesn't like this apparently when the request is proxied behind the scenes.
<account xsi:type="xsd:string" by="name"> firstname.lastname@example.org </account>
SOAP::Lite->autotype(0); # solves the problem.
Also it appears that GetAccountRequest does proxy to the home server of the account that you are searching for. I was too focused on the account I was logging in with.
I'm playing with the Zimbra SOAP API + Perl SOAP::Lite and ran into something odd. When I issue a GetAccountRequest to any one of my 5 mailbox servers, they will send the request, in the background, to a specific mailbox server ("01") and fail with a parse error:
"The prefix "xsi" for attribute "xsi:type" associated with an element type "account" is not bound. PARSE_ERROR
- If I send the request to that specific server "01", then the request is fine.
- AuthRequest calls succeed on any server.
- The account I'm using to log in with does not have "01" as it's home server.
Is there something I'm missing or is this a bug? I've glanced at zmlocalconfig, and zmprov desc to see if there would be some kind of setting specifying a default host for soap requests, but didn't notice anything.
It's not a big deal to use 01 for soap operations, but I prefer to use the server we have setup to do automation tasks and doesn't host users.