Skip Menu |

This queue is for tickets about the Microsoft-AdCenter CPAN distribution.

Report information
The Basics
Id: 58425
Status: resolved
Priority: 0/
Queue: Microsoft-AdCenter

People
Owner: XERXES [...] cpan.org
Requestors: scott.sexton [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: _deserialize_complex_type still called when response object body is empty
Certain objects, like UpdateKeywordsResponse have a soap reply that looks like this: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:Trackin gId xmlns:h="https://adcenter.microsoft.com/v6">9942e621-a488-47c8-9573- c 6f3bbef3ab6</h:TrackingId></s:Header><s:Body><UpdateKeywordsResponse xmlns="https://adcenter.microsoft.com/v6"/></s:Body></s:Envelope> Which causes a fatal error. Starting at line 162 in Service.pm, the _invoke method checks that $som->body is defined and that $response_body->{$response_name} exists. If those checks pass, it then calls _deserialize_complex_type which throws a fatal error when trying to use the type passed to it due to the fact that the body value returned is an empty string. As a temporary fix, I have altered my local Service.pm to check if the body is '' and then return, else go on to the deserialize call.
From: scott.sexton [...] gmail.com
Actually, I guess it's fine that _deserialize_complex_type is still called, but this line $type = ref($value) if (ref($value) ne 'HASH'); Should only be called when $value is also not an empty string. So it should be this: $type = ref($value) if ($value ne '' && ref($value) ne 'HASH');
Resolved in 6.02. Please let me know if this is still not working. Thank you.