This is a common question with dynamic languages. The method for set_monitor_association is
set_monitor_association(
in String [] pool_names,
in LocalLB__PoolMember__MemberMonitorAssociation [] [] monitor_associations
);
You are calling it with this:
set_monitor_association(
in String [] pool_names,
in LocalLB__PoolMember__MemberMonitorAssociation [] monitor_associations
);
The second parameter for monitor_associations is a 2-d array so you can pass in multiple monitor_associations for each passed in pool member. You are passing in a 1-d array and the server is interpreting that as a 2-d array with the 2-nd dimension being size zero and thus a no-op is occuring. You'll want to make that monitor_associations a 2-d array.
...
my $monitor_rule={'type' => 'MONITOR_RULE_TYPE_SINGLE', 'quorum' => 0, 'monitor_templates' => ['tcp']};
my $monitor_assoc={'member' => $member, 'monitor_rule' => $monitor_rule}
push monitor_assoc_array, $monitor_assoc;
push monitor_assoc_AofA, monitor_assoc_array;
my $soapResponse = $soap->set_monitor_association(
SOAP::Data->name(pool_names => [$pool]),
SOAP::Data->name(monitor_associations => [@monitor_assoc_AofA])
);
Disclaimer, I haven't tested this so hopefully it works for you. But, you get the idea, you need to make sure that the parameter is declared as an array and then coerced into a 2-d array with brackets. I'm sure there are other ways to do this, but this has worked for me in the past.
-Joe